Skip to content

Commit a81d993

Browse files
authored
Merge pull request #1866 from satra/fix/bru2
fixing tests and install errors
2 parents 0424b65 + 6dc7b1c commit a81d993

20 files changed

+31
-209
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ Support and Communication
7878
-------------------------
7979

8080
If you have a problem or would like to ask a question about how to do something in Nipype please open an issue to
81-
`NeuroStars.org <http://neurostars.org>`_ with a *nipype* tag. `NeuroStars.org <http://neurostars.org>`_ is a
82-
platform similar to StackOverflow but dedicated to neuroinformatics.
81+
`NeuroStars.org <http://neurostars.org>`_ with a *nipype* tag. `NeuroStars.org <http://neurostars.org>`_ is a
82+
platform similar to StackOverflow but dedicated to neuroinformatics.
8383

8484
To participate in the Nipype development related discussions please use the following mailing list::
8585

nipype/algorithms/tests/test_auto_CompCor.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

nipype/algorithms/tests/test_auto_ErrorMap.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

nipype/algorithms/tests/test_auto_Overlap.py

Lines changed: 0 additions & 47 deletions
This file was deleted.

nipype/algorithms/tests/test_auto_TSNR.py

Lines changed: 0 additions & 43 deletions
This file was deleted.

nipype/interfaces/ants/tests/test_auto_CreateJacobianDeterminantImage.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ def test_CreateJacobianDeterminantImage_inputs():
1111
position=1,
1212
),
1313
doLogJacobian=dict(argstr='%d',
14-
mandatory=False,
1514
position=3,
1615
),
1716
environ=dict(nohash=True,
@@ -35,7 +34,6 @@ def test_CreateJacobianDeterminantImage_inputs():
3534
terminal_output=dict(nohash=True,
3635
),
3736
useGeometric=dict(argstr='%d',
38-
mandatory=False,
3937
position=4,
4038
),
4139
)

nipype/interfaces/ants/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ class CreateJacobianDeterminantImageInputSpec(ANTSCommandInputSpec):
145145
outputImage = File(argstr='%s', mandatory=True,
146146
position=2,
147147
desc='output filename')
148-
doLogJacobian = traits.Enum(0, 1, argstr='%d', mandatory=False, position=3,
148+
doLogJacobian = traits.Enum(0, 1, argstr='%d', position=3,
149149
desc='return the log jacobian')
150-
useGeometric = traits.Enum(0, 1, argstr='%d', mandatory=False, position=4,
150+
useGeometric = traits.Enum(0, 1, argstr='%d', position=4,
151151
desc='return the geometric jacobian')
152152

153153
class CreateJacobianDeterminantImageOutputSpec(TraitedSpec):

nipype/interfaces/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1844,7 +1844,7 @@ def _filename_from_source(self, name, chain=None):
18441844
# special treatment for files
18451845
try:
18461846
_, base, source_ext = split_filename(source)
1847-
except AttributeError:
1847+
except (AttributeError, TypeError):
18481848
base = source
18491849
else:
18501850
if name in chain:

nipype/interfaces/fsl/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"""
99

1010
from .base import (FSLCommand, Info, check_fsl, no_fsl, no_fsl_course_data)
11-
from .preprocess import (FAST, FLIRT, ApplyXfm, ApplyXFM, BET, MCFLIRT, FNIRT,
11+
from .preprocess import (FAST, FLIRT, ApplyXFM, BET, MCFLIRT, FNIRT,
1212
ApplyWarp, SliceTimer, SUSAN, PRELUDE, FUGUE, FIRST)
1313
from .model import (Level1Design, FEAT, FEATModel, FILMGLS, FEATRegister,
1414
FLAMEO, ContrastMgr, MultipleRegressDesign, L2Model, SMM,

nipype/interfaces/fsl/model.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ class Level1DesignInputSpec(BaseInterfaceInputSpec):
4949
"{'dgamma': {'derivs': True}}"))
5050
orthogonalization = traits.Dict(traits.Int, traits.Dict(traits.Int,
5151
traits.Either(traits.Bool,traits.Int)),
52-
mandatory=False,
5352
desc=("which regressors to make orthogonal e.g., "
5453
"{1: {0:0,1:0,2:0}, 2: {0:1,1:1,2:0}} to make the second "
5554
"regressor in a 2-regressor model orthogonal to the first."),

nipype/interfaces/fsl/preprocess.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -594,16 +594,6 @@ class ApplyXFM(FLIRT):
594594
"""
595595
input_spec = ApplyXFMInputSpec
596596

597-
class ApplyXfm(ApplyXFM):
598-
"""
599-
.. deprecated:: 0.12.1
600-
Use :py:class:`nipype.interfaces.fsl.ApplyXFM` instead
601-
"""
602-
def __init__(self, **inputs):
603-
super(ApplyXfm, self).__init__(**inputs)
604-
warn(('This interface has been renamed since 0.12.1, please use '
605-
'nipype.interfaces.fsl.ApplyXFM'),
606-
UserWarning)
607597

608598
class MCFLIRTInputSpec(FSLCommandInputSpec):
609599
in_file = File(exists=True, position=0, argstr="-in %s", mandatory=True,
@@ -751,7 +741,7 @@ class FNIRTInputSpec(FSLCommandInputSpec):
751741
inwarp_file = File(exists=True, argstr='--inwarp=%s',
752742
desc='name of file containing initial non-linear warps')
753743
in_intensitymap_file = traits.List(File(exists=True), argstr='--intin=%s',
754-
copyfiles=False, minlen=1, maxlen=2,
744+
copyfile=False, minlen=1, maxlen=2,
755745
desc=('name of file/files containing '
756746
'initial intensity mapping '
757747
'usually generated by previous '

nipype/interfaces/fsl/tests/test_auto_ApplyXfm.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
22
from __future__ import unicode_literals
3-
from ..preprocess import ApplyXfm
3+
from ..preprocess import ApplyXFM
44

55

6-
def test_ApplyXfm_inputs():
6+
def test_ApplyXFM_inputs():
77
input_map = dict(angle_rep=dict(argstr='-anglerep %s',
88
),
99
apply_isoxfm=dict(argstr='-applyisoxfm %f',
@@ -145,19 +145,19 @@ def test_ApplyXfm_inputs():
145145
min_ver='5.0.0',
146146
),
147147
)
148-
inputs = ApplyXfm.input_spec()
148+
inputs = ApplyXFM.input_spec()
149149

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

154154

155-
def test_ApplyXfm_outputs():
155+
def test_ApplyXFM_outputs():
156156
output_map = dict(out_file=dict(),
157157
out_log=dict(),
158158
out_matrix_file=dict(),
159159
)
160-
outputs = ApplyXfm.output_spec()
160+
outputs = ApplyXFM.output_spec()
161161

162162
for key, metadata in list(output_map.items()):
163163
for metakey, value in list(metadata.items()):

nipype/interfaces/fsl/tests/test_auto_FNIRT.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def test_FNIRT_inputs():
4848
sep=',',
4949
),
5050
in_intensitymap_file=dict(argstr='--intin=%s',
51-
copyfiles=False,
51+
copyfile=False,
5252
),
5353
inmask_file=dict(argstr='--inmask=%s',
5454
),

nipype/interfaces/fsl/tests/test_auto_Level1Design.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ def test_Level1Design_inputs():
1414
),
1515
model_serial_correlations=dict(mandatory=True,
1616
),
17-
orthogonalization=dict(mandatory=False,
18-
),
17+
orthogonalization=dict(),
1918
session_info=dict(mandatory=True,
2019
),
2120
)

nipype/interfaces/fsl/tests/test_maths.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from nipype.interfaces.fsl import no_fsl
1313

1414
import pytest
15-
from nipype.testing.fixtures import create_files_in_directory_plus_output_type
15+
from nipype.testing.fixtures import create_files_in_directory_plus_output_type
1616

1717

1818
@pytest.mark.skipif(no_fsl(), reason="fsl is not installed")

nipype/interfaces/fsl/tests/test_preprocess.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -569,10 +569,3 @@ def test_first_genfname():
569569
value = first._gen_fname(name='original_segmentations')
570570
expected_value = os.path.abspath('segment_all_none_origsegs.nii.gz')
571571
assert value == expected_value
572-
573-
574-
@pytest.mark.skipif(no_fsl(), reason="fsl is not installed")
575-
def test_deprecation():
576-
interface = fsl.ApplyXfm()
577-
assert isinstance(interface, fsl.ApplyXFM)
578-

nipype/interfaces/tests/test_base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ class spec2(nib.CommandLineInputSpec):
209209
position=2)
210210
doo = nib.File(exists=True, argstr="%s", position=1)
211211
goo = traits.Int(argstr="%d", position=4)
212-
poo = nib.File(name_source=['goo'], hash_files=False, argstr="%s", position=3)
212+
poo = nib.File(name_source=['goo'], hash_files=False, argstr="%s",
213+
position=3)
213214

214215
class TestName(nib.CommandLine):
215216
_cmd = "mycommand"
@@ -218,6 +219,7 @@ class TestName(nib.CommandLine):
218219
testobj.inputs.doo = tmp_infile
219220
testobj.inputs.goo = 99
220221
assert '%s_generated' % nme in testobj.cmdline
222+
assert '%d_generated' % testobj.inputs.goo in testobj.cmdline
221223
testobj.inputs.moo = "my_%s_template"
222224
assert 'my_%s_template' % nme in testobj.cmdline
223225

0 commit comments

Comments
 (0)