Skip to content

Commit c234a01

Browse files
authored
Merge pull request #1813 from effigies/issue1348
BF: Run `make specs` with CWD in PYTHONPATH
2 parents 7354474 + f8fb369 commit c234a01

File tree

703 files changed

+1879
-828
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

703 files changed

+1879
-828
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ html:
7171

7272
specs:
7373
@echo "Checking specs and autogenerating spec tests"
74-
python tools/checkspecs.py
74+
env PYTHONPATH=".:$(PYTHONPATH)" python tools/checkspecs.py
7575

7676
check: check-before-commit # just a shortcut
7777
check-before-commit: specs trailing-spaces html test

nipype/algorithms/tests/test_auto_ACompCor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..confounds import ACompCor
34

45

nipype/algorithms/tests/test_auto_AddCSVColumn.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..misc import AddCSVColumn
34

45

nipype/algorithms/tests/test_auto_AddCSVRow.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..misc import AddCSVRow
34

45

nipype/algorithms/tests/test_auto_AddNoise.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..misc import AddNoise
34

45

nipype/algorithms/tests/test_auto_ArtifactDetect.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..rapidart import ArtifactDetect
34

45

@@ -16,7 +17,7 @@ def test_ArtifactDetect_inputs():
1617
mask_type=dict(mandatory=True,
1718
),
1819
norm_threshold=dict(mandatory=True,
19-
xor=[u'rotation_threshold', u'translation_threshold'],
20+
xor=['rotation_threshold', 'translation_threshold'],
2021
),
2122
parameter_source=dict(mandatory=True,
2223
),
@@ -27,18 +28,18 @@ def test_ArtifactDetect_inputs():
2728
realignment_parameters=dict(mandatory=True,
2829
),
2930
rotation_threshold=dict(mandatory=True,
30-
xor=[u'norm_threshold'],
31+
xor=['norm_threshold'],
3132
),
3233
save_plot=dict(usedefault=True,
3334
),
3435
translation_threshold=dict(mandatory=True,
35-
xor=[u'norm_threshold'],
36+
xor=['norm_threshold'],
3637
),
3738
use_differences=dict(maxlen=2,
3839
minlen=2,
3940
usedefault=True,
4041
),
41-
use_norm=dict(requires=[u'norm_threshold'],
42+
use_norm=dict(requires=['norm_threshold'],
4243
usedefault=True,
4344
),
4445
zintensity_threshold=dict(mandatory=True,

nipype/algorithms/tests/test_auto_CalculateNormalizedMoments.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..misc import CalculateNormalizedMoments
34

45

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..confounds import CompCor
4+
5+
6+
def test_CompCor_inputs():
7+
input_map = dict(components_file=dict(usedefault=True,
8+
),
9+
header=dict(),
10+
ignore_exception=dict(nohash=True,
11+
usedefault=True,
12+
),
13+
mask_file=dict(),
14+
num_components=dict(usedefault=True,
15+
),
16+
realigned_file=dict(mandatory=True,
17+
),
18+
regress_poly_degree=dict(usedefault=True,
19+
),
20+
use_regress_poly=dict(usedefault=True,
21+
),
22+
)
23+
inputs = CompCor.input_spec()
24+
25+
for key, metadata in list(input_map.items()):
26+
for metakey, value in list(metadata.items()):
27+
assert getattr(inputs.traits()[key], metakey) == value
28+
29+
30+
def test_CompCor_outputs():
31+
output_map = dict(components_file=dict(),
32+
)
33+
outputs = CompCor.output_spec()
34+
35+
for key, metadata in list(output_map.items()):
36+
for metakey, value in list(metadata.items()):
37+
assert getattr(outputs.traits()[key], metakey) == value

nipype/algorithms/tests/test_auto_ComputeDVARS.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..confounds import ComputeDVARS
34

45

nipype/algorithms/tests/test_auto_ComputeMeshWarp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..mesh import ComputeMeshWarp
34

45

nipype/algorithms/tests/test_auto_CreateNifti.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..misc import CreateNifti
34

45

nipype/algorithms/tests/test_auto_Distance.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..misc import Distance
34

45

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..metrics import ErrorMap
4+
5+
6+
def test_ErrorMap_inputs():
7+
input_map = dict(ignore_exception=dict(nohash=True,
8+
usedefault=True,
9+
),
10+
in_ref=dict(mandatory=True,
11+
),
12+
in_tst=dict(mandatory=True,
13+
),
14+
mask=dict(),
15+
metric=dict(mandatory=True,
16+
usedefault=True,
17+
),
18+
out_map=dict(),
19+
)
20+
inputs = ErrorMap.input_spec()
21+
22+
for key, metadata in list(input_map.items()):
23+
for metakey, value in list(metadata.items()):
24+
assert getattr(inputs.traits()[key], metakey) == value
25+
26+
27+
def test_ErrorMap_outputs():
28+
output_map = dict(distance=dict(),
29+
out_map=dict(),
30+
)
31+
outputs = ErrorMap.output_spec()
32+
33+
for key, metadata in list(output_map.items()):
34+
for metakey, value in list(metadata.items()):
35+
assert getattr(outputs.traits()[key], metakey) == value

nipype/algorithms/tests/test_auto_FramewiseDisplacement.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..confounds import FramewiseDisplacement
34

45

nipype/algorithms/tests/test_auto_FuzzyOverlap.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..misc import FuzzyOverlap
34

45

nipype/algorithms/tests/test_auto_Gunzip.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..misc import Gunzip
34

45

nipype/algorithms/tests/test_auto_ICC.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..icc import ICC
34

45

nipype/algorithms/tests/test_auto_Matlab2CSV.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..misc import Matlab2CSV
34

45

nipype/algorithms/tests/test_auto_MergeCSVFiles.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..misc import MergeCSVFiles
34

45

nipype/algorithms/tests/test_auto_MergeROIs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..misc import MergeROIs
34

45

nipype/algorithms/tests/test_auto_MeshWarpMaths.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..mesh import MeshWarpMaths
34

45

nipype/algorithms/tests/test_auto_ModifyAffine.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..misc import ModifyAffine
34

45

nipype/algorithms/tests/test_auto_NormalizeProbabilityMapSet.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..misc import NormalizeProbabilityMapSet
34

45

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..misc import Overlap
4+
5+
6+
def test_Overlap_inputs():
7+
input_map = dict(bg_overlap=dict(mandatory=True,
8+
usedefault=True,
9+
),
10+
ignore_exception=dict(nohash=True,
11+
usedefault=True,
12+
),
13+
mask_volume=dict(),
14+
out_file=dict(usedefault=True,
15+
),
16+
vol_units=dict(mandatory=True,
17+
usedefault=True,
18+
),
19+
volume1=dict(mandatory=True,
20+
),
21+
volume2=dict(mandatory=True,
22+
),
23+
weighting=dict(usedefault=True,
24+
),
25+
)
26+
inputs = Overlap.input_spec()
27+
28+
for key, metadata in list(input_map.items()):
29+
for metakey, value in list(metadata.items()):
30+
assert getattr(inputs.traits()[key], metakey) == value
31+
32+
33+
def test_Overlap_outputs():
34+
output_map = dict(dice=dict(),
35+
diff_file=dict(),
36+
jaccard=dict(),
37+
labels=dict(),
38+
roi_di=dict(),
39+
roi_ji=dict(),
40+
roi_voldiff=dict(),
41+
volume_difference=dict(),
42+
)
43+
outputs = Overlap.output_spec()
44+
45+
for key, metadata in list(output_map.items()):
46+
for metakey, value in list(metadata.items()):
47+
assert getattr(outputs.traits()[key], metakey) == value

nipype/algorithms/tests/test_auto_P2PDistance.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..mesh import P2PDistance
34

45

nipype/algorithms/tests/test_auto_PickAtlas.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..misc import PickAtlas
34

45

nipype/algorithms/tests/test_auto_Similarity.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..metrics import Similarity
34

45

nipype/algorithms/tests/test_auto_SimpleThreshold.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..misc import SimpleThreshold
34

45

nipype/algorithms/tests/test_auto_SpecifyModel.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..modelgen import SpecifyModel
34

45

56
def test_SpecifyModel_inputs():
67
input_map = dict(event_files=dict(mandatory=True,
7-
xor=[u'subject_info', u'event_files'],
8+
xor=['subject_info', 'event_files'],
89
),
910
functional_runs=dict(copyfile=False,
1011
mandatory=True,
@@ -21,7 +22,7 @@ def test_SpecifyModel_inputs():
2122
realignment_parameters=dict(copyfile=False,
2223
),
2324
subject_info=dict(mandatory=True,
24-
xor=[u'subject_info', u'event_files'],
25+
xor=['subject_info', 'event_files'],
2526
),
2627
time_repetition=dict(mandatory=True,
2728
),

nipype/algorithms/tests/test_auto_SpecifySPMModel.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..modelgen import SpecifySPMModel
34

45

56
def test_SpecifySPMModel_inputs():
67
input_map = dict(concatenate_runs=dict(usedefault=True,
78
),
89
event_files=dict(mandatory=True,
9-
xor=[u'subject_info', u'event_files'],
10+
xor=['subject_info', 'event_files'],
1011
),
1112
functional_runs=dict(copyfile=False,
1213
mandatory=True,
@@ -25,7 +26,7 @@ def test_SpecifySPMModel_inputs():
2526
realignment_parameters=dict(copyfile=False,
2627
),
2728
subject_info=dict(mandatory=True,
28-
xor=[u'subject_info', u'event_files'],
29+
xor=['subject_info', 'event_files'],
2930
),
3031
time_repetition=dict(mandatory=True,
3132
),

nipype/algorithms/tests/test_auto_SpecifySparseModel.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..modelgen import SpecifySparseModel
34

45

56
def test_SpecifySparseModel_inputs():
67
input_map = dict(event_files=dict(mandatory=True,
7-
xor=[u'subject_info', u'event_files'],
8+
xor=['subject_info', 'event_files'],
89
),
910
functional_runs=dict(copyfile=False,
1011
mandatory=True,
@@ -29,13 +30,13 @@ def test_SpecifySparseModel_inputs():
2930
stimuli_as_impulses=dict(usedefault=True,
3031
),
3132
subject_info=dict(mandatory=True,
32-
xor=[u'subject_info', u'event_files'],
33+
xor=['subject_info', 'event_files'],
3334
),
3435
time_acquisition=dict(mandatory=True,
3536
),
3637
time_repetition=dict(mandatory=True,
3738
),
38-
use_temporal_deriv=dict(requires=[u'model_hrf'],
39+
use_temporal_deriv=dict(requires=['model_hrf'],
3940
),
4041
volumes_in_cluster=dict(usedefault=True,
4142
),

nipype/algorithms/tests/test_auto_SplitROIs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..misc import SplitROIs
34

45

nipype/algorithms/tests/test_auto_StimulusCorrelation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..rapidart import StimulusCorrelation
34

45

nipype/algorithms/tests/test_auto_TCompCor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
23
from ..confounds import TCompCor
34

45

0 commit comments

Comments
 (0)