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 associated data with selectors, path components and inheritance #1548

Merged
merged 2 commits into from
Jul 11, 2023

Conversation

effigies
Copy link
Collaborator

One difficulty with validation is knowing when it is worth making the effort to load an associated file. This meta-schema is intended to hint to validators and other implementations when associations may be relevant.

It could make sense to add filename rules here, as well as indicators of whether a file can be found through inheritance (making some path components optional) or not. For example magnitude images will never be found through inheritance, but must match all entities with their corresponding fieldmap images. bval and bvec, however, can be inherited.

@effigies effigies requested a review from rwblair July 11, 2023 15:19
@effigies effigies added schema Issues related to the YAML schema representation of the specification. Patch version release. exclude-from-changelog This item will not feature in the automatically generated changelog labels Jul 11, 2023
Copy link
Member

@rwblair rwblair left a comment

Choose a reason for hiding this comment

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

Looks good! Bval and bvec are pains because they are extensions, so I still need to know implicitly that thats the part of the file name I'm replacing on. But they're the only ones and a legacy rule.

In addition to selectors we could have a target key that lists the desired parts of the filename matched by the selectors to replace. So for events:

target:
  extension: '.tsv'
  suffix: 'events'

The extension along with a boolean for inheritance would let us know how to inherit properly.

@effigies
Copy link
Collaborator Author

Bval and bvec are pains because they are extensions

I think if you implement inheritance logic based off of target, where extensions are included, they shouldn't need separate treatment.

@effigies effigies changed the title SCHEMA: Add selectors to indicate when associations must be loaded SCHEMA: Define associated data with selectors, path components and inheritance Jul 11, 2023
@effigies effigies merged commit 03bec0e into bids-standard:master Jul 11, 2023
15 checks passed
@effigies effigies deleted the schema/meta-associations branch July 11, 2023 16:21
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants