Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cthoyt/table-validator
Use tables with validation schemata to validate other tables.
https://github.com/cthoyt/table-validator
Last synced: about 1 month ago
JSON representation
Use tables with validation schemata to validate other tables.
- Host: GitHub
- URL: https://github.com/cthoyt/table-validator
- Owner: cthoyt
- License: mit
- Created: 2019-03-19T08:05:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-06T10:32:29.000Z (almost 5 years ago)
- Last Synced: 2024-06-12T02:34:47.075Z (5 months ago)
- Language: Python
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
table-validator
===============
Use tables with validation schemata to validate other tables.Installation
------------
Install directly from `GitHub `_ with:.. code-block:: sh
$ pip install git+https://github.com/cthoyt/table-validator.git
Testing
-------
Install ``tox`` with ``pip install tox`` then run with ``tox``.Usage
-----
Desktop Usage
~~~~~~~~~~~~~
To run the desktop interface, you also need to install the ``PyQt5`` package with ``pip`` then run:.. code-block:: sh
$ python -m table_validator.desktop
The ``--template`` option can specify a template file other than ``template.tsv`` in the current directory.
Web Usage
~~~~~~~~~
To run the web interface, you also need to run.. code-block:: sh
$ pip install flask flask-wtf flask-bootstrap
then run
.. code-block:: sh
$ python -m table_validator.web
The ``--template`` option can specify a template file other than ``template.tsv`` in the current directory.
CLI Usage
~~~~~~~~~
Installation with ``pip`` adds a command ``table_validator`` that takes two arguments: a path to the template file,
and a path to the candidate file. Given files ``template.tsv`` and ``candidate.tsv``:.. code-block:: tsv
# template.tsv
C_A C_B C_C
R_1 {INT(REQUIRED=TRUE)} {INT(REQUIRED=TRUE)} {INT(REQUIRED=TRUE)}.. code-block:: tsv
# candidate.tsv
C_A C_B C_C
R_1 1 2 3You can run:
.. code-block:: sh
$ table_validator template.tsv candidate.tsv