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

Diverse Validation enhancements #31

Merged
merged 15 commits into from
Aug 12, 2022
Merged

Conversation

RichardBruskiewich
Copy link
Collaborator

… 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...)
…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)
Copy link

@edeutsch edeutsch left a 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!

Copy link

@kennethmorton kennethmorton left a 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']

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?

Copy link
Collaborator Author

@RichardBruskiewich RichardBruskiewich Aug 12, 2022

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?"

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.

Copy link
Collaborator Author

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.
@RichardBruskiewich RichardBruskiewich merged commit 57a8cf8 into master Aug 12, 2022
@RichardBruskiewich RichardBruskiewich deleted the validation-enhancements branch August 12, 2022 03:43
@RichardBruskiewich RichardBruskiewich restored the validation-enhancements branch August 12, 2022 03:43
@RichardBruskiewich RichardBruskiewich deleted the validation-enhancements branch September 2, 2022 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants