File tree Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 29
29
pip install ".[dev]"
30
30
- name : Test with pytest
31
31
run : |
32
- pytest --doctest-modules pydra/tasks/nipype1
32
+ pytest -sv - -doctest-modules pydra/tasks/nipype1
Original file line number Diff line number Diff line change @@ -16,7 +16,27 @@ def traitedspec_to_specinfo(traitedspec):
16
16
17
17
18
18
class Nipype1Task (pydra .engine .task .TaskBase ):
19
- """Wrap a Python callable as a task element."""
19
+ """Wrap a Nipype 1.x Interface as a Pydra Task
20
+
21
+ This utility translates the Nipype 1 input and output specs to
22
+ Pydra-style specs, wraps the run command, and exposes the output
23
+ in Pydra Task outputs.
24
+
25
+ >>> import pytest
26
+ >>> from pkg_resources import resource_filename
27
+ >>> from nipype.interfaces import fsl
28
+ >>> if fsl.Info.version() is None:
29
+ ... pytest.skip()
30
+ >>> img = resource_filename('nipype', 'testing/data/tpms_msk.nii.gz')
31
+
32
+ >>> from pydra.tasks.nipype1.utils import Nipype1Task
33
+ >>> thresh = Nipype1Task(fsl.Threshold())
34
+ >>> thresh.inputs.in_file = img
35
+ >>> thresh.inputs.thresh = 0.5
36
+ >>> res = thresh()
37
+ >>> res.output.out_file # DOCTEST: +ELLIPSIS
38
+ '.../tpms_msk_thresh.nii.gz'
39
+ """
20
40
21
41
def __init__ (
22
42
self ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ description = Tools for importing nipype 1.x interfaces into Pydra
6
6
[options]
7
7
python_requires = >=3.7
8
8
install_requires =
9
- pydra
9
+ pydra @ git+https://github.com/effigies/pydra.git@85f9eeae02ec6b6c6893b8216b4e1f97219c7e2c
10
10
nipype
11
11
packages = pydra.tasks.nipype1
12
12
You can’t perform that action at this time.
0 commit comments