Skip to content

Commit 91bcf78

Browse files
author
JW-96
committed
updated the documentation
1 parent 3c35367 commit 91bcf78

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

docs/input_spec.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,17 @@ In the example we used multiple keys in the metadata dictionary including `help_
162162
A flag that specifies if the file extension should be removed from the field value.
163163
Used in order to create an output specification.
164164
165-
166165
`readonly` (`bool`, default: `False`):
167166
If `True` the input field can't be provided by the user but it aggregates other input fields
168167
(for example the fields with `argstr: -o {fldA} {fldB}`).
169168
169+
`formatter` (`function`):
170+
If provided the `argstr` of the field is created using the function. This function can for example
171+
be used to combine several inputs into one command argument.
172+
The function can take `field` (this input field will be passed to the function),
173+
`inputs` (entire `inputs` will be passed) or any input field name
174+
(a specific input field will be sent).
175+
170176
171177
Validators
172178
----------

docs/output_spec.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ The metadata dictionary for `output_spec` can include:
6161
`help_string` (`str`, mandatory):
6262
A short description of the input field. The same as in `input_spec`.
6363

64+
`mandatory` (`bool`, default: `False`):
65+
If `True` the output file has to exist, otherwise an error will be raised.
66+
6467
`output_file_template` (`str`):
6568
If provided the output file name (or list of file names) is created using the template.
6669
The template can use other fields, e.g. `{file1}`. The same as in `input_spec`.
@@ -69,11 +72,14 @@ The metadata dictionary for `output_spec` can include:
6972
If provided the field is added to the output spec with changed name.
7073
The same as in `input_spec`.
7174

75+
`absolute_path` (`bool` default: `False`):
76+
A flag that specifies if the `output_file_template` is an absolute path. If the flag is not set,
77+
then the `output_file_template` is searched in the nodes output directory.
78+
7279
`keep_extension` (`bool`, default: `True`):
7380
A flag that specifies if the file extension should be removed from the field value.
7481
The same as in `input_spec`.
7582

76-
7783
`requires` (`list`):
7884
List of field names that are required to create a specific output.
7985
The fields do not have to be a part of the `output_file_template` and

pydra/engine/tests/test_shelltask_inputspec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2425,7 +2425,7 @@ def formatter_4(field):
24252425

24262426

24272427
def test_shellspec_formatter_splitter_2(tmpdir):
2428-
"""test the input callable 'formatter'."""
2428+
"""test the input callable 'formatter' when a splitter is used on an argument of the formatter."""
24292429

24302430
def spec_info(formatter):
24312431
return SpecInfo(

0 commit comments

Comments
 (0)