Skip to content

Commit bdbce8e

Browse files
committed
adding input fields check to generated_output_names in order to catch the incomplete input before running
1 parent b672213 commit bdbce8e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pydra/engine/helpers_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ def template_update(inputs, output_dir, map_copyfiles=None):
519519
if fld.type not in [str, ty.Union[str, bool]]:
520520
raise Exception(
521521
f"fields with output_file_template"
522-
"has to be a string or Union[str, bool]"
522+
" has to be a string or Union[str, bool]"
523523
)
524524
dict_[fld.name] = template_update_single(
525525
field=fld, inputs_dict=dict_, output_dir=output_dir

pydra/engine/specs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,8 @@ def generated_output_names(self, inputs, output_dir):
425425
Takes into account the task input and the requires list for the output fields.
426426
TODO: should be in all Output specs?
427427
"""
428+
# checking the input (if all mandatory fields are provided, etc.)
429+
inputs.check_fields_input_spec()
428430
output_names = ["return_code", "stdout", "stderr"]
429431
for fld in attr_fields(self):
430432
if fld.name not in ["return_code", "stdout", "stderr"]:

0 commit comments

Comments
 (0)