bids-standard / bids-validator

Validator for the Brain Imaging Data Structure
https://bids-standard.github.io/bids-validator/
MIT License
178 stars 107 forks source link

Make bids-validator conform to BIDS-App (or execution-spec right away) specification #2000

Open yarikoptic opened 3 weeks ago

yarikoptic commented 3 weeks ago

ATM it is

Usage: bids-validator <dataset_directory> [options]

whenever BIDS-app interface, as described in new exec spec (bep027) https://bids-standard.github.io/execution-spec/inputs.html#backwards-compatibility

bids-app InputDataset OutputLocation AnalysisLevel [options]
...
CLI flag: --subject-label

. Or may be just following new options as described at https://bids-standard.github.io/execution-spec/inputs.html#list-of-custom-object-properties-and-roles-within-the-bids-application-specification

It would have been quite convenient to be able to limit bids-validation to a specific subject or session, and only at "dataset" level provide overall report.

effigies commented 3 weeks ago

If we do want to adopt it, we are required to specify OutputLocation, which we could default to stdout with -o/--output -. I'm not sure what AnalysisLevel would correspond to, but that's also required. Maybe --analyze dataset that's set by default and any other value is an error.

Otherwise, seems fine. --subject-label X Y would simply filter contexts on entities.subject == 'X' || entities.subject == 'Y'. Similarly with any entity you care to define.

yarikoptic commented 3 weeks ago

NB For BIDS exec spec itself might be worth defaulting OutputLocation to . to encourage YODA style composition ;-)