Skip to content
Merged
Prev Previous commit
Next Next commit
allow 1.4.1 installation
  • Loading branch information
skoudoro committed Nov 23, 2021
commit 1e5d87e1cf64f8b7566e55116632a566fc626d0b
4 changes: 2 additions & 2 deletions nipype/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def get_nipype_gitversion():
EXTRA_REQUIRES = {
"data": ["datalad"],
"doc": [
"dipy!=1.4.1",
"dipy",
"ipython",
"matplotlib",
"nbsphinx",
Expand All @@ -172,7 +172,7 @@ def get_nipype_gitversion():
"sphinxcontrib-napoleon",
],
"duecredit": ["duecredit"],
"nipy": ["nitime", "nilearn", "dipy!=1.4.1", "nipy", "matplotlib"],
"nipy": ["nitime", "nilearn", "dipy", "nipy", "matplotlib"],
"profiler": ["psutil>=5.0"],
"pybids": ["pybids>=0.7.0"],
"specs": ["black"],
Expand Down
13 changes: 5 additions & 8 deletions nipype/interfaces/dipy/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,21 @@


def no_dipy():
"""Check if dipy is available"""
"""Check if dipy is available."""
global HAVE_DIPY
return not HAVE_DIPY


def dipy_version():
"""Check dipy version"""
"""Check dipy version."""
if no_dipy():
return None

return dipy.__version__


class DipyBaseInterface(LibraryBaseInterface):
"""
A base interface for py:mod:`dipy` computations
"""
"""A base interface for py:mod:`dipy` computations."""

_pkg = "dipy"

Expand All @@ -57,9 +55,7 @@ class DipyBaseInterfaceInputSpec(BaseInterfaceInputSpec):


class DipyDiffusionInterface(DipyBaseInterface):
"""
A base interface for py:mod:`dipy` computations
"""
"""A base interface for py:mod:`dipy` computations."""

input_spec = DipyBaseInterfaceInputSpec

Expand Down Expand Up @@ -100,6 +96,7 @@ def get_default_args(func):
Returns
-------
dict

"""
signature = inspect.signature(func)
return {k: v.default for k, v in signature.parameters.items()
Expand Down
4 changes: 2 additions & 2 deletions nipype/interfaces/dipy/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
get_default_args,
dipy_version
)
DIPY_1_14_LESS = LooseVersion(dipy_version()) < LooseVersion("1.14")
DIPY_1_4_LESS = LooseVersion(dipy_version()) < LooseVersion("1.4")


def test_convert_to_traits_type():
Expand Down Expand Up @@ -116,7 +116,7 @@ def test_create_interface_specs():
assert "out_params" in current_params.keys()


@pytest.mark.skipif(no_dipy() and DIPY_1_14_LESS,
@pytest.mark.skipif(no_dipy() and DIPY_1_4_LESS,
reason="DIPY is not installed")
def test_get_default_args():
from dipy.utils.deprecator import deprecated_params
Expand Down