-
Notifications
You must be signed in to change notification settings - Fork 26
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
Enable single rule disjunction #1369
Conversation
protectAges
or inRange
to be modified with IsNA
protectAges
or inRange
to be modified with IsNA
protectAges
and inRange
rules to be modified with IsNA
protectAges
and inRange
rules to be modified with IsNA
@andrewelamb thank you for your comments but this PR was not ready for review; it is still a work in progress. #1366 was what I presented in code review yesterday; this is the one I said I would tag you and @/mialy-defelice in when it was complete and ready to be reviewed |
Oops! Sorry about that, you are right. |
9128b28
to
ba914ea
Compare
7164415
to
dcd8a68
Compare
This reverts commit 85c1443.
3d8a8f2
to
6c7e2a4
Compare
yield dmge | ||
|
||
@pytest.fixture(name="missing_dmge") | ||
def missingDMGE(helpers): |
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.
This is minor but can you change this naming to something more descriptive? The way it reads is a bit confusing.
Maybe something like missing_value_model_DMGE
yield metadataModel | ||
|
||
@pytest.fixture | ||
def missingMetadataModel(helpers): |
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.
same comment as above but in this case something like: missing_value_model_MetadataModel
@GiaJordan
With the model:
The multiple types error handling should be updated to allow for a rule combo to be paired with |
Also if you run:
with the
Im guessing that in |
val_rule.__contains__("matchAtLeastOne") | ||
and len(present_manifest_log) < 1 | ||
): | ||
aggregation_functions = { |
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.
For function clarity can you move this into its own function?
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.
Will deal with these functions when this branch merges with the matchNone branch.
This will now be merged directly to dev. |
…bool, to look for errors
... Fixed this issue. |
Okay, looking through the tests it looks like this is expected, but Its unclear why... need to investigate further... |
Okay, I think this is bc the error was anticipated but decided that it was within the acceptance criteria. We are going to allow NA to be used with other rule combos, so for now will need to adjust the number of allowable rules, update testing to no longer allow this error to be considered passing. |
…rom unimplemented expectations list, its handled differently now
|
Changelog
This PR enables single rule disjunction for the existing validation rules through the
IsNA
rule modifier. It can be used with each rule except therecommended
rule by including it in the specification for validation rules as another rule (ie with the::
operator).When in use, Validation rules will raise an error or warning or no message as appropriate for each metadata entry that is provided, and will not raise any message for metadata entries that are omitted. The attribute should be marked as
FALSE
for theREQUIRED
column in the data model to use this modifier.A data model specific to these requirements has been created to monitor the status of each rule combined with this modifier and tests have been created as well.
Note for Reviewers:
The line endings for some files were changed and so the diffs can show entire file changes as part of this PR. Before you begin reviewing, under

Files changed>Settings
toggleHide Whitespace
to ON to get an accurate record of what actual code was changed.