Skip to content
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

[SCHEMA] Define the types present in the schema in a new YAML file #1048

Closed
wants to merge 14 commits into from

Conversation

tsalo
Copy link
Member

@tsalo tsalo commented Mar 30, 2022

Closes None, but it might be related to #884?

Changes proposed:

  • Add a new schema/objects/types.yaml file with definitions of the valid "object types" (e.g., suffixes, metadata fields) within the schema. This gives each a name and description.
  • Additionally, try to define valid fields for different object types.
    • For example, columns and metadata fields may have a number of fields describing the value types, such as "boolean" or "number", while associated data only have names and descriptions.

To do:

  • I still need to figure out how to actually validate the schema based on the new rules.

@tsalo tsalo added the schema Issues related to the YAML schema representation of the specification. Patch version release. label Mar 30, 2022
@codecov
Copy link

codecov bot commented Mar 30, 2022

Codecov Report

Merging #1048 (98b53e3) into master (73d9968) will increase coverage by 4.13%.
The diff coverage is 100.00%.

❗ Current head 98b53e3 differs from pull request most recent head dfb8767. Consider uploading reports for the commit dfb8767 to get more accurate results

@@            Coverage Diff             @@
##           master    #1048      +/-   ##
==========================================
+ Coverage   88.09%   92.22%   +4.13%     
==========================================
  Files           6       10       +4     
  Lines         974     1145     +171     
==========================================
+ Hits          858     1056     +198     
+ Misses        116       89      -27     
Impacted Files Coverage Δ
tools/schemacode/bidsschematools/schema.py 82.95% <100.00%> (+2.26%) ⬆️
tools/schemacode/bidsschematools/utils.py 73.00% <0.00%> (-7.00%) ⬇️
tools/schemacode/bidsschematools/validator.py 92.98% <0.00%> (-1.56%) ⬇️
tools/schemacode/bidsschematools/render.py 93.04% <0.00%> (-0.09%) ⬇️
tools/schemacode/bidsschematools/__init__.py 100.00% <0.00%> (ø)
tools/schemacode/bidsschematools/__main__.py
...schemacode/bidsschematools/tests/test_validator.py 100.00% <0.00%> (ø)
tools/schemacode/bidsschematools/tests/conftest.py 91.66% <0.00%> (ø)
...ls/schemacode/bidsschematools/tests/test_schema.py 100.00% <0.00%> (ø)
...ls/schemacode/bidsschematools/tests/test_render.py 100.00% <0.00%> (ø)
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

name: Metadata Field
description: |
A field that may be present in a BIDS sidecar JSON file.
definition:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the most extensive "definition," so I think it's the best one to focus on as we determine if this structure is any good.

@effigies
Copy link
Collaborator

Feels out of scope for the current sprint. We will not likely parse this in any first implementations, but might be worth revisiting once the schema is finalized.

@tsalo tsalo added the schema-structure Changes to the fundamental organization/structure of the YAML schema. Minor version release. label Apr 11, 2022
Comment on lines 22 to 25
- format
- unit
- enum
- pattern
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I define these and other fields in this file as well?

@tsalo tsalo closed this Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
schema Issues related to the YAML schema representation of the specification. Patch version release. schema-structure Changes to the fundamental organization/structure of the YAML schema. Minor version release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants