Skip to main content

FAIRification Genomic Data Tracks JSON Schema validation, Python edition

The JSON schema should be compliant with JSON Schema Draft04, Draft06 or Draft07 specifications.

So, this validation program uses libraries compliant with that specification.

The installation instructions are in INSTALL.md .

History

The roots of this code come from https://github.com/inab/benchmarking-data-model/tree/0.4.0/toolsForValidation.

Its development was later followed at [https://github.com/fairtracks/fairtracks_validator/], where implementations in other programming languages were also hosted. Python code gained traction and real modularisation there.

As this Python code is relevant to several research projects, it has been split from its latest repo, keeping the core and original extensions at https://github.com/inab/python-extended-json-schema-validator, and keeping these specific FAIRTracks extensions at https://github.com/fairtracks/fairtracks_validator_python.

Usage

python fairGTrackJsonValidate.py --help
usage: fairGTrackJsonValidate.py [-h] [--log-file LOGFILENAME] [--log-format LOGFORMAT] [-q] [-v] [-d] [-V] [-C CONFIGFILENAME]
                                 [--cache-dir CACHEDIR] [--report REPORTFILENAME] [--verbose-report]
                                 [--invalidate | --read-only] [--warm-up | --lazy-load]
                                 json_schema_or_dir [json_file_or_dir [json_file_or_dir ...]]

Validate JSON against JSON Schemas with extensions (version 0.9.7)

positional arguments:
  json_schema_or_dir    The JSON Schema file or directory to validate and use
  json_file_or_dir      The JSON files or directories to be validated

optional arguments:
  -h, --help            show this help message and exit
  --log-file LOGFILENAME
                        Store messages in a file instead of using standard error and standard output
  --log-format LOGFORMAT
                        Format of log messages
  -q, --quiet           Only show engine warnings and errors
  -v, --verbose         Show verbose (informational) messages
  -d, --debug           Show debug messages (use with care, as it could potentially disclose sensitive contents)
  -V, --version         show program's version number and exit
  -C CONFIGFILENAME, --config CONFIGFILENAME
                        Configuration file (used by extensions)
  --cache-dir CACHEDIR  Caching directory (used by extensions)
  --report REPORTFILENAME
                        Store validation report (in JSON format) in a file
  --verbose-report      When this flag is enabled, the report also embeds the json contents which were validated
  --invalidate          Caches are invalidated on startup
  --read-only           When this flag is enabled, the caches are read-only, avoiding expensive operations related to the caches
  --warm-up             Caches are warmed up on startup
  --lazy-load           Caches are warmed up in a lazy way

Next lines run validations using test data:

git clone https://github.com/fairtracks/fairtracks_validator/
python fairGTrackJsonValidate.py fairtracks_validator/test-data/foreignProperty_simple/schemas/ fairtracks_validator/test-data/foreignProperty_simple/good_validation/
python fairGTrackJsonValidate.py fairtracks_validator/test-data/foreignProperty_simple/schemas/ fairtracks_validator/test-data/foreignProperty_simple/bad_validation/

And this is an asciinema recording a previous version of FAIRTracks Validator:

asciicast

Release files for fairtracks-validator 0.9.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fairtracks-validator 0.9.10
File Size Uploaded
fairtracks_validator-0.9.10.tar.gz 27.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fairtracks-validator 0.9.10
File Interpreter ABI Platform
fairtracks_validator-0.9.10-py3-none-any.whl Python 3 none any Details

Total release size: 58.1 kB

Release files / fairtracks_validator-0.9.10.tar.gz

Download URL fairtracks_validator-0.9.10.tar.gz
Size 27.8 kB
Tags Source
SHA-256 checksum
How to use checksums
462f0fb624d9a046c560fc48ebe2dbb1f29128e7b165a94042559a35d8664e63
BLAKE2b-256 checksum
How to use checksums
136edc23ee127cd9dc180993b258e23322906adb119a3a3fd70493f246f987ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

Release files / fairtracks_validator-0.9.10-py3-none-any.whl

Download URL fairtracks_validator-0.9.10-py3-none-any.whl
Size 30.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f4fdc5e89bc2a9b8e472f175a0334d5031d6e77487f509ddf83bceec84b1524
BLAKE2b-256 checksum
How to use checksums
4b08d167241ffc955b499bc15883669016b153f27f91dcf32e66533c40290303
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

Release history Release notifications | RSS feed

This release

0.9.10 This release

2 release files

0.9.9

2 release files

0.9.8

2 release files

0.9.7

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page