Skip to content

fixing tests and install errors #1866

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 9 commits into from
Mar 8, 2017
Merged
Show file tree
Hide file tree
Changes from 8 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
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ Support and Communication
-------------------------

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

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

Expand Down
37 changes: 0 additions & 37 deletions nipype/algorithms/tests/test_auto_CompCor.py

This file was deleted.

35 changes: 0 additions & 35 deletions nipype/algorithms/tests/test_auto_ErrorMap.py

This file was deleted.

47 changes: 0 additions & 47 deletions nipype/algorithms/tests/test_auto_Overlap.py

This file was deleted.

43 changes: 0 additions & 43 deletions nipype/algorithms/tests/test_auto_TSNR.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def test_CreateJacobianDeterminantImage_inputs():
position=1,
),
doLogJacobian=dict(argstr='%d',
mandatory=False,
position=3,
),
environ=dict(nohash=True,
Expand All @@ -35,7 +34,6 @@ def test_CreateJacobianDeterminantImage_inputs():
terminal_output=dict(nohash=True,
),
useGeometric=dict(argstr='%d',
mandatory=False,
position=4,
),
)
Expand Down
4 changes: 2 additions & 2 deletions nipype/interfaces/ants/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ class CreateJacobianDeterminantImageInputSpec(ANTSCommandInputSpec):
outputImage = File(argstr='%s', mandatory=True,
position=2,
desc='output filename')
doLogJacobian = traits.Enum(0, 1, argstr='%d', mandatory=False, position=3,
doLogJacobian = traits.Enum(0, 1, argstr='%d', position=3,
desc='return the log jacobian')
useGeometric = traits.Enum(0, 1, argstr='%d', mandatory=False, position=4,
useGeometric = traits.Enum(0, 1, argstr='%d', position=4,
desc='return the geometric jacobian')

class CreateJacobianDeterminantImageOutputSpec(TraitedSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1844,7 +1844,7 @@ def _filename_from_source(self, name, chain=None):
# special treatment for files
try:
_, base, source_ext = split_filename(source)
except AttributeError:
except (AttributeError, TypeError):
base = source
else:
if name in chain:
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/fsl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"""

from .base import (FSLCommand, Info, check_fsl, no_fsl, no_fsl_course_data)
from .preprocess import (FAST, FLIRT, ApplyXfm, ApplyXFM, BET, MCFLIRT, FNIRT,
from .preprocess import (FAST, FLIRT, ApplyXFM, BET, MCFLIRT, FNIRT,
ApplyWarp, SliceTimer, SUSAN, PRELUDE, FUGUE, FIRST)
from .model import (Level1Design, FEAT, FEATModel, FILMGLS, FEATRegister,
FLAMEO, ContrastMgr, MultipleRegressDesign, L2Model, SMM,
Expand Down
1 change: 0 additions & 1 deletion nipype/interfaces/fsl/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class Level1DesignInputSpec(BaseInterfaceInputSpec):
"{'dgamma': {'derivs': True}}"))
orthogonalization = traits.Dict(traits.Int, traits.Dict(traits.Int,
traits.Either(traits.Bool,traits.Int)),
mandatory=False,
desc=("which regressors to make orthogonal e.g., "
"{1: {0:0,1:0,2:0}, 2: {0:1,1:1,2:0}} to make the second "
"regressor in a 2-regressor model orthogonal to the first."),
Expand Down
12 changes: 1 addition & 11 deletions nipype/interfaces/fsl/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,16 +594,6 @@ class ApplyXFM(FLIRT):
"""
input_spec = ApplyXFMInputSpec

class ApplyXfm(ApplyXFM):
"""
.. deprecated:: 0.12.1
Use :py:class:`nipype.interfaces.fsl.ApplyXFM` instead
"""
def __init__(self, **inputs):
super(ApplyXfm, self).__init__(**inputs)
warn(('This interface has been renamed since 0.12.1, please use '
'nipype.interfaces.fsl.ApplyXFM'),
UserWarning)

class MCFLIRTInputSpec(FSLCommandInputSpec):
in_file = File(exists=True, position=0, argstr="-in %s", mandatory=True,
Expand Down Expand Up @@ -751,7 +741,7 @@ class FNIRTInputSpec(FSLCommandInputSpec):
inwarp_file = File(exists=True, argstr='--inwarp=%s',
desc='name of file containing initial non-linear warps')
in_intensitymap_file = traits.List(File(exists=True), argstr='--intin=%s',
copyfiles=False, minlen=1, maxlen=2,
copyfile=False, minlen=1, maxlen=2,
desc=('name of file/files containing '
'initial intensity mapping '
'usually generated by previous '
Expand Down
10 changes: 5 additions & 5 deletions nipype/interfaces/fsl/tests/test_auto_ApplyXfm.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..preprocess import ApplyXfm
from ..preprocess import ApplyXFM
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nipype/interfaces/fsl/tests/test_auto_ApplyXFM.py already exists. Should this file just be removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this PR has taken care of it. the issue is with OSX and case-insensitive installations, which gave rise to the same named file with different content. the older interface which was deprecated in 0.12.1 has now been removed, so we should be ok.



def test_ApplyXfm_inputs():
def test_ApplyXFM_inputs():
input_map = dict(angle_rep=dict(argstr='-anglerep %s',
),
apply_isoxfm=dict(argstr='-applyisoxfm %f',
Expand Down Expand Up @@ -145,19 +145,19 @@ def test_ApplyXfm_inputs():
min_ver='5.0.0',
),
)
inputs = ApplyXfm.input_spec()
inputs = ApplyXFM.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_ApplyXfm_outputs():
def test_ApplyXFM_outputs():
output_map = dict(out_file=dict(),
out_log=dict(),
out_matrix_file=dict(),
)
outputs = ApplyXfm.output_spec()
outputs = ApplyXFM.output_spec()

for key, metadata in list(output_map.items()):
for metakey, value in list(metadata.items()):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/fsl/tests/test_auto_FNIRT.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_FNIRT_inputs():
sep=',',
),
in_intensitymap_file=dict(argstr='--intin=%s',
copyfiles=False,
copyfile=False,
),
inmask_file=dict(argstr='--inmask=%s',
),
Expand Down
3 changes: 1 addition & 2 deletions nipype/interfaces/fsl/tests/test_auto_Level1Design.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ def test_Level1Design_inputs():
),
model_serial_correlations=dict(mandatory=True,
),
orthogonalization=dict(mandatory=False,
),
orthogonalization=dict(),
session_info=dict(mandatory=True,
),
)
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/fsl/tests/test_maths.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from nipype.interfaces.fsl import no_fsl

import pytest
from nipype.testing.fixtures import create_files_in_directory_plus_output_type
from nipype.testing.fixtures import create_files_in_directory_plus_output_type


@pytest.mark.skipif(no_fsl(), reason="fsl is not installed")
Expand Down
4 changes: 3 additions & 1 deletion nipype/interfaces/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ class spec2(nib.CommandLineInputSpec):
position=2)
doo = nib.File(exists=True, argstr="%s", position=1)
goo = traits.Int(argstr="%d", position=4)
poo = nib.File(name_source=['goo'], hash_files=False, argstr="%s", position=3)
poo = nib.File(name_source=['goo'], hash_files=False, argstr="%s",
position=3)

class TestName(nib.CommandLine):
_cmd = "mycommand"
Expand All @@ -218,6 +219,7 @@ class TestName(nib.CommandLine):
testobj.inputs.doo = tmp_infile
testobj.inputs.goo = 99
assert '%s_generated' % nme in testobj.cmdline
assert '%d_generated' % testobj.inputs.goo in testobj.cmdline
testobj.inputs.moo = "my_%s_template"
assert 'my_%s_template' % nme in testobj.cmdline

Expand Down
Loading