-
Notifications
You must be signed in to change notification settings - Fork 6
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
Validate multiple instances #986
base: master
Are you sure you want to change the base?
Conversation
… into validate-multiple-instances
bindings/python/tests/test_jstore.py
Outdated
d1 = { | ||
"uuid": "d6a1c1db-44b6-5b87-b815-83f1127395b6", | ||
"meta": "http://onto-ns.com/meta/ex/0.2/Test", | ||
"dimensions": {"n": 3}, | ||
"properties": { | ||
"a": "hello", | ||
"b": [1.1, 2.2, 3.3], | ||
}, | ||
} | ||
d2 = { | ||
"uuid": "d6a1c1db-44b6-5b87-b815-83f1127395b6", | ||
"meta": "http://onto-ns.com/meta/ex/0.2/Test", | ||
"dimensions": {"n": 3}, | ||
"properties": { | ||
"a": "hello", | ||
"b": [1.1, 2.2, 3.3], | ||
}, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference between these two?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good observation. You are right, for data instances there are no difference between the old and soft7 representations. I added a comment about this to the test
Co-authored-by: Francesca L. Bleken <48128015+francescalb@users.noreply.github.com>
… into validate-multiple-instances
Description
Update
dlite-validate
to validate sources with multiple instances, without having to provide the--id
option.This PR build on top of PR #985.
Update: Added new Python interface to the jstore implemented in C. Right now this increases the code base, but this change makes it possible to e.g. reduce
utils.instance_from_dict()
andInstance.asdict()
to a few lines of code. An added benefit would be consistency with JSON parsing (since the json parser in C is used under the hood).Suggests to take the code removal/replacement in a separate PR to have little more control over changes.
Type of change
Checklist for the reviewer
This checklist should be used as a help for the reviewer.