Skip to content

How should we validate BIDS-Derivatives files? #343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tyarkoni opened this issue Jan 14, 2019 · 1 comment
Closed

How should we validate BIDS-Derivatives files? #343

tyarkoni opened this issue Jan 14, 2019 · 1 comment
Labels

Comments

@tyarkoni
Copy link
Collaborator

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.

@tyarkoni
Copy link
Collaborator Author

I think this is all worked out now, so closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant