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

Fixed issue with creating metadata #640

Merged
merged 6 commits into from
Oct 18, 2023
Merged

Fixed issue with creating metadata #640

merged 6 commits into from
Oct 18, 2023

Conversation

jesper-friis
Copy link
Collaborator

Description

Avoid calling dlite.Instance.__init__() when creating new metadata using the dlite.Metadata constructor, since there is no need for it (and avoids DLite calling abort() because it ends up in an unexpected case...).

Added test that both tests creation of metadata and that it is possible to create two metadata with ref-properties that cyclic refer to each other.

Type of change

  • Bug fix & code cleanup
  • New feature
  • Documentation update
  • Test update

Checklist for the reviewer

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

  • Is the change limited to one issue?
  • Does this PR close the issue?
  • Is the code easy to read and understand?
  • Do all new feature have an accompanying new test?
  • Has the documentation been updated as necessary?

jesper-friis and others added 3 commits September 10, 2023 17:42
Added test that both tests creation of metadata and that it is possible to
create two metadata with ref-properties that cyclic refer to each other.
@francescalb francescalb requested review from francescalb and removed request for francescalb October 17, 2023 09:21
@ajeklund ajeklund self-requested a review October 18, 2023 07:52
Copy link
Contributor

@ajeklund ajeklund left a comment

Choose a reason for hiding this comment

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

Thank you for the PR. I have one question and a couple of small suggestions.

bindings/python/tests/test_ref_create.py Outdated Show resolved Hide resolved
bindings/python/tests/test_ref_create.py Outdated Show resolved Hide resolved
bindings/python/dlite-entity-python.i Outdated Show resolved Hide resolved
Co-authored-by: Anders Eklund <96499163+ajeklund@users.noreply.github.com>
@jesper-friis jesper-friis requested a review from ajeklund October 18, 2023 09:39
Copy link
Contributor

@ajeklund ajeklund left a comment

Choose a reason for hiding this comment

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

Approved. Thank you!

@jesper-friis jesper-friis merged commit 555e68a into master Oct 18, 2023
11 checks passed
@jesper-friis jesper-friis deleted the create-metadata branch October 18, 2023 12:49
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