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: Add data array accessor to context #1609

Closed
wants to merge 1 commit into from

Conversation

effigies
Copy link
Collaborator

@effigies effigies commented Sep 8, 2023

This is a formality, as nobody is actually dynamically building a context from schema.meta.context, but we have a couple rules that require access to the data array shape:

# 30
DWIBvalRows:
issue:
code: BVAL_MULTIPLE_ROWS
message: |
'.bval' files should contain exactly one row of values.
level: error
selectors:
- extension == ".bval"
checks:
- data.n_rows == 1
# 31
DWIBvecRows:
issue:
code: BVEC_NUMBER_ROWS
message: |
'.bvec' files should contain exactly three rows of values.
level: error
selectors:
- extension == ".bvec"
checks:
- data.n_rows == 3

I have implemented this in the JS validator as part of https://github.com/bids-standard/bids-validator/pull/1797.

It is not future-proof, but we reserve the option to make breaking changes to the schema.

@effigies effigies added 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. exclude-from-changelog This item will not feature in the automatically generated changelog labels Sep 8, 2023
@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (fc98780) 87.83% compared to head (ffe28ff) 87.83%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1609   +/-   ##
=======================================
  Coverage   87.83%   87.83%           
=======================================
  Files          16       16           
  Lines        1356     1356           
=======================================
  Hits         1191     1191           
  Misses        165      165           

☔ View full report in Codecov by Sentry.

📢 Have feedback on the report? Share it here.

@effigies
Copy link
Collaborator Author

effigies commented Oct 2, 2023

Superseded by #1622.

@effigies effigies closed this Oct 2, 2023
@effigies effigies deleted the schema/context-data branch October 2, 2023 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude-from-changelog This item will not feature in the automatically generated changelog 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.

1 participant