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

Allow controling ontology IRI when saving #700

Merged
merged 7 commits into from
Jan 19, 2024
Merged

Allow controling ontology IRI when saving #700

merged 7 commits into from
Jan 19, 2024

Conversation

jesper-friis
Copy link
Collaborator

@jesper-friis jesper-friis commented Jan 16, 2024

Description

Allow separating the IRI of the ontology from base_iri when saving using rdflib.

Unfortunately owlready2 doesn't allow to separate the IRI of the ontology from the base_iri (the namespace of the entities in the ontology). In many ontologies, e.g. EMMO, are these not the same.

Further work: Also assign the ontology IRI when loading an ontology.

An even better solution would be to ask Jean-Baptiste to add support for separate ontology iri and base_iri to Owlready2.

Type of change

  • Bug fix.
  • New feature.
  • Documentation update.
  • Test update.

Checklist

This checklist can be used as a help for the reviewer.

  • Is the code easy to read and understand?
  • Are comments for humans to read, not computers to disregard?
  • Does a new feature has an accompanying new test (in the CI or unit testing schemes)?
  • Has the documentation been updated as necessary?
  • Does this close the issue?
  • Is the change limited to the issue?
  • Are errors handled for all outcomes?
  • Does the new feature provide new restrictions on dependencies, and if so is this documented?

Comments

Allow separating the IRI of the ontology from base_iri when saving
using rdflib.
Copy link

codecov bot commented Jan 16, 2024

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (ada4ea5) 71.30% compared to head (70f6c7b) 71.27%.

Files Patch % Lines
ontopy/ontology.py 50.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #700      +/-   ##
==========================================
- Coverage   71.30%   71.27%   -0.03%     
==========================================
  Files          16       16              
  Lines        3394     3405      +11     
==========================================
+ Hits         2420     2427       +7     
- Misses        974      978       +4     

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

Copy link
Collaborator

@francescalb francescalb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good. I have only one suggestion, which is to remove the file you create if it is there already.
See the comments.

jesper-friis and others added 4 commits January 18, 2024 14:07
Co-authored-by: Francesca L. Bleken <48128015+francescalb@users.noreply.github.com>
Co-authored-by: Francesca L. Bleken <48128015+francescalb@users.noreply.github.com>
@francescalb francescalb merged commit 9df0345 into master Jan 19, 2024
10 of 12 checks passed
@francescalb francescalb deleted the ontology-iri branch January 19, 2024 09: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.

2 participants