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

Add functionality for setting name part of IRI to prefLabel #399

Merged
merged 9 commits into from
Apr 27, 2022

Conversation

jesper-friis
Copy link
Collaborator

@jesper-friis jesper-friis commented Apr 10, 2022

fix #398

Description:

Added --rename-iris and --annotate-source options of ontoconvert.
In order to allow combining these options with with the --squash, --recursive and --reasoner options, the --squash and --recursive functionality had to be moved into Ontology.save(), which made this PR ending up being quite large... It didn't became better, when I realised that the Owlready2 currently completely messes up the ontology when adding new relations from the reasoner...

Changes:

  • implemented ontopy.utils.rename_iris()
  • implemented ontopy.utils.annotate_sources()
  • improved writing of catalog files
  • added recursive, squash and write_catalog_file keyword arguments to Ontology.save()
  • cleaned up Ontology.sync_reasoner()
  • added new options to the ontoconvert tool
  • added a workaround to ontoconvert for correct reasoning using rdflib - if the related bug in Owlready2 is not fixed soon, we should consider to add a correct implementation of owlready2.reasoning._apply_reasoning_results() to EMMOntoPy.

Type of change:

  • Bug fix.
  • [ x] New feature.
  • Documentation 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:

@jesper-friis jesper-friis changed the title WIP: Add functionality for setting name part of IRI to prefLabel Add functionality for setting name part of IRI to prefLabel Apr 24, 2022
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.

Remove uneccesary functions that remain in utils so that we do not do the same things wtice in two different places.

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.

Also a test is needed

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.

Looks good. I think the has_triple and get_triples can be made as general utility functions. I suggest adding an Issue on that referring to the code here.

@francescalb francescalb merged commit 5cdb24e into master Apr 27, 2022
@francescalb francescalb deleted the rename-iri branch April 27, 2022 07:28
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.

Add functionality for setting name part of IRI to prefLabel
2 participants