-
Notifications
You must be signed in to change notification settings - Fork 7
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
Implement support for library schemas #75
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
happy5214
added
enhancement
New feature or request
bids
BIDS integration
hed 3
HED 3-specific issues
validation
Tag validation issues
schema
Schema parsing
parsing
String parsing
labels
Jun 7, 2022
I did a quick local test by running the HED-3G schema parsing tests using the |
happy5214
force-pushed
the
library-schemas
branch
from
June 10, 2022 14:22
c5587cd
to
edfbfe7
Compare
Also re-enable existing test for loading remote library schemas.
This commit adds the necessary code to parse library schema nicknames from HED tags and pass them to ParsedHedTag objects. It also adds the unmatchedLibrarySchema issue for cases when a schema cannot be found. The internal converter functions have been modified to accept Schema objects instead of Schemas objects, and the public-facing ones (which were not changed for BC reasons) have been deprecated from the public API and will be made private in version 4.0.0 due to a lack of independent utility. A minor issue in the new schema loading code was also fixed, bringing it in line with the surrounding code, and some documentation was fixed. None of this code has been tested with tags using library schemas. Tests will be added in the next commit.
Also add minor documentation and code quality changes.
happy5214
force-pushed
the
library-schemas
branch
from
June 11, 2022 10:41
c288930
to
7e2a8cc
Compare
Such a failure is caused by the validator itself and is unrelated to the BIDS dataset, so it doesn't make sense to tie it with any BIDS dataset files.
This commit moves the value validation checks to the generation-specific classes. It also adds a utility property for the formatted takes-value tag on a ParsedHedTag. The tests currently fail due to an issue with Definition tags with placeholders not generating a takesValueTag in the ParsedHed3Tag object, thus leading to an undefined-pointer error. I don't have a good solution at this time.
- Use ParsedHedSubstring for unparsed tag groups. - Fix colon bug. - Fix takesValue tag bug.
Most of the tests pass, but some fail.
Also surround schema loading tests in describe block.
Also use Set for fallback schema list.
…-javascript into library-schemas
Restructured tests for library schema with Defs
This will prevent an edge case of any accidental string interpolation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bids
BIDS integration
enhancement
New feature or request
hed 3
HED 3-specific issues
parsing
String parsing
schema
Schema parsing
validation
Tag validation issues
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR will eventually contain support for validation using library schemas.