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

Only generate new uuid if not already a valid one #526

Conversation

francescalb
Copy link
Collaborator

Description:

When asking to sync_attributes with the uuid name_policy the name is regenerated for all, even if the alrealy have a valid name within this name_policy. This makes it impossible to add to an already existing ontology.

Type of change:

  • Bug fix.
  • 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:

@codecov-commenter
Copy link

Codecov Report

Merging #526 (591511b) into master (dd7ea07) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #526      +/-   ##
==========================================
+ Coverage   65.46%   65.49%   +0.03%     
==========================================
  Files          16       16              
  Lines        3081     3084       +3     
==========================================
+ Hits         2017     2020       +3     
  Misses       1064     1064              
Impacted Files Coverage Δ
ontopy/ontology.py 70.03% <100.00%> (+0.13%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@jesper-friis jesper-friis left a comment

Choose a reason for hiding this comment

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

I will suggest to check that obj.name starts with name_prefix. Except for that I think this is the right fix.

I approve to not cause unnecessarily delays.

@francescalb francescalb merged commit c3f5403 into master Jan 19, 2023
@francescalb francescalb deleted the 525-sync_attributes-according-to-emmo-convention-regenerates-a-new-iri-even-if-it-already-has-a-valid-one branch January 19, 2023 16:57
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.

sync_attributes according to emmo convention regenerates a new iri even if it already has a valid one
3 participants