bids-specification icon indicating copy to clipboard operation
bids-specification copied to clipboard

[SCHEMA] use the schema to organize the schema

Open Remi-Gau opened this issue 2 years ago • 2 comments

Occurred to me that the rule files that describes each datatypes list the entities for each suffix group in an order that seems arbitrary.

See for example: https://github.com/bids-standard/bids-specification/blob/master/src/schema/rules/datatypes/anat.yaml

There is a note about this in the README of the schema and that the actual entity order should read from rules/entities.yaml

I do believe that this file should be the final arbiter of the entity order (because it can tell you how to order entities for suffix groups that are not yet in BIDS), however...

Could we possibly "lint" the schema (automatically using the schema itself?) so that the entities in each suffix group are actually always ordered as they should appear in a filename? This would definitely limit the number of errors from new users of the schema who might have missed those 2 lines in the README.

May also help tools down the line that this way do not have to always look up the entities.yml file to know how to order entities.

Remi-Gau avatar Apr 14 '22 16:04 Remi-Gau

[SCHEMA] use the schema to organize the schema

37,5% of this issue title has been schematized, anyone wants to top that?

Remi-Gau avatar Apr 14 '22 16:04 Remi-Gau

37,5% of this issue title has been schematized, anyone wants to top that?

done:

image

sappelhoff avatar Apr 14 '22 16:04 sappelhoff