bids-validator icon indicating copy to clipboard operation
bids-validator copied to clipboard

How to get schema version?

Open tien-tong opened this issue 1 year ago • 4 comments
trafficstars

I want to save both the validator version and schema version to dataset_description.json, but I can only get the schema version (the default version, when --schema wasn't specified) when actually running the validator, and get it from the summary. Is there an easier way to get this information? If not, I was wondering if it's possible to print both the validator version, and the default schema version when running --version? Thank you!

tien-tong avatar Nov 20 '24 15:11 tien-tong

Might be worth having a record listing all involved/validated standards versions, e.g. BIDS, HED, potentially even OME-Zarr etc when integrations are added.

yarikoptic avatar Apr 04 '25 12:04 yarikoptic

Since there is no discussion forum in this repo, I will ask some related questions here.

  1. Does the "BIDSVersion" still matter? With the --schema option, I supposed one can specify a URL to a customized schema which is not an exact implementation of any published "BIDSVersion".
  2. If the specified BIDS schema in a validation is customized, not any of the published versions, does the SchemaVersion in provided in the validation summary still matters.

candleindark avatar Apr 04 '25 18:04 candleindark

  1. those json schemas include version inside them see e.g. https://github.com/bids-standard/bids-schema/blob/main/versions/1.10.0/schema.json so there is both "schema_version": "0.11.3", "bids_version": "1.10.0"
  2. we just get what version it says in schema.json -- we cannot know better. So it would be for producers of those files to provide versions which adequately describe them.
  • thinking about it -- should we reserve some dedicated "bids_vendor" or alike (with our default value "BIDS") which would include that custom suffix or smth (like bep032) clones could add, or alternatively we could rely (provide guidance) on bids_version to include it as e.g. 1.10.0+bep032+1. We did smth like that awhile back when validating still WiP microscopy bids datasets in dandi

yarikoptic avatar Apr 04 '25 19:04 yarikoptic

I think all the official published version numbers should be reserved for the actual schemas published under those respective versions. Any customized schema, no matter how small the customization, should have a different version number indicating that it is a customized version. Possibly, this can be enforced by the validator by generating the an appropriate validation result with marking of customized schema in the SchemaVersion key in the summary.

candleindark avatar Apr 04 '25 21:04 candleindark