You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a recurring issue, but we still don't have a completely satisfactory solution for validation of BIDS-Derivatives files. Per the spec, all derivatives directories are BIDS-Raw directories, so all rules should apply (e.g., validation of dataset_description.json). But we currently don't have regexps in bids-validator for the derivatives extensions. Plus, one could argue that derivatives folders are much more likely to contain files that users expect to be indexed, but that aren't technically BIDS compliant.
The current approach is to try to validate everything, but automatically pass derivatives files (i.e., _validate_file returns True for derivatives files). Per a suggestion from @tsalo, we could allow passing strings for more fine-grained control (i.e., validate could take values 'all' (same as True), 'none' (same as False) 'bids', or 'derivatives'. This would require a bit of refactoring because of the way derivatives BIDSLayout objects are constructed, but is probably worth the effort. Of course, this all hinges on adding derivatives directories to the bids-validator, and then importing the BIDSValidator from there, so probably bids-standard/bids-validator#684 should be the highest priority, then the regexps for derivatives, and then we can revisit this.
Independently of that (or, in the meantime), @Shotgunosine suggested raising a one-time warning during validation indicating that derivatives files aren't being validated, which would at least alert users to the current behavior.
The text was updated successfully, but these errors were encountered:
This is a recurring issue, but we still don't have a completely satisfactory solution for validation of BIDS-Derivatives files. Per the spec, all derivatives directories are BIDS-Raw directories, so all rules should apply (e.g., validation of
dataset_description.json
). But we currently don't have regexps inbids-validator
for the derivatives extensions. Plus, one could argue that derivatives folders are much more likely to contain files that users expect to be indexed, but that aren't technically BIDS compliant.The current approach is to try to validate everything, but automatically pass derivatives files (i.e.,
_validate_file
returnsTrue
for derivatives files). Per a suggestion from @tsalo, we could allow passing strings for more fine-grained control (i.e.,validate
could take values'all'
(same asTrue
),'none'
(same asFalse
)'bids'
, or'derivatives'
. This would require a bit of refactoring because of the way derivativesBIDSLayout
objects are constructed, but is probably worth the effort. Of course, this all hinges on adding derivatives directories to thebids-validator
, and then importing theBIDSValidator
from there, so probably bids-standard/bids-validator#684 should be the highest priority, then the regexps for derivatives, and then we can revisit this.Independently of that (or, in the meantime), @Shotgunosine suggested raising a one-time warning during validation indicating that derivatives files aren't being validated, which would at least alert users to the current behavior.
The text was updated successfully, but these errors were encountered: