bids-validator
bids-validator copied to clipboard
EEG and iEEG "electrodes" and "coordsystem" files accept more entities than they should
crossref:
- https://github.com/bids-standard/bids-validator/pull/1190#issuecomment-783520897
- https://github.com/bids-standard/bids-examples/issues/244
According to the spec, electrodes and coordsystem files should accept:
- sub
- ses
- acq
- space
see https://bids-specification.readthedocs.io/en/stable/04-modality-specific-files/03-electroencephalography.html#electrodes-description-_electrodestsv
But they accept many more.
See here:
https://github.com/bids-standard/bids-validator/blob/5d3835b5b6f4fcbbade1b7122c57a3f48f92cb46/bids-validator/bids_validator/rules/file_level_rules.json#L358-L498
https://github.com/bids-standard/bids-validator/blob/5d3835b5b6f4fcbbade1b7122c57a3f48f92cb46/bids-validator/bids_validator/rules/session_level_rules.json#L78-L195
https://github.com/bids-standard/bids-validator/blob/5d3835b5b6f4fcbbade1b7122c57a3f48f92cb46/bids-validator/bids_validator/rules/top_level_rules.json#L80-L119
Overall the regexps are getting unwieldy ... we should move towards building the regexps from the BIDS schema
Landed on this while investigating an issue from bids matlab https://github.com/bids-standard/bids-matlab/issues/542
Just to know: is it worth putting effort into creating regex that match the schema or wait for the validator to directly use the schema.
Just to know: is it worth putting effort into creating regex that match the schema or wait for the validator to directly use the schema.
I think at this point we should wait for the schema based validator to take over and invest our time in effort in more urgent issues. However if you want to dive into this, it'd still be helpful.
if you want to dive into this
irony: on
oh yes!!!! I love writing complex regex to parse file names!!!
irony: off
OK let's wait then.