-
Notifications
You must be signed in to change notification settings - Fork 4
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
Diverse Validation enhancements #31
Conversation
RichardBruskiewich
commented
Aug 11, 2022
- Node categories screened for deprecation, mixin and abstract nature
- Edge attribute_type_id screened for status as a biolink:association_slot etc. (issue Add Biolink Model validation depth to Edge attribute (constraint) validation #19)
… change since validation method doesn't yet exist in BMT! Just saving the intent for now...)
… change since validation method doesn't yet exist in BMT! Just saving the intent for now...)
…on' into issue-19-edge-attribute-validation
…olink_version parameter to be more explicitly Optional[str]
…ink validation of test input edges to check for deprecated classes
…input edge validation and also, reuse common code in graph validations; unit test messages fixed
…refix (already testing if it is a proper association_slot)
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.
Did not examine super carefully, but looks reasonable to me, thanks!
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.
I did not thoroughly run/test the code but things look pretty clean.
else: | ||
# TODO: attempt some deeper attribute validation here | ||
for attribute in attributes: | ||
attribute_type_id: str = attribute['attribute_type_id'] |
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.
is attribute.get('attribute_type_id', None) necessary here or can we assume this key exists due to prior validation?
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.
yes, good idea. I should also check for a non-None 'value' field as well.
# | ||
if not self.is_curie(attribute_type_id): | ||
self.report_error( | ||
f"Edge '{edge_id}' attribute_type_id '{str(attribute_type_id)}' is not a CURIE?" |
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.
I would say warning is probably more beneficial as attributes_types are not always well standardized.
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.
At the moment, all discrepancies are reported as 'error' but Eric has made the same point, and also, some normalization of errors into an index set of error codes (with parameters) is on the near term horizon, maybe over the next few days. Afterwards, it may be useful to decide which items are absolute errors, and which could be warnings or even info items.
…omponents; check for missing TRAPI Attribute 'attribute_type_id' and 'value' fields.