File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ def format_dict(
31
31
32
32
Notes:
33
33
This method works with the dict-representation and does not
34
- access instances. The only exception is when `d` correspond to
34
+ access instances. The only exception is when `d` corresponds to
35
35
a data instance who's dimensions is a list of dimension lengths.
36
36
In this case is the metadata needed to get dimension names.
37
37
Original file line number Diff line number Diff line change 14
14
15
15
16
16
# Test format_dict(), arg: soft7
17
- D1 = {
17
+ D1 = { # soft7 representation
18
18
"uri" : "http://onto-ns.com/meta/ex/0.2/Test" ,
19
19
"dimensions" : {"n" : "number of something" },
20
20
"properties" : {
21
21
"a" : {"type" : "string" },
22
22
"b" : {"type" : "float64" , "shape" : ["n" ]},
23
23
},
24
24
}
25
- D2 = {
25
+ D2 = { # old (array) representation
26
26
"uri" : "http://onto-ns.com/meta/ex/0.2/Test" ,
27
27
"dimensions" : [{"name" : "n" , "description" : "number of something" }],
28
28
"properties" : [
35
35
assert dlite .format_dict (D2 , soft7 = True ) == D1
36
36
assert dlite .format_dict (D2 , soft7 = False ) == D2
37
37
38
+ # soft7 representation. This is identical to the old representation for
39
+ # data instances
38
40
d1 = {
39
41
"uuid" : "d6a1c1db-44b6-5b87-b815-83f1127395b6" ,
40
42
"meta" : "http://onto-ns.com/meta/ex/0.2/Test" ,
44
46
"b" : [1.1 , 2.2 , 3.3 ],
45
47
},
46
48
}
47
- d2 = {
49
+ d2 = { # old representation
48
50
"uuid" : "d6a1c1db-44b6-5b87-b815-83f1127395b6" ,
49
51
"meta" : "http://onto-ns.com/meta/ex/0.2/Test" ,
50
52
"dimensions" : {"n" : 3 },
Original file line number Diff line number Diff line change 1
1
importlib-metadata==6.8.0; python_version<'3.8'
2
-
3
2
beautifulsoup4==4.12.3
4
3
breathe==4.35.0
5
4
docutils==0.21.2
You can’t perform that action at this time.
0 commit comments