Use tables with validation schemata to validate other tables.
- INFO: Source Code of the Compund Parser by Lukrécia Mertová: https://github.com/mertova/Compound_parser_hackethon2019
Install directly from GitHub with:
$ pip install git+https://github.com/cthoyt/table-validator.git
Install tox
with pip install tox
then run with tox
.
To run the desktop interface, you also need to install the PyQt5
package with pip
then run:
$ python -m table_validator.desktop
The --template
option can specify a template file other than template.tsv
in the current directory.
To run the web interface, you also need to run
$ pip install flask flask-wtf flask-bootstrap
then run
$ python -m table_validator.web
The --template
option can specify a template file other than template.tsv
in the current directory.
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
:
# template.tsv
C_A C_B C_C
R_1 {INT(REQUIRED=TRUE)} {INT(REQUIRED=TRUE)} {INT(REQUIRED=TRUE)}
# candidate.tsv
C_A C_B C_C
R_1 1 2 3
You can run:
$ table_validator template.tsv candidate.tsv