moreniius 0.6.3__tar.gz → 0.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {moreniius-0.6.3/src/moreniius.egg-info → moreniius-0.7.0}/PKG-INFO +1 -1
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius/mccode/instr.py +4 -1
- {moreniius-0.6.3 → moreniius-0.7.0/src/moreniius.egg-info}/PKG-INFO +1 -1
- {moreniius-0.6.3 → moreniius-0.7.0}/tests/test_motorized_positions.py +19 -24
- {moreniius-0.6.3 → moreniius-0.7.0}/.github/dependabot.yml +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/.github/workflows/pip.yml +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/.github/workflows/wheels.yml +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/.gitignore +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/README.md +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/pyproject.toml +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/setup.cfg +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius/__init__.py +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius/additions.py +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius/mccode/__init__.py +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius/mccode/comp.py +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius/mccode/instance.py +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius/mccode/mccode.py +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius/mccode/orientation.py +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius/moreniius.py +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius/nexus_structure.py +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius/nxoff.py +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius/utils.py +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius/writer.py +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius.egg-info/SOURCES.txt +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius.egg-info/dependency_links.txt +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius.egg-info/entry_points.txt +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius.egg-info/requires.txt +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/src/moreniius.egg-info/top_level.txt +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/tests/test_elliptic_guide_gravity.py +0 -0
- {moreniius-0.6.3 → moreniius-0.7.0}/tests/test_nexus_structure.py +0 -0
|
@@ -103,7 +103,10 @@ class NXInstr:
|
|
|
103
103
|
# TODO make this return an nx_class once we're sure that nx_kwargs is parseable (no mccode_antlr.Expr)
|
|
104
104
|
if all(x in not_expr_arg for x in ('module', 'config')):
|
|
105
105
|
# This is a file-writer stream directive? So make a group
|
|
106
|
-
|
|
106
|
+
grp = NXgroup(entries={not_expr[0]: not_expr_arg})
|
|
107
|
+
for attr, val in nx_kwargs.items():
|
|
108
|
+
grp.attrs[attr] = val
|
|
109
|
+
return grp
|
|
107
110
|
print('!!')
|
|
108
111
|
print(not_expr_arg)
|
|
109
112
|
return nx_class(not_expr_arg, **nx_kwargs)
|
|
@@ -51,8 +51,11 @@ def test_motorized_instrument():
|
|
|
51
51
|
zrot = ns['children'][4]
|
|
52
52
|
aposrot = ns['children'][5]
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
deps = {
|
|
55
|
+
'xpos_t0_x': ('.', [1, 0, 0], 'translation'),
|
|
56
|
+
'zrot_t0_x': ('.', [1, 0, 0], 'translation'),
|
|
57
|
+
'zrot_r0': ('/entry/instrument/zrot/transformations/zrot_t0_x', [0, 0, 1], 'rotation'),
|
|
58
|
+
}
|
|
56
59
|
|
|
57
60
|
for cns in (xpos, zrot, aposrot):
|
|
58
61
|
assert 'children' in cns
|
|
@@ -78,11 +81,20 @@ def test_motorized_instrument():
|
|
|
78
81
|
assert all(x in c for x in ('name', 'type', 'children', 'attributes'))
|
|
79
82
|
assert 'group' == c['type']
|
|
80
83
|
attrs = c['attributes']
|
|
81
|
-
assert len(attrs) ==
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
assert len(attrs) == 5
|
|
85
|
+
|
|
86
|
+
dep = deps[c['name']]
|
|
87
|
+
d = {
|
|
88
|
+
'NX_class': 'NXgroup',
|
|
89
|
+
'depends_on': dep[0],
|
|
90
|
+
'vector': dep[1],
|
|
91
|
+
'transformation_type': dep[2],
|
|
92
|
+
'units': 'm' if dep[2] == 'translation' else 'degrees',
|
|
93
|
+
}
|
|
94
|
+
for k, v in d.items():
|
|
95
|
+
assert sum(a['name'] == k for a in attrs) == 1
|
|
96
|
+
attr = next(a for a in attrs if a['name'] == k)
|
|
97
|
+
assert attr['values'] == v
|
|
86
98
|
|
|
87
99
|
# The children should contain a link to the log ... is the order important?
|
|
88
100
|
# Must the number of children always be the same?
|
|
@@ -91,20 +103,3 @@ def test_motorized_instrument():
|
|
|
91
103
|
for cc in c['children']:
|
|
92
104
|
if 'link' == cc['module']:
|
|
93
105
|
assert all(x in cc['config'] for x in ('name', 'source'))
|
|
94
|
-
else:
|
|
95
|
-
assert all(x in cc['config'] for x in ('name', 'values', 'type'))
|
|
96
|
-
assert cc['config']['name'] in ('vector', 'depends_on', 'transformation_type', 'units')
|
|
97
|
-
|
|
98
|
-
# for name, has in expected.items():
|
|
99
|
-
# print({x : list(ns[x]) for x in ns})
|
|
100
|
-
# assert all(x in ns for x in has)
|
|
101
|
-
# assert len(ns['children']) == 1
|
|
102
|
-
# assert ns['name'] == name
|
|
103
|
-
# ns = ns['children'][0]
|
|
104
|
-
|
|
105
|
-
#
|
|
106
|
-
# instr = ns['entry']['instrument']
|
|
107
|
-
# #
|
|
108
|
-
# print(dumps(xpos, indent=2))
|
|
109
|
-
# print(dumps(zrot, indent=1))
|
|
110
|
-
# print(dumps(aposrot, indent=1))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|