Open yarikoptic opened 1 year ago
It occurs to me that we might want to make --schema
an argument to any command.
bst [--schema PATH] {export,validate} ...
so do we want to integrate the validator into the bst CLI? I had a separate repo for that which I thought would serve best in the interest of keeping bst as small as possible to justify its continued co-development with the schema.
Your idea
There is already
which is used https://github.com/bids-standard/bids-specification/blob/ada2c5d445f1c0eab306e7a0d691e1889f1ffe4c/readthedocs.yml#L8-L9 .
Next command IMHO should be
validate [--schema PATH] PATH(s)
which would do basic validation of the PATH(s). If no--schema
specified -- should validate against schema corresponding to the BIDS version found in the dataset in the PATH. Could get that version from https://github.com/bids-standard/bids-schema/ or may be loaded from .json representation as made available from a single file like https://bids-specification.readthedocs.io/en/v1.8.0/schema.json .Unlikely it is feasible to compete with implementation in bids-validator, but could be at least basic validation of path filenames for now.