Skip to content

Fix/autotests #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
403 changes: 320 additions & 83 deletions nipype/interfaces/afni/model.py

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions nipype/interfaces/afni/tests/test_auto_Axialize.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..utils import Axialize


def test_Axialize_inputs():
input_map = dict(args=dict(argstr='%s',
),
axial=dict(argstr='-axial',
xor=['coronal', 'sagittal'],
),
coronal=dict(argstr='-coronal',
xor=['sagittal', 'axial'],
),
environ=dict(nohash=True,
usedefault=True,
),
ignore_exception=dict(nohash=True,
usedefault=True,
),
in_file=dict(argstr='%s',
copyfile=False,
mandatory=True,
position=-2,
),
orientation=dict(argstr='-orient %s',
),
out_file=dict(argstr='-prefix %s',
name_source='in_file',
name_template='%s_axialize',
),
outputtype=dict(),
sagittal=dict(argstr='-sagittal',
xor=['coronal', 'axial'],
),
terminal_output=dict(nohash=True,
),
verb=dict(argstr='-verb',
),
)
inputs = Axialize.input_spec()

for key, metadata in list(input_map.items()):
for metakey, value in list(metadata.items()):
assert getattr(inputs.traits()[key], metakey) == value


def test_Axialize_outputs():
output_map = dict(out_file=dict(),
)
outputs = Axialize.output_spec()

for key, metadata in list(output_map.items()):
for metakey, value in list(metadata.items()):
assert getattr(outputs.traits()[key], metakey) == value
12 changes: 12 additions & 0 deletions nipype/interfaces/afni/tests/test_auto_BrickStat.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,23 @@ def test_BrickStat_inputs():
mask=dict(argstr='-mask %s',
position=2,
),
max=dict(argstr='-max',
),
mean=dict(argstr='-mean',
),
min=dict(argstr='-min',
position=1,
),
percentile=dict(argstr='-percentile %.3f %.3f %.3f',
),
slow=dict(argstr='-slow',
),
sum=dict(argstr='-sum',
),
terminal_output=dict(nohash=True,
),
var=dict(argstr='-var',
),
)
inputs = BrickStat.input_spec()

Expand Down
66 changes: 66 additions & 0 deletions nipype/interfaces/afni/tests/test_auto_Cat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..utils import Cat


def test_Cat_inputs():
input_map = dict(args=dict(argstr='%s',
),
environ=dict(nohash=True,
usedefault=True,
),
ignore_exception=dict(nohash=True,
usedefault=True,
),
in_files=dict(argstr='%s',
mandatory=True,
position=-2,
),
keepfree=dict(argstr='-nonfixed',
),
omitconst=dict(argstr='-nonconst',
),
out_cint=dict(xor=['out_format', 'out_nice', 'out_double', 'out_fint', 'out_int'],
),
out_double=dict(argstr='-d',
xor=['out_format', 'out_nice', 'out_int', 'out_fint', 'out_cint'],
),
out_file=dict(argstr='> %s',
mandatory=True,
position=-1,
),
out_fint=dict(argstr='-f',
xor=['out_format', 'out_nice', 'out_double', 'out_int', 'out_cint'],
),
out_format=dict(argstr='-form %s',
xor=['out_int', 'out_nice', 'out_double', 'out_fint', 'out_cint'],
),
out_int=dict(argstr='-i',
xor=['out_format', 'out_nice', 'out_double', 'out_fint', 'out_cint'],
),
out_nice=dict(argstr='-n',
xor=['out_format', 'out_int', 'out_double', 'out_fint', 'out_cint'],
),
outputtype=dict(),
sel=dict(argstr='-sel %s',
),
stack=dict(argstr='-stack',
),
terminal_output=dict(nohash=True,
),
)
inputs = Cat.input_spec()

for key, metadata in list(input_map.items()):
for metakey, value in list(metadata.items()):
assert getattr(inputs.traits()[key], metakey) == value


def test_Cat_outputs():
output_map = dict(out_file=dict(),
)
outputs = Cat.output_spec()

for key, metadata in list(output_map.items()):
for metakey, value in list(metadata.items()):
assert getattr(outputs.traits()[key], metakey) == value
30 changes: 27 additions & 3 deletions nipype/interfaces/afni/tests/test_auto_Deconvolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ def test_Deconvolve_inputs():
),
TR_1D=dict(argstr='-TR_1D %f',
),
allzero_OK=dict(argstr='-allzero_OK',
),
args=dict(argstr='%s',
),
automask=dict(argstr='-automask',
),
censor=dict(argstr='-censor %s',
),
dmbase=dict(argstr='-dmbase',
),
dname=dict(argstr='-D%s=%s',
),
environ=dict(nohash=True,
usedefault=True,
),
Expand All @@ -25,16 +31,20 @@ def test_Deconvolve_inputs():
xor=['local_times'],
),
glt_label=dict(argstr='-glt_label %d %s...',
position=-1,
requires=['gltsym'],
),
gltsym=dict(argstr="-gltsym 'SYM: %s'...",
position=-2,
),
goforit=dict(argstr='-GOFORIT %i',
),
ignore_exception=dict(nohash=True,
usedefault=True,
),
in_files=dict(argstr='-input %s',
copyfile=False,
mandatory=True,
position=0,
sep=' ',
),
input1D=dict(argstr='-input1D %s',
Expand All @@ -50,13 +60,19 @@ def test_Deconvolve_inputs():
),
noblock=dict(argstr='-noblock',
),
nocond=dict(argstr='-nocond',
),
nodmbase=dict(argstr='-nodmbase',
),
nolegendre=dict(argstr='-nolegendre',
),
nosvd=dict(argstr='-nosvd',
),
num_glt=dict(argstr='-num_glt %d',
position=1,
position=-3,
),
num_stimts=dict(argstr='-num_stimts %d',
position=0,
position=-6,
),
ortvec=dict(argstr='ortvec %s',
),
Expand All @@ -65,18 +81,26 @@ def test_Deconvolve_inputs():
outputtype=dict(),
polort=dict(argstr='-polort %d',
),
rmsmin=dict(argstr='-rmsmin %f',
),
rout=dict(argstr='-rout',
),
sat=dict(argstr='-sat',
xor=['trans'],
),
singvals=dict(argstr='-singvals',
),
stim_label=dict(argstr='-stim_label %d %s...',
position=-4,
requires=['stim_times'],
),
stim_times=dict(argstr="-stim_times %d %s '%s'...",
position=-5,
),
stim_times_subtract=dict(argstr='-stim_times_subtract %f',
),
svd=dict(argstr='-svd',
),
terminal_output=dict(nohash=True,
),
tout=dict(argstr='-tout',
Expand Down
58 changes: 58 additions & 0 deletions nipype/interfaces/afni/tests/test_auto_NwarpApply.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..utils import NwarpApply


def test_NwarpApply_inputs():
input_map = dict(ainterp=dict(argstr='-ainterp %s',
),
args=dict(argstr='%s',
),
environ=dict(nohash=True,
usedefault=True,
),
ignore_exception=dict(nohash=True,
usedefault=True,
),
in_file=dict(argstr='-source %s',
mandatory=True,
),
interp=dict(argstr='-interp %s',
),
inv_warp=dict(argstr='-iwarp',
),
master=dict(argstr='-master %s',
),
out_file=dict(argstr='-prefix %s',
name_source='in_file',
name_template='%s_Nwarp',
),
quiet=dict(argstr='-quiet',
xor=['verb'],
),
short=dict(argstr='-short',
),
terminal_output=dict(nohash=True,
),
verb=dict(argstr='-verb',
xor=['quiet'],
),
warp=dict(argstr='-nwarp %s',
mandatory=True,
),
)
inputs = NwarpApply.input_spec()

for key, metadata in list(input_map.items()):
for metakey, value in list(metadata.items()):
assert getattr(inputs.traits()[key], metakey) == value


def test_NwarpApply_outputs():
output_map = dict(out_file=dict(),
)
outputs = NwarpApply.output_spec()

for key, metadata in list(output_map.items()):
for metakey, value in list(metadata.items()):
assert getattr(outputs.traits()[key], metakey) == value
Loading