-
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
Update to comply with owlready2>0.41 #639
Update to comply with owlready2>0.41 #639
Conversation
NB! Still missing how to handle get_by_labelfrom imported ontologies
It was needed to udate the search for annotation property seach with getattr for ThingClass
We should be in ontopy.Ontology if we want to use get_by_label and not owlready2 Ontology
Codecov Report
@@ Coverage Diff @@
## master #639 +/- ##
==========================================
+ Coverage 69.49% 69.80% +0.30%
==========================================
Files 16 16
Lines 3350 3361 +11
==========================================
+ Hits 2328 2346 +18
+ Misses 1022 1015 -7
|
from utilities import setassert | ||
|
||
|
||
def test_get_by_label_onto(emmo: "Ontology") -> None: |
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.
What version of EMMO does the emmo
argument correspond to? Does it correspond to a stable tag or will it change with time?
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.
It imporst 1.0.0-beta4 (this is currently the default in get_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.
Ok. Since the pytest fixtures are so opaque, it might be good to add a comment saying this (since we might have to update the tests when get_ontology() is updated to return a newer version of EMMO).
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 do not agree that they are opaque, but to make it more readily clear I added a comment in the emmo fixture on conftest.
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.
Nice. Added some comments
Description
Olwready2 has changed so that when asking for an attribute it returns its name as a locstr (e.g. locstr('Atom', 'en')) instead of jsut the string (e.g. 'Atom'). This enables differentiating between languages.
locstr inherits from str so mostly it does not change much, except that the output looks different.
A setassert function was made to help testing.
Type of change
Checklist
This checklist can be used as a help for the reviewer.
Comments