moreniius 0.2.3__tar.gz → 0.2.4__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.2.3 → moreniius-0.2.4}/.github/workflows/pip.yml +1 -1
- {moreniius-0.2.3 → moreniius-0.2.4}/.github/workflows/wheels.yml +3 -3
- {moreniius-0.2.3/src/moreniius.egg-info → moreniius-0.2.4}/PKG-INFO +1 -1
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius/mccode/instr.py +17 -1
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius/mccode/orientation.py +0 -2
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius/writer.py +0 -2
- {moreniius-0.2.3 → moreniius-0.2.4/src/moreniius.egg-info}/PKG-INFO +1 -1
- {moreniius-0.2.3 → moreniius-0.2.4}/.gitignore +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/README.md +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/pyproject.toml +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/setup.cfg +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius/__init__.py +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius/additions.py +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius/mccode/__init__.py +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius/mccode/comp.py +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius/mccode/instance.py +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius/mccode/mccode.py +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius/moreniius.py +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius/nexus_structure.py +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius/nxoff.py +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius/utils.py +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius.egg-info/SOURCES.txt +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius.egg-info/dependency_links.txt +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius.egg-info/entry_points.txt +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius.egg-info/requires.txt +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/src/moreniius.egg-info/top_level.txt +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/tests/test_motorized_positions.py +0 -0
- {moreniius-0.2.3 → moreniius-0.2.4}/tests/test_nexus_structure.py +0 -0
|
@@ -26,7 +26,7 @@ jobs:
|
|
|
26
26
|
- name: Check metadata
|
|
27
27
|
run: pipx run twine check dist/*
|
|
28
28
|
|
|
29
|
-
- uses: actions/upload-artifact@
|
|
29
|
+
- uses: actions/upload-artifact@v4
|
|
30
30
|
with:
|
|
31
31
|
path: dist/*
|
|
32
32
|
|
|
@@ -42,9 +42,9 @@ jobs:
|
|
|
42
42
|
if: github.event_name == 'release' && github.event.action == 'published'
|
|
43
43
|
|
|
44
44
|
steps:
|
|
45
|
-
- uses: actions/setup-python@
|
|
45
|
+
- uses: actions/setup-python@v5
|
|
46
46
|
|
|
47
|
-
- uses: actions/download-artifact@
|
|
47
|
+
- uses: actions/download-artifact@v4
|
|
48
48
|
with:
|
|
49
49
|
name: artifact
|
|
50
50
|
path: dist
|
|
@@ -83,8 +83,24 @@ class NXInstr:
|
|
|
83
83
|
'expression' in nx_args[0]:
|
|
84
84
|
not_expr = [x for x in nx_args[0] if x != 'expression']
|
|
85
85
|
if len(not_expr) == 1:
|
|
86
|
+
not_expr_arg = nx_args[0][not_expr[0]]
|
|
87
|
+
if isinstance(not_expr_arg, NXfield):
|
|
88
|
+
# We have and want an NXfield, but it might be missing attributes specified in the nx_kwargs
|
|
89
|
+
# Passing the keywords to the NXfield constructor versus this method is not identical,
|
|
90
|
+
# since some keyword arguments are reserved (and only some of which are noted)
|
|
91
|
+
# Explicit keywords, used in the constructor:
|
|
92
|
+
# value, name, shape, dtype, group, attrs
|
|
93
|
+
# Keywords extracted from the kwargs dict, if present (and all controlling HDF5 file attributes?):
|
|
94
|
+
# chunks, compression, compression_opts, fillvalue, fletcher32, maxshape, scaleoffset, shuffle
|
|
95
|
+
# For now, just assume all keywords provided here are _actually_ attributes for the NXfield
|
|
96
|
+
# which is an extension of a dict, but can *not* use the update method, since the __setitem__
|
|
97
|
+
# method is overridden to wrap inputs in NXattr objects :/
|
|
98
|
+
for k, v in nx_kwargs.items():
|
|
99
|
+
not_expr_arg.attrs[k] = v
|
|
100
|
+
return not_expr_arg
|
|
101
|
+
|
|
86
102
|
# TODO make this return an nx_class once we're sure that nx_kwargs is parseable (no mccode_antlr.Expr)
|
|
87
|
-
return nx_class(
|
|
103
|
+
return nx_class(not_expr_arg, **nx_kwargs)
|
|
88
104
|
else:
|
|
89
105
|
raise RuntimeError('Not sure what I should do here')
|
|
90
106
|
return nx_class(*nx_args, **nx_kwargs)
|
|
@@ -28,7 +28,6 @@ class NXPart:
|
|
|
28
28
|
pos = self.o.position()
|
|
29
29
|
if any(isinstance(c, (Expr, Value)) for c in (pos.x, pos.y, pos.z)):
|
|
30
30
|
translations = []
|
|
31
|
-
print(f'{pos.x=} {pos.y=} {pos.z=}')
|
|
32
31
|
for n, c, v in (('x', pos.x, [1, 0, 0]), ('y', pos.y, [0, 1, 0]), ('z', pos.z, [0, 0, 1])):
|
|
33
32
|
if c != Expr.parse('0'):
|
|
34
33
|
next_name = f'{name}_{n}'
|
|
@@ -51,7 +50,6 @@ class NXPart:
|
|
|
51
50
|
print(repr(self.o))
|
|
52
51
|
raise NotImplementedError()
|
|
53
52
|
|
|
54
|
-
# print(f'rotation {axis}, {angle}')
|
|
55
53
|
# handle the case where angle is not a constant?
|
|
56
54
|
return self.make_nx(NXfield, angle, vector=axis, depends_on=dep, transformation_type='rotation', units=angle_unit)
|
|
57
55
|
|
|
@@ -113,7 +113,6 @@ class Writer:
|
|
|
113
113
|
if absolute_depends_on and 'depends_on' == name and not obj.nxdata.startswith('/'):
|
|
114
114
|
obj.nxdata = _to_absolute(top_obj.nxpath, obj.nxdata)
|
|
115
115
|
if obj.nxclass == 'NXfield':
|
|
116
|
-
# print(f'to_json_dict for NXfield {name=}')
|
|
117
116
|
typ, val = convert_types(obj.nxdata, only_nx)
|
|
118
117
|
# typ is None if obj.nxdata is a NotNXdict (such that val _is_ the contained dict)
|
|
119
118
|
entry = dict(module='dataset', config=dict(name=name, values=val, type=typ)) if typ else val
|
|
@@ -123,7 +122,6 @@ class Writer:
|
|
|
123
122
|
if len(list(obj)):
|
|
124
123
|
entry['children'] = self._to_json_dict(obj, only_nx=only_nx, absolute_depends_on=absolute_depends_on)
|
|
125
124
|
for n, v in obj.attrs.items():
|
|
126
|
-
# print(f'to_json_dict for attribute of {name=}, named {n=}')
|
|
127
125
|
typ, val = convert_types(v, only_nx)
|
|
128
126
|
if absolute_depends_on and n == 'depends_on' and '/' != val[0]:
|
|
129
127
|
val = _to_absolute(top_obj.nxpath, val)
|
|
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
|