Skip to content
  •  
  •  
  •  
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ html:
@echo "building docs"
make -C doc clean html

check-before-commit: trailing-spaces html test
specs:
@echo "Checking specs and autogenerating spec tests"
python tools/checkspecs.py

check-before-commit: trailing-spaces html test specs
@echo "removed spaces"
@echo "built docs"
@echo "ran test"
@echo "generated spec tests"
29 changes: 0 additions & 29 deletions nipype/algorithms/modelgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,32 +743,3 @@ def _list_outputs(self):
outputs['sparse_png_file'] = os.path.join(os.getcwd(), 'sparse.png')
outputs['sparse_svg_file'] = os.path.join(os.getcwd(), 'sparse.svg')
return outputs

'''

Need to figure out how this component will work!!! multiple inheritence is causing a big headache

class SpecifySparseSPMModelInputSpec(SpecifySPMModelInputSpec, SpecifySparseModelInputSpec):
pass

class SpecifySparseSPMModel(SpecifySparseModel, SpecifySPMModel):
"""Combines SPM specific options with sparse options
"""
input_spec = SpecifySparseSPMModelInputSpec
output_spec = SpecifySparseModelOutputSpec

def _generate_design(self, infolist=None):
raise Exception('not working yet')
if (self.inputs.input_units == 'scans') and (self.inputs.output_units == 'secs'):
if isdefined(self.inputs.volumes_in_cluster) and (self.inputs.volumes_in_cluster > 1):
raise NotImplementedError("Cannot scale timings if times are scans and acquisition is clustered")
if isdefined(self.inputs.subject_info):
infolist = self.inputs.subject_info
else:
infolist = gen_info(self.inputs.event_files)
clusterlist = self._generate_clustered_design(infolist)
if not isdefined(self.inputs.concatenate_runs):
super(SpecifySparseSPMModel, self)._generate_design(infolist=clusterlist)
else:
self._generate_spm_design(infolist=clusterlist)
'''
2 changes: 0 additions & 2 deletions nipype/algorithms/rapidart.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,6 @@ class ArtifactDetect(BaseInterface):
output_spec = ArtifactDetectOutputSpec

def __init__(self, **inputs):
warn(('Deprecation warning: "bound_by_brainmask" will be set to True'
'in release 0.8'))
super(ArtifactDetect, self).__init__(**inputs)

def _get_output_filenames(self, motionfile, output_dir):
Expand Down
24 changes: 24 additions & 0 deletions nipype/algorithms/tests/test_auto_AddCSVColumn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.algorithms.misc import AddCSVColumn
def test_AddCSVColumn_inputs():
input_map = dict(extra_column_heading=dict(),
extra_field=dict(),
out_file=dict(usedefault=True,
),
in_file=dict(mandatory=True,
),
)
inputs = AddCSVColumn.input_spec()

for key, metadata in input_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(inputs.traits()[key], metakey), value
def test_AddCSVColumn_outputs():
output_map = dict(csv_file=dict(),
)
outputs = AddCSVColumn.output_spec()

for key, metadata in output_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(outputs.traits()[key], metakey), value
64 changes: 64 additions & 0 deletions nipype/algorithms/tests/test_auto_ArtifactDetect.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.algorithms.rapidart import ArtifactDetect
def test_ArtifactDetect_inputs():
input_map = dict(ignore_exception=dict(nohash=True,
usedefault=True,
),
plot_type=dict(usedefault=True,
),
mask_type=dict(mandatory=True,
),
mask_threshold=dict(),
parameter_source=dict(mandatory=True,
),
translation_threshold=dict(mandatory=True,
xor=['norm_threshold'],
),
global_threshold=dict(usedefault=True,
),
bound_by_brainmask=dict(usedefault=True,
),
realigned_files=dict(mandatory=True,
),
rotation_threshold=dict(mandatory=True,
xor=['norm_threshold'],
),
save_plot=dict(usedefault=True,
),
use_differences=dict(minlen=2,
maxlen=2,
usedefault=True,
),
norm_threshold=dict(mandatory=True,
xor=['rotation_threshold', 'translation_threshold'],
),
zintensity_threshold=dict(mandatory=True,
),
use_norm=dict(requires=['norm_threshold'],
usedefault=True,
),
mask_file=dict(),
intersect_mask=dict(),
realignment_parameters=dict(mandatory=True,
),
)
inputs = ArtifactDetect.input_spec()

for key, metadata in input_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(inputs.traits()[key], metakey), value
def test_ArtifactDetect_outputs():
output_map = dict(displacement_files=dict(),
outlier_files=dict(),
mask_files=dict(),
intensity_files=dict(),
norm_files=dict(),
statistic_files=dict(),
plot_files=dict(),
)
outputs = ArtifactDetect.output_spec()

for key, metadata in output_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(outputs.traits()[key], metakey), value
22 changes: 22 additions & 0 deletions nipype/algorithms/tests/test_auto_CalculateNormalizedMoments.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.algorithms.misc import CalculateNormalizedMoments
def test_CalculateNormalizedMoments_inputs():
input_map = dict(moment=dict(mandatory=True,
),
timeseries_file=dict(mandatory=True,
),
)
inputs = CalculateNormalizedMoments.input_spec()

for key, metadata in input_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(inputs.traits()[key], metakey), value
def test_CalculateNormalizedMoments_outputs():
output_map = dict(moments=dict(),
)
outputs = CalculateNormalizedMoments.output_spec()

for key, metadata in output_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(outputs.traits()[key], metakey), value
26 changes: 26 additions & 0 deletions nipype/algorithms/tests/test_auto_CreateNifti.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.algorithms.misc import CreateNifti
def test_CreateNifti_inputs():
input_map = dict(ignore_exception=dict(nohash=True,
usedefault=True,
),
data_file=dict(mandatory=True,
),
affine=dict(),
header_file=dict(mandatory=True,
),
)
inputs = CreateNifti.input_spec()

for key, metadata in input_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(inputs.traits()[key], metakey), value
def test_CreateNifti_outputs():
output_map = dict(nifti_file=dict(),
)
outputs = CreateNifti.output_spec()

for key, metadata in output_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(outputs.traits()[key], metakey), value
31 changes: 31 additions & 0 deletions nipype/algorithms/tests/test_auto_Distance.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.algorithms.misc import Distance
def test_Distance_inputs():
input_map = dict(ignore_exception=dict(nohash=True,
usedefault=True,
),
volume1=dict(mandatory=True,
),
method=dict(usedefault=True,
),
mask_volume=dict(),
volume2=dict(mandatory=True,
),
)
inputs = Distance.input_spec()

for key, metadata in input_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(inputs.traits()[key], metakey), value
def test_Distance_outputs():
output_map = dict(distance=dict(),
point2=dict(),
histogram=dict(),
point1=dict(),
)
outputs = Distance.output_spec()

for key, metadata in output_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(outputs.traits()[key], metakey), value
33 changes: 33 additions & 0 deletions nipype/algorithms/tests/test_auto_FuzzyOverlap.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.algorithms.misc import FuzzyOverlap
def test_FuzzyOverlap_inputs():
input_map = dict(ignore_exception=dict(nohash=True,
usedefault=True,
),
weighting=dict(usedefault=True,
),
in_tst=dict(mandatory=True,
),
out_file=dict(usedefault=True,
),
in_ref=dict(mandatory=True,
),
)
inputs = FuzzyOverlap.input_spec()

for key, metadata in input_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(inputs.traits()[key], metakey), value
def test_FuzzyOverlap_outputs():
output_map = dict(class_fji=dict(),
class_fdi=dict(),
diff_file=dict(),
dice=dict(),
jaccard=dict(),
)
outputs = FuzzyOverlap.output_spec()

for key, metadata in output_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(outputs.traits()[key], metakey), value
23 changes: 23 additions & 0 deletions nipype/algorithms/tests/test_auto_Gunzip.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.algorithms.misc import Gunzip
def test_Gunzip_inputs():
input_map = dict(ignore_exception=dict(nohash=True,
usedefault=True,
),
in_file=dict(mandatory=True,
),
)
inputs = Gunzip.input_spec()

for key, metadata in input_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(inputs.traits()[key], metakey), value
def test_Gunzip_outputs():
output_map = dict(out_file=dict(),
)
outputs = Gunzip.output_spec()

for key, metadata in output_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(outputs.traits()[key], metakey), value
27 changes: 27 additions & 0 deletions nipype/algorithms/tests/test_auto_ICC.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.algorithms.icc import ICC
def test_ICC_inputs():
input_map = dict(ignore_exception=dict(nohash=True,
usedefault=True,
),
mask=dict(mandatory=True,
),
subjects_sessions=dict(mandatory=True,
),
)
inputs = ICC.input_spec()

for key, metadata in input_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(inputs.traits()[key], metakey), value
def test_ICC_outputs():
output_map = dict(session_var_map=dict(),
icc_map=dict(),
subject_var_map=dict(),
)
outputs = ICC.output_spec()

for key, metadata in output_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(outputs.traits()[key], metakey), value
22 changes: 22 additions & 0 deletions nipype/algorithms/tests/test_auto_Matlab2CSV.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.algorithms.misc import Matlab2CSV
def test_Matlab2CSV_inputs():
input_map = dict(reshape_matrix=dict(usedefault=True,
),
in_file=dict(mandatory=True,
),
)
inputs = Matlab2CSV.input_spec()

for key, metadata in input_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(inputs.traits()[key], metakey), value
def test_Matlab2CSV_outputs():
output_map = dict(csv_files=dict(),
)
outputs = Matlab2CSV.output_spec()

for key, metadata in output_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(outputs.traits()[key], metakey), value
28 changes: 28 additions & 0 deletions nipype/algorithms/tests/test_auto_MergeCSVFiles.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.algorithms.misc import MergeCSVFiles
def test_MergeCSVFiles_inputs():
input_map = dict(out_file=dict(usedefault=True,
),
column_headings=dict(),
extra_field=dict(),
row_heading_title=dict(usedefault=True,
),
in_files=dict(mandatory=True,
),
row_headings=dict(),
extra_column_heading=dict(),
)
inputs = MergeCSVFiles.input_spec()

for key, metadata in input_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(inputs.traits()[key], metakey), value
def test_MergeCSVFiles_outputs():
output_map = dict(csv_file=dict(),
)
outputs = MergeCSVFiles.output_spec()

for key, metadata in output_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(outputs.traits()[key], metakey), value
25 changes: 25 additions & 0 deletions nipype/algorithms/tests/test_auto_ModifyAffine.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.algorithms.misc import ModifyAffine
def test_ModifyAffine_inputs():
input_map = dict(transformation_matrix=dict(usedefault=True,
),
ignore_exception=dict(nohash=True,
usedefault=True,
),
volumes=dict(mandatory=True,
),
)
inputs = ModifyAffine.input_spec()

for key, metadata in input_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(inputs.traits()[key], metakey), value
def test_ModifyAffine_outputs():
output_map = dict(transformed_volumes=dict(),
)
outputs = ModifyAffine.output_spec()

for key, metadata in output_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(outputs.traits()[key], metakey), value
Loading