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

Importing rdfs schemas #814

Merged
merged 25 commits into from
Dec 16, 2024
Merged

Importing rdfs schemas #814

merged 25 commits into from
Dec 16, 2024

Conversation

francescalb
Copy link
Collaborator

@francescalb francescalb commented Dec 4, 2024

Description

Partially closes #811.
Closes #797

I is not possible to easily access classes of typ rdfs:Class. This is needed if working simultaneously with an rdf-schema (as opposed to an owl ontology). Owlready2 does not search for enties that are not of type owl:XXX.
A search for rdfs:Class is now added so that when asking for classes in an ontology also the rdfs:Class'es are returned as Python objects.

This is not as readily fixed with rdfs:Property. As a first fix, such properties are now returned as a list of strings (instead of a list of python objcets). Note that the nodes are present in the onotology, but the rdfs:Poerty is not cast as a python object.

Owlready2 is designed to support owl ontologies (not rdfs). If we really want to extend the suport for rdfs:Property the best solution is most likely to cast it to an owl:Annotation_property. If so this should be done in a next PR .

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 80.76923% with 5 lines in your changes missing coverage. Please review.

Project coverage is 72.99%. Comparing base (de542a3) to head (401f1d7).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
ontopy/ontology.py 80.76% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #814      +/-   ##
==========================================
+ Coverage   72.90%   72.99%   +0.09%     
==========================================
  Files          18       18              
  Lines        3790     3814      +24     
==========================================
+ Hits         2763     2784      +21     
- Misses       1027     1030       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

ontopy/ontology.py Outdated Show resolved Hide resolved
@francescalb francescalb marked this pull request as ready for review December 14, 2024 14:46
@francescalb francescalb merged commit a64ffe3 into master Dec 16, 2024
12 checks passed
@francescalb francescalb deleted the flb/addsearch_of_rdfclass branch December 16, 2024 10:34
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.

Loading non-emmo-related ontologies The test for load_foaf is bypassed.
2 participants