Skip to content

Commit 40b66b1

Browse files
authored
Fix env variable substitution in big ep trigger (#342)
1 parent cdabe46 commit 40b66b1

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

src/dlstbx/services/trigger.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,23 +1625,21 @@ class BigEPParams(pydantic.BaseModel):
16251625
pass
16261626

16271627
for input_file in ("data", "scaled_unmerged_mtz"):
1628-
processing_params = parameter_map.get(app.processingPrograms, {})
1628+
processing_params = ChainMapWithReplacement(
1629+
parameter_map.get(app.processingPrograms, {}),
1630+
substitutions=rw.environment,
1631+
)
16291632
input_filename = getattr(
16301633
parameters, input_file
1631-
) or processing_params.get(input_file)
1634+
) or processing_params.get(input_file, "")
16321635
if pathlib.Path(input_filename).is_file():
16331636
big_ep_params[input_file] = pathlib.Path(input_filename)
16341637
else:
16351638
input_filename = pathlib.Path(app.filePath) / input_filename
16361639
app_file = pathlib.Path(app.filePath) / app.fileName
16371640
if re.search(str(input_filename), str(app_file)):
16381641
big_ep_params[input_file] = app_file
1639-
big_ep_params = BigEPParams(
1640-
**ChainMapWithReplacement(
1641-
big_ep_params,
1642-
substitutions=rw.environment,
1643-
)
1644-
)
1642+
big_ep_params = BigEPParams(**big_ep_params)
16451643
else:
16461644
self.log.error("big_ep trigger failed: No scaling_id value specified")
16471645
return False

0 commit comments

Comments
 (0)