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

Fix dlite.Instance.from_dict() to correctly parse ref-type properties #983

Merged
merged 5 commits into from
Oct 28, 2024

Conversation

jesper-friis
Copy link
Collaborator

Description

This should make it possible to correctly parse YAML files with ref-type properties.

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 jesper-friis linked an issue Oct 25, 2024 that may be closed by this pull request
Top = dlite.get_instance("http://onto-ns.com/meta/0.1/Top")
Middle = dlite.get_instance("http://onto-ns.com/meta/0.1/Middle")
Middle = dlite.get_instance("http://onto-ns.com/meta/0.2/Middle")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should still test json as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We are still testing JSON, since all the other datamodels are read from input/test_ref_type.json.

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.

I reading the yaml version only available in python?

@jesper-friis
Copy link
Collaborator Author

I reading the yaml version only available in python?

Sorry, unsure what you mean here? The YAML plugin is written in Python, but it is still be used from C via the embedded interpreter.

@francescalb
Copy link
Collaborator

I reading the yaml version only available in python?

Sorry, unsure what you mean here? The YAML plugin is written in Python, but it is still be used from C via the embedded interpreter.

OK, thank you for the clarification.

@jesper-friis jesper-friis enabled auto-merge (squash) October 28, 2024 09:07
@jesper-friis jesper-friis merged commit f716ad0 into master Oct 28, 2024
14 checks passed
@jesper-friis jesper-friis deleted the parse-ref branch October 28, 2024 09:10
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.

Ref-type doesn't work with YAML
2 participants