-
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
Handle owlready2:python_names in genated triples in excelparser #795
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #795 +/- ##
==========================================
+ Coverage 72.54% 72.61% +0.06%
==========================================
Files 18 18
Lines 3701 3706 +5
==========================================
+ Hits 2685 2691 +6
+ Misses 1016 1015 -1 ☔ View full report in Codecov by Sentry. |
ontopy/excelparser.py
Outdated
# Remove triples with predicate 'python_name' added by owlready2i>0.45 | ||
onto._del_data_triple_spod( # pylint: disable=protected-access | ||
p=onto._abbreviate( # pylint: disable=protected-access | ||
"http://www.lesfleursdunormal.fr/static/_downloads/" | ||
"owlready_ontology.owl#python_name" | ||
) | ||
) |
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.
If create_ontology_from_pandas()
is called with an input_ontology
, then this will modify the input ontology. I suggest that you on line 314 replaces onto = input_ontology
with onto = input_ontology.copy()` to ensure that we are not modifying the input 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.
Hmmm, in that case we should not remove the triples with python_name coming from the input_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.
See the comment. Otherwise, looks fine.
Description
EMMOntoPy tests fail with owlready0.45 and higher.
I want to fix one owlready release at a time, since there seem to be different things that are
incompatible going up to v0.48.
In v 0.45 owlready2 introduced the python names defined with the predicate "http://www.lesfleursdunormal.fr/static/_downloads/owlready_ontology.owl#python_name"
in the ontology. These should not be part of the generated ontology and have therefore been removed
in the ontology generated with the excelparser.
Previously I had problems with this predicate also being used in the saved ontologies, but this seems not to be the case anymore.
Type of change
Checklist
This checklist can be used as a help for the reviewer.
Comments