restage 0.2.2__tar.gz → 0.2.3__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.
Files changed (35) hide show
  1. {restage-0.2.2/src/restage.egg-info → restage-0.2.3}/PKG-INFO +1 -1
  2. {restage-0.2.2 → restage-0.2.3}/src/restage/splitrun.py +5 -0
  3. {restage-0.2.2 → restage-0.2.3/src/restage.egg-info}/PKG-INFO +1 -1
  4. {restage-0.2.2 → restage-0.2.3}/.github/workflows/pip.yml +0 -0
  5. {restage-0.2.2 → restage-0.2.3}/.github/workflows/wheels.yml +0 -0
  6. {restage-0.2.2 → restage-0.2.3}/.gitignore +0 -0
  7. {restage-0.2.2 → restage-0.2.3}/README.md +0 -0
  8. {restage-0.2.2 → restage-0.2.3}/pyproject.toml +0 -0
  9. {restage-0.2.2 → restage-0.2.3}/setup.cfg +0 -0
  10. {restage-0.2.2 → restage-0.2.3}/src/restage/__init__.py +0 -0
  11. {restage-0.2.2 → restage-0.2.3}/src/restage/bifrost_choppers.py +0 -0
  12. {restage-0.2.2 → restage-0.2.3}/src/restage/cache.py +0 -0
  13. {restage-0.2.2 → restage-0.2.3}/src/restage/cspec_choppers.py +0 -0
  14. {restage-0.2.2 → restage-0.2.3}/src/restage/database.py +0 -0
  15. {restage-0.2.2 → restage-0.2.3}/src/restage/emulate.py +0 -0
  16. {restage-0.2.2 → restage-0.2.3}/src/restage/energy.py +0 -0
  17. {restage-0.2.2 → restage-0.2.3}/src/restage/instr.py +0 -0
  18. {restage-0.2.2 → restage-0.2.3}/src/restage/mcpl.py +0 -0
  19. {restage-0.2.2 → restage-0.2.3}/src/restage/range.py +0 -0
  20. {restage-0.2.2 → restage-0.2.3}/src/restage/run.py +0 -0
  21. {restage-0.2.2 → restage-0.2.3}/src/restage/scan.py +0 -0
  22. {restage-0.2.2 → restage-0.2.3}/src/restage/tables.py +0 -0
  23. {restage-0.2.2 → restage-0.2.3}/src/restage.egg-info/SOURCES.txt +0 -0
  24. {restage-0.2.2 → restage-0.2.3}/src/restage.egg-info/dependency_links.txt +0 -0
  25. {restage-0.2.2 → restage-0.2.3}/src/restage.egg-info/entry_points.txt +0 -0
  26. {restage-0.2.2 → restage-0.2.3}/src/restage.egg-info/requires.txt +0 -0
  27. {restage-0.2.2 → restage-0.2.3}/src/restage.egg-info/top_level.txt +0 -0
  28. {restage-0.2.2 → restage-0.2.3}/test/splitRunTest_first.c +0 -0
  29. {restage-0.2.2 → restage-0.2.3}/test/splitRunTest_second.c +0 -0
  30. {restage-0.2.2 → restage-0.2.3}/test/test_cache.py +0 -0
  31. {restage-0.2.2 → restage-0.2.3}/test/test_database.py +0 -0
  32. {restage-0.2.2 → restage-0.2.3}/test/test_energy.py +0 -0
  33. {restage-0.2.2 → restage-0.2.3}/test/test_range.py +0 -0
  34. {restage-0.2.2 → restage-0.2.3}/test/test_scan.py +0 -0
  35. {restage-0.2.2 → restage-0.2.3}/test/test_single.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: restage
3
- Version: 0.2.2
3
+ Version: 0.2.3
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
@@ -162,6 +162,7 @@ def splitrun(instr, parameters, precision: dict[str, float], split_at=None, grid
162
162
  maximum_particle_count=None,
163
163
  dry_run=False,
164
164
  callback=None, callback_arguments: dict[str, str] | None = None,
165
+ output_split_instrs=True,
165
166
  **runtime_arguments):
166
167
  from zenlog import log
167
168
  from .energy import get_energy_parameter_names
@@ -172,6 +173,10 @@ def splitrun(instr, parameters, precision: dict[str, float], split_at=None, grid
172
173
  log.error(f'The specified split-at component, {split_at}, does not exist in the instrument file')
173
174
  # splitting defines an instrument parameter in both returned instrument, 'mcpl_filename'.
174
175
  pre, post = instr.mcpl_split(split_at, remove_unused_parameters=True)
176
+ if output_split_instrs:
177
+ for p in (pre, post):
178
+ with open(f'{p.name}.instr', 'w') as f:
179
+ p.to_file(f)
175
180
  # ... reduce the parameters to those that are relevant to the two instruments.
176
181
  pre_parameters = {k: v for k, v in parameters.items() if pre.has_parameter(k)}
177
182
  post_parameters = {k: v for k, v in parameters.items() if post.has_parameter(k)}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: restage
3
- Version: 0.2.2
3
+ Version: 0.2.3
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
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