-
Notifications
You must be signed in to change notification settings - Fork 11
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
Added test for descriptions #766
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #766 +/- ##
==========================================
- Coverage 73.16% 72.54% -0.62%
==========================================
Files 18 18
Lines 3678 3701 +23
==========================================
- Hits 2691 2685 -6
- Misses 987 1016 +29 ☔ View full report in Codecov by Sentry. |
emmopy/emmocheck.py
Outdated
A description is either an elucidation, a definition or a | ||
conceptualisation. |
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.
A description is either an elucidation, a definition or a | |
conceptualisation. | |
A description is either an EMMO.elucidation, an EMMO.definition or an | |
EMMO.conceptualisation. |
emmopy/emmocheck.py
Outdated
"ontology has no description (elucidation, definition or " | ||
"conceptualisation)" |
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.
"ontology has no description (elucidation, definition or " | |
"conceptualisation)" | |
"ontology has no description (EMMO.elucidation, EMMO.definition or " | |
"EMMO.conceptualisation)" |
emmopy/emmocheck.py
Outdated
with self.subTest(entity=entity, label=label): | ||
self.assertTrue( | ||
hasattr(entity, "elucidation"), | ||
msg="no 'elucidation' in ontology", |
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.
msg="no 'elucidation' in ontology", | |
msg="no 'elucidation' in ontology", |
msg="no 'elucidation' in ontology", | |
msg=f"{entity} has no 'EMMO.elucidation' ", |
emmopy/emmocheck.py
Outdated
) | ||
self.assertTrue( | ||
hasattr(entity, "definition"), | ||
msg="no 'definition' in ontology", |
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.
msg="no 'definition' in ontology", | |
msg=f"{entity} has no 'EMMO.definition'", |
emmopy/emmocheck.py
Outdated
) | ||
self.assertTrue( | ||
hasattr(entity, "conceptualisation"), | ||
msg="no 'conceptualisation' in ontology", |
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.
msg="no 'conceptualisation' in ontology", | |
msg=f"{entity} has no 'conceptualisation'", |
emmopy/emmocheck.py
Outdated
msg="missing description (elucidation, deinition and/or " | ||
f"conceptualidation): {label}", |
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.
msg="missing description (elucidation, deinition and/or " | |
f"conceptualidation): {label}", | |
msg="missing description (EMMO.elucidation, EMMO.definition and/or " | |
f"EMMO.conceptualidation): {label}", |
emmopy/emmocheck.py
Outdated
) | ||
self.assertTrue( | ||
len(entity.elucidation) < 2, | ||
msg=f"more than one elucidation for {label}", |
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.
msg=f"more than one elucidation for {label}", | |
msg=f"more than one EMMO.elucidation for {label}", |
emmopy/emmocheck.py
Outdated
) | ||
self.assertTrue( | ||
len(entity.definition) < 2, | ||
msg=f"more than one definition for {label}", |
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.
msg=f"more than one definition for {label}", | |
msg=f"more than one EMMO.definition for {label}", |
emmopy/emmocheck.py
Outdated
) | ||
self.assertTrue( | ||
len(entity.conceptualisation) < 2, | ||
msg=f"more than one conceptualisation for {label}", |
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.
msg=f"more than one conceptualisation for {label}", | |
msg=f"more than one EMMO.conceptualisation for {label}", |
Description
Added test for that entities should be described. We require that a entities should have at least a elucidation, definition or conceptualisation. In addition we require that each of them can max be provided once.
Also update ontoconvert to include conceptualisations the
--copy-emmo-annotations
option.Tested against EMMO during development, but no additional EMMO-dependent test has been added to the EMMOntoPy repo.
Type of change
Checklist
This checklist can be used as a help for the reviewer.
Comments