Skip to content

Commit 9cac101

Browse files
committed
Merge branch 'wip-yc-convert' of github.com:yibeichan/pydra-fsl into wip-yc-convert
2 parents 2498d93 + 95f060d commit 9cac101

File tree

8 files changed

+12
-18
lines changed

8 files changed

+12
-18
lines changed

pydra/tasks/fsl/model/cluster.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,7 @@ def Cluster_output(field, inputs):
221221
},
222222
),
223223
]
224-
Cluster_input_spec = specs.SpecInfo(
225-
name="Input", fields=input_fields, bases=(specs.ShellSpec,)
226-
)
224+
Cluster_input_spec = specs.SpecInfo(name="Input", fields=input_fields, bases=(specs.ShellSpec,))
227225

228226
output_fields = [
229227
(

pydra/tasks/fsl/model/tests/test_run_cluster.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
from ..cluster import Cluster
44

55

6-
@pytest.mark.xfail(
7-
"FSLDIR" not in os.environ, reason="no FSL found", raises=FileNotFoundError
8-
)
6+
@pytest.mark.xfail("FSLDIR" not in os.environ, reason="no FSL found", raises=FileNotFoundError)
97
@pytest.mark.parametrize(
108
"inputs, outputs",
119
[
@@ -63,9 +61,7 @@ def test_Cluster(test_data, inputs, outputs):
6361
except:
6462
pass
6563
task = Cluster(**inputs)
66-
assert set(task.generated_output_names) == set(
67-
["return_code", "stdout", "stderr"] + outputs
68-
)
64+
assert set(task.generated_output_names) == set(["return_code", "stdout", "stderr"] + outputs)
6965
res = task()
7066
print("RESULT: ", res)
7167
for out_nm in outputs:

pydra/tasks/fsl/model/tests/test_spec_cluster.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,4 @@ def test_Cluster(test_data, inputs, outputs):
6060
except:
6161
pass
6262
task = Cluster(**inputs)
63-
assert set(task.generated_output_names) == set(
64-
["return_code", "stdout", "stderr"] + outputs
65-
)
63+
assert set(task.generated_output_names) == set(["return_code", "stdout", "stderr"] + outputs)

pydra/tasks/fsl/tests/data/design.con

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
/RequiredEffect 100
66

77
/Matrix
8-
1
8+
1

pydra/tasks/fsl/tests/data/design.grp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
1
2828
1
2929
1
30-
1
30+
1

pydra/tasks/fsl/tests/data/design.mat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
1
2929
1
3030
1
31-
1
31+
1

specs/callables.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def Cluster_output(field, inputs):
55
in_file = inputs.in_file
66
name = field.name
77
pth, fname, ext = split_filename(in_file)
8-
8+
99
if name == "index_file":
1010
return os.path.join(pth, f"{fname}_index{ext}")
1111
elif name == "localmax_txt_file":
@@ -24,7 +24,9 @@ def Cluster_output(field, inputs):
2424
return os.path.join(pth, f"{fname}_threshold{ext}")
2525

2626
else:
27-
raise Exception(f"this function should be run only for index_file, localmax_txt_file, localmax_vol_file, max_file, mean_file, pval_file, size_file, or threshold_file not {name}")
27+
raise Exception(
28+
f"this function should be run only for index_file, localmax_txt_file, localmax_vol_file, max_file, mean_file, pval_file, size_file, or threshold_file not {name}"
29+
)
2830

2931

3032
def Complex_output(inputs):

specs/fsl_model_param.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Cluster:
1818
size_file: Cluster_output
1919
threshold_file: Cluster_output
2020
output_templates:
21-
21+
2222
inputs_drop:
2323
doctest:
2424
in_file: zstat1.nii.gz

0 commit comments

Comments
 (0)