regen-network / regen-registry-standards

:seedling: RDF and SHACL schemas for Regen Registry
4 stars 1 forks source link

Add CLI flags to shacl_validate.py to run certain validations #25

Closed wgwz closed 1 year ago

wgwz commented 1 year ago

Currently the shacl_validate.py script runs all validations for credit classes, credit batches and projects every time it is run. We would like to be able to run only specific validations like so:

./shacl_validate.py --credit-classes --credit-batches --projects
./shacl_validate.py --credit-classes --credit-batches
./shacl_validate.py --credit-batches

Ideally, we would just make use of python's built-in argparse library for this, since it would be nice not to have to install any python dependencies.

wgwz commented 1 year ago

The default behavior of the script should be maintained, when we do the following, it should just run all validations:

./shacl_validate.py
S4mmyb commented 1 year ago

I think using argparse for this in the future would be nice! I did a bit of this last year in the s2-ard repo if we want to use it as a model. I was also playing with using config files which was a pretty nice model we could explore as the libraries get more complex and we only want to use subsets.