bids-standard / bids-specification

Brain Imaging Data Structure (BIDS) Specification
https://bids-specification.readthedocs.io/
Creative Commons Attribution 4.0 International
274 stars 157 forks source link

[INFRA] Introduce metaschema #1787

Closed bendichter closed 5 months ago

bendichter commented 5 months ago

This PR contains:

  1. metaschema.json: A json schema document that specifies the entire schema language
  2. validate_schema.py: code for loading the schema, dereferencing it, and validating against the metaschema
  3. very minor adjustment to the actual schema, changing "deprecated" to "DEPRECATED", which appears to be the more dominant.
  4. tests ensuring that this correctly identifies erroneous additions to the schema

When I started this at the meeting in Seattle I did not expect the metaschema to be >700 lines, but there it is. I used definitions a bit to make it more concise. It's possible this could benefit from more definitions.

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.92%. Comparing base (53eafda) to head (5465f42).

:exclamation: Current head 5465f42 differs from pull request most recent head 7d3445c. Consider uploading reports for the commit 7d3445c to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1787 +/- ## ========================================== + Coverage 87.79% 87.92% +0.13% ========================================== Files 16 16 Lines 1360 1375 +15 ========================================== + Hits 1194 1209 +15 Misses 166 166 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bendichter commented 5 months ago

depends on #1790

bendichter commented 5 months ago

phew, sorry about all the commits here. It's ready for another round of review.

effigies commented 5 months ago

Made a few small changes that were easier to do than suggest. Please have a look and let me know if you disagree.

effigies commented 5 months ago

@bendichter Please add yourself to https://github.com/bids-standard/bids-specification/wiki/Recent-Contributors if you aren't already on the contributors list.