Skip to content

Commit 63440c2

Browse files
authored
Merge pull request #116 from scipp/prune-unused-domain-types-v2
Prune unused domain types in dream workflows v2
2 parents 1f10c8e + 87b3fae commit 63440c2

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ requires-python = ">=3.10"
3131
# Make sure to list one dependency per line.
3232
dependencies = [
3333
"dask",
34-
"essreduce>=24.11.3",
34+
"essreduce>=24.12.0",
3535
"graphviz",
3636
"numpy",
3737
"plopp",

requirements/base.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# --- END OF CUSTOM SECTION ---
44
# The following was generated by 'tox -e deps', DO NOT EDIT MANUALLY!
55
dask
6-
essreduce>=24.11.3
6+
essreduce>=24.12.0
77
graphviz
88
numpy
99
plopp

requirements/base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SHA1:6b89155439eb051cb7a3ca3e31678c9fa96a6f5a
1+
# SHA1:1c545a5dfb8b66d23509534f3ddf41f94ead839c
22
#
33
# This file is autogenerated by pip-compile-multi
44
# To update, run:

src/ess/dream/io/geant4.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
NeXusDetectorName,
2323
Position,
2424
RunType,
25+
SampleRun,
26+
VanadiumRun,
2527
)
2628
from ess.reduce.nexus.types import CalibratedBeamline
2729
from ess.reduce.nexus.workflow import GenericNeXusWorkflow
@@ -271,7 +273,9 @@ def LoadGeant4Workflow() -> sciline.Pipeline:
271273
"""
272274
Workflow for loading NeXus data.
273275
"""
274-
wf = GenericNeXusWorkflow()
276+
wf = GenericNeXusWorkflow(
277+
run_types=[SampleRun, VanadiumRun], monitor_types=[CaveMonitor]
278+
)
275279
wf.insert(extract_geant4_detector)
276280
wf.insert(load_geant4_csv)
277281
wf.insert(load_mcstas_monitor)

src/ess/powder/types.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,20 @@
3030
CaveMonitor = reduce_t.Monitor1
3131
MonitorData = reduce_t.MonitorData
3232
MonitorPositionOffset = reduce_t.MonitorPositionOffset
33-
MonitorType = reduce_t.MonitorType
3433
NeXusDetectorName = reduce_t.NeXusDetectorName
3534
NeXusMonitorName = reduce_t.NeXusName
3635
NeXusComponent = reduce_t.NeXusComponent
37-
RunType = reduce_t.RunType
3836
SampleRun = reduce_t.SampleRun
3937
Position = reduce_t.Position
4038
VanadiumRun = reduce_t.VanadiumRun
4139

4240
DetectorBankSizes = reduce_t.DetectorBankSizes
4341

42+
RunType = TypeVar("RunType", SampleRun, VanadiumRun)
43+
# Include Monitor2 because a single constraint is not allowed.
44+
# We will eventually have more than one...
45+
MonitorType = TypeVar("MonitorType", CaveMonitor, reduce_t.Monitor2)
46+
4447

4548
# 2 Workflow parameters
4649

0 commit comments

Comments
 (0)