Skip to content

Commit

Permalink
Merge branch 'validate-multiple-instances' into 1000-jstore-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jesper-friis authored Nov 6, 2024
2 parents ace8e1f + 1d4c0db commit bfe065b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bindings/python/dlite-jstore-python.i
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def format_dict(
Notes:
This method works with the dict-representation and does not
access instances. The only exception is when `d` correspond to
access instances. The only exception is when `d` corresponds to
a data instance who's dimensions is a list of dimension lengths.
In this case is the metadata needed to get dimension names.
Expand Down
8 changes: 5 additions & 3 deletions bindings/python/tests/test_jstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@


# Test format_dict(), arg: soft7
D1 = {
D1 = { # soft7 representation
"uri": "http://onto-ns.com/meta/ex/0.2/Test",
"dimensions": {"n": "number of something"},
"properties": {
"a": {"type": "string"},
"b": {"type": "float64", "shape": ["n"]},
},
}
D2 = {
D2 = { # old (array) representation
"uri": "http://onto-ns.com/meta/ex/0.2/Test",
"dimensions": [{"name": "n", "description": "number of something"}],
"properties": [
Expand All @@ -35,6 +35,8 @@
assert dlite.format_dict(D2, soft7=True) == D1
assert dlite.format_dict(D2, soft7=False) == D2

# soft7 representation. This is identical to the old representation for
# data instances
d1 = {
"uuid": "d6a1c1db-44b6-5b87-b815-83f1127395b6",
"meta": "http://onto-ns.com/meta/ex/0.2/Test",
Expand All @@ -44,7 +46,7 @@
"b": [1.1, 2.2, 3.3],
},
}
d2 = {
d2 = { # old representation
"uuid": "d6a1c1db-44b6-5b87-b815-83f1127395b6",
"meta": "http://onto-ns.com/meta/ex/0.2/Test",
"dimensions": {"n": 3},
Expand Down
1 change: 0 additions & 1 deletion requirements_doc.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
importlib-metadata==6.8.0; python_version<'3.8'

beautifulsoup4==4.12.3
breathe==4.35.0
docutils==0.21.2
Expand Down

0 comments on commit bfe065b

Please sign in to comment.