Skip to content

Commit 9ff4241

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 169e2f7 commit 9ff4241

File tree

4 files changed

+21
-24
lines changed

4 files changed

+21
-24
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,3 @@ dmypy.json
130130

131131
# Pycharm
132132
.idea
133-

README.md

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,56 +23,55 @@ pip install -e /path/to/pydra-fsl/[dev]
2323
`FSLConverter` class (from `tools/converter.py`) requires three parts of information:
2424

2525
- Nipype spec: converter loads nipype interface and reads `_cmd`, `input_spec` and `output_spec`
26-
- yml file with additional spec: `specs/fsl_{module_name}_params.yml` contains additional spec that are written based
26+
- yml file with additional spec: `specs/fsl_{module_name}_params.yml` contains additional spec that are written based
2727
on additional functions from nipype (including `list_outputs`), each interface can have the following fields:
28-
- inputs_metadata: additional metadata for fields from input_spec
29-
(it will be included in `metadata` in pydra spec),
30-
e.g., used in `specs/fsl_preprocess_params.yml` for `FAST` to set default value for `number_classes`
28+
- inputs_metadata: additional metadata for fields from input_spec
29+
(it will be included in `metadata` in pydra spec),
30+
e.g., used in `specs/fsl_preprocess_params.yml` for `FAST` to set default value for `number_classes`
3131
(it's not part of nipype's spec, but it's set in `list_output`)
3232

33-
- output_requirements: providing required fields for the output to be created,
34-
taken from `list_output` structure;
33+
- output_requirements: providing required fields for the output to be created,
34+
taken from `list_output` structure;
3535
it's a part of the `requires` field in metadata in pydra spec
36-
37-
- output_templates: providing template to create the output file name,
38-
taken from `list_output` structure;
36+
37+
- output_templates: providing template to create the output file name,
38+
taken from `list_output` structure;
3939
it is set as `output_file_template` in metadata
40-
40+
4141
- output_callables: providing function name that should be used to gather output,
4242
based on the `list_output` structure and used only for `FAST`;
4343
it is set as `callable` in metadata
44-
45-
- tests_inputs, tests_outputs: specification for tests,
46-
the fields should have the same length and each element should contain
44+
45+
- tests_inputs, tests_outputs: specification for tests,
46+
the fields should have the same length and each element should contain
4747
the input fields values and list of the expected output fields names
48-
48+
4949
- doctests: specification for doctest,
50-
should include values for input fields and the expected `cmdline`
50+
should include values for input fields and the expected `cmdline`
5151

52-
- python file with functions used as callables to gather the outputs:
52+
- python file with functions used as callables to gather the outputs:
5353
`specs/callables.py` should contain all the functions from `output_callables`;
5454
the source code of the functions is read and written again in the pydra interface file
5555

5656

5757
### How to use the convert
5858

5959
The converter can be used by running:
60-
60+
6161
python tools/converter.py --interface_name <name of teh interface> --module_name <module_name>
6262

6363
The pydra task will be created and saved in `pydra/tasks/fsl/{module_name}/{interface_name}.py`.
6464
Note, that the spec file has to be present for the specific module name in order to run the converter.
6565
If no `interface_name` is provided, the default value `all` will be used
6666
and the converter will be run for all interfaces from the spec file.
6767

68-
Tests are written based on the fields from the yml file:
68+
Tests are written based on the fields from the yml file:
6969
`tests_inputs` and `tests_outputs` (the lengths should be the same).
7070
One test, `test_specs_*` checks only the correctness of the spec based
7171
on the `test_inputs/outputs` pairs, i.e. predicts which output fields
7272
should be created based on the list of the input fields.
73-
The second test, `test_run_*` should run the interfaces
74-
(TODO: this is temporary, should be removed from the final repo).
73+
The second test, `test_run_*` should run the interfaces
74+
(TODO: this is temporary, should be removed from the final repo).
7575
Tests can be run using `pytest`:
7676

7777
pytest -vs pydra/tasks/fsl/{module_name}/tests
78-

specs/fsl_fix_param.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,3 @@
4242
# doctest:
4343
# tests_inputs:
4444
# tests_outputs:
45-

specs/fsl_preprocess_param.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,4 @@ FIRST:
228228
-
229229

230230
tests_outputs:
231-
- AttributeError
231+
- AttributeError

0 commit comments

Comments
 (0)