Skip to content

Commit

Permalink
adding callable to the user guide
Browse files Browse the repository at this point in the history
  • Loading branch information
djarecka committed Feb 15, 2021
1 parent b72989d commit 60b354a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/output_spec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The metadata dictionary for `output_spec` can include:
A short description of the input field. The same as in `input_spec`.

`output_file_template` (`str`):
If provided, the field is treated also as an output field and it is added to the output spec.
If provided the output file name (or list of file names) is created using the template.
The template can use other fields, e.g. `{file1}`. The same as in `input_spec`.

`output_field_name` (`str`, used together with `output_file_template`)
Expand All @@ -79,3 +79,10 @@ The metadata dictionary for `output_spec` can include:
The fields do not have to be a part of the `output_file_template` and
if any field from the list is not provided in the input, a `NOTHING` is returned for the specific output.
This has a different meaning than the `requires` form the `input_spec`.

`callable` (`function`):
If provided the output file name (or list of file names) is created using the function.
The function can take `field` (the specific output field will be passed to the function),
`output_dir` (task `output_dir` wil be used), `stdout`, `stderr` (`stdout` and `stderr` of
the task will be sent) `inputs` (entire `inputs` will be passed) or any input field name
(a specific input field will be sent).

0 comments on commit 60b354a

Please sign in to comment.