bids-validator
bids-validator copied to clipboard
Allow downstream programs to supply additional rules
PyBIDS uses the bids_validator Python library to filter files by default. It is not currently possible to augment this with additional rules to allow certain (pre-standard) new files without disabling the filter entirely.
Given that the current API is an object that each caller is likely to instantiate independently, some kind of configuration that would permit each new construction to incorporate the additional rules would be useful.
For example:
>>> import bids_validator
>>> validator = bids_validator.BIDSValidator()
>>> validator.is_bids('/models/model-001_smdl.json')
False
>>> bids_validator.add_rules('statsmodels', 'path/to/statsmodels.json')
>>>
>>> validator = bids_validator.BIDSValidator()
>>> validator.is_bids('/models/model-001_smdl.json')
True
cc @tyarkoni
Related to https://github.com/poldracklab/fitlins/issues/206.
I guess this is related to https://github.com/bids-standard/bids-validator/issues/826 as well