restage 0.1.13__py3-none-any.whl → 0.1.15__py3-none-any.whl

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.
restage/splitrun.py CHANGED
@@ -217,13 +217,11 @@ def splitrun_pre(instr, parameters, grid, precision: dict[str, float],
217
217
  # from joblib import Parallel, delayed
218
218
  # Parallel(n_jobs=-3)(delayed(step)(values) for values in scan)
219
219
 
220
- # If the parameters are empty, we still need to run the simulation once:
221
- if n_pts == 0:
222
- step([])
223
- return entry
224
-
225
220
  for values in scan:
226
221
  step(values)
222
+ if n_pts == 0:
223
+ # If the parameters are empty, we still need to run the simulation once:
224
+ step([])
227
225
  return entry
228
226
 
229
227
 
@@ -279,9 +277,9 @@ def splitrun_combined(pre_entry, pre, post, pre_parameters, post_parameters, gri
279
277
  # convert, e.g., energy parameters to chopper parameters:
280
278
  pars = translate({n: v for n, v in zip(names, values)})
281
279
  # parameters for the primary instrument:
282
- primary_pars = {k: v for k, v in pars.items() if k in pre_parameters}
280
+ primary_pars = {k: v for k, v in pars.items() if pre.has_parameter(k)}
283
281
  # parameters for the secondary instrument:
284
- secondary_pars = {k: v for k, v in pars.items() if k in post_parameters}
282
+ secondary_pars = {k: v for k, v in pars.items() if post.has_parameter(k)}
285
283
  # use the parameters for the primary instrument to construct a (partial) simulation entry for matching
286
284
  primary_table_parameters = collect_parameter_dict(pre, primary_pars, strict=True)
287
285
  primary_sent = SimulationEntry(primary_table_parameters, precision=precision, **sit_kw)
@@ -300,8 +298,10 @@ def splitrun_combined(pre_entry, pre, post, pre_parameters, post_parameters, gri
300
298
  dat_lines.append(line)
301
299
  if callback is not None:
302
300
  arguments = {}
301
+ # 'names' _is_ a list already
303
302
  arg_names = names + ['number', 'n_pts', 'pars', 'dir', 'arguments']
304
- arg_values = values + [number, n_pts, pars, runtime_arguments['dir'], runtime_arguments]
303
+ # 'values' is a tuple, so we need to convert it to a list
304
+ arg_values = list(values) + [number, n_pts, pars, runtime_arguments['dir'], runtime_arguments]
305
305
  for x, v in zip(arg_names, arg_values):
306
306
  if callback_arguments is not None and x in callback_arguments:
307
307
  arguments[callback_arguments[x]] = v
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: restage
3
- Version: 0.1.13
3
+ Version: 0.1.15
4
4
  Author-email: Gregory Tucker <gregory.tucker@ess.eu>
5
5
  Classifier: License :: OSI Approved :: BSD License
6
6
  Description-Content-Type: text/markdown
7
7
  Requires-Dist: zenlog ==1.1
8
8
  Requires-Dist: platformdirs ==3.11
9
9
  Requires-Dist: psutil ==5.9.6
10
- Requires-Dist: mccode-antlr[hdf5] ==0.2.10
10
+ Requires-Dist: mccode-antlr[hdf5] ==0.2.11
11
11
  Requires-Dist: importlib-metadata ; python_version < "3.8"
12
12
  Provides-Extra: test
13
13
  Requires-Dist: pytest ; extra == 'test'
@@ -10,10 +10,10 @@ restage/mcpl.py,sha256=0F9A_edwSR9awQipicI3ipsMAJFk9zCspJhCOrmhkDg,2407
10
10
  restage/range.py,sha256=hOQsiHXSt1OEX8ZcvfmzQN4f2Mo7paX681TZCdvSkTk,8073
11
11
  restage/run.py,sha256=nk8d7cIyIqSt-5pyGm68Zak5H1a-fbo_z2_36eN-08E,1481
12
12
  restage/scan.py,sha256=Yx8OQSBG6I2_64sW0LIDb0glVKwWoxUQQznASXgDZFQ,1432
13
- restage/splitrun.py,sha256=I1UZNC4QKzkmPGNFooDh3tYRVesEcXSHaPOYM9iHb8Q,23059
13
+ restage/splitrun.py,sha256=zCm9CHoD8Jr4_Db9FFzJz3ZyV5oxUXI_UfVhmYxUrYw,23161
14
14
  restage/tables.py,sha256=VMApcu4KtsBlUvAqCSKHDZ58FXhNPihr90OU12YAejw,15764
15
- restage-0.1.13.dist-info/METADATA,sha256=wW_n22L2D77PvknnFU9Ffs69s3EoQlTd-c5PVasQ5Us,4775
16
- restage-0.1.13.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
17
- restage-0.1.13.dist-info/entry_points.txt,sha256=dY3ZanXW6rBLd2vBo-WMcbgO7E10GVDE0t9GASuVjgY,90
18
- restage-0.1.13.dist-info/top_level.txt,sha256=iM_pb-taTZ0S2WMoDnt_qDMZoNMjmM19z3tTCuVm1IE,8
19
- restage-0.1.13.dist-info/RECORD,,
15
+ restage-0.1.15.dist-info/METADATA,sha256=B9PU2Eoi92Z4P6Vv-GtOGWWTIva6Xlv01EMmawUMuow,4775
16
+ restage-0.1.15.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
17
+ restage-0.1.15.dist-info/entry_points.txt,sha256=dY3ZanXW6rBLd2vBo-WMcbgO7E10GVDE0t9GASuVjgY,90
18
+ restage-0.1.15.dist-info/top_level.txt,sha256=iM_pb-taTZ0S2WMoDnt_qDMZoNMjmM19z3tTCuVm1IE,8
19
+ restage-0.1.15.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.3)
2
+ Generator: bdist_wheel (0.42.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5