-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add parsing of data-validation yaml files #366
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small comments in line but already good to merge.
data_validator.validate_with_definition(dsd) | ||
|
||
# validating against a DataStructure without the offending dimension passes | ||
dsd = DataStructureDefinition( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're already testing a compliant DataValidator
above in test_DataValidator_from_file
so I'd say you can remove those lines from the test and just test for the error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, the idea here was to test here that really only the dimensions are tested where a codelist exists in the DataStructureDefinition. Tried to explain that in the docstring, but not clear enough, I guess...
Co-authored-by: Philip Hackstock <20710924+phackstock@users.noreply.github.com>
Co-authored-by: Philip Hackstock <20710924+phackstock@users.noreply.github.com>
This PR adds a class
DataValidator
, enables parsing the validation criteria from a yaml file and makes sure that the filter criteria are defined in a DataStructureDefinition (only if that dimension is defined there).