Skip to content

Commit 9099a58

Browse files
committed
Merge pull request #843 from mwaskom/revert_interface_import
Partial revert of imoports in nipype namespace
2 parents 4b50091 + 6d0a5f9 commit 9099a58

File tree

8 files changed

+10
-9
lines changed

8 files changed

+10
-9
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Next Release
22
============
33

4+
* API: Interfaces to external packages are no longer available in the top-level ``nipype`` namespace, and must be imported directly (e.g. ``from nipype.interfaces import fsl``).
45
* ENH: New ANTs interface: ApplyTransformsToPoints
56
* FIX: MRTrix tracking algorithms were ignoring mask parameters.
67

doc/users/spmmcr.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ the following commands are executed at the beginning of your script:
99

1010
.. testcode::
1111

12-
from nipype import spm
12+
from nipype.interfaces import spm
1313
matlab_cmd = '/path/to/run_spm8.sh /path/to/Compiler_Runtime/v713/ script'
1414
spm.SPMCommand.set_mlab_paths(matlab_cmd=matlab_cmd, use_mcr=True)
1515

examples/fmri_spm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from nipype import config
1919
config.enable_provenance()
2020

21-
from nipype import spm, fsl
21+
from nipype.interfaces import spm, fsl
2222

2323
# In order to use this example with SPM's matlab common runtime
2424
# matlab_cmd = ('/Users/satra/Downloads/spm8/run_spm8.sh '

nipype/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,5 @@ def _test_local_install():
7575

7676

7777
from pipeline import Node, MapNode, JoinNode, Workflow
78-
from interfaces import (fsl, spm, freesurfer, afni, ants, slicer, dipy, nipy,
79-
mrtrix, camino, DataGrabber, DataSink, SelectFiles,
78+
from interfaces import (DataGrabber, DataSink, SelectFiles,
8079
IdentityInterface, Rename, Function, Select, Merge)

nipype/interfaces/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@
99

1010
from io import DataGrabber, DataSink, SelectFiles
1111
from utility import IdentityInterface, Rename, Function, Select, Merge
12-
import fsl, spm, freesurfer, afni, ants, slicer, dipy, nipy, mrtrix, camino

nipype/interfaces/fsl/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ class ImageMaths(FSLCommand):
343343
Examples
344344
--------
345345
346-
>>> from nipype import fsl
346+
>>> from nipype.interfaces import fsl
347347
>>> from nipype.testing import anatfile
348348
>>> maths = fsl.ImageMaths(in_file=anatfile, op_string= '-add 5',
349349
... out_file='foo_maths.nii')

nipype/interfaces/spm/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
In order to use the standalone MCR version of spm, you need to ensure that
66
the following commands are executed at the beginning of your script::
77
8-
from nipype import spm
8+
from nipype.interfaces import spm
99
matlab_cmd = '/path/to/run_spm8.sh /path/to/Compiler_Runtime/v713/ script'
1010
spm.SPMCommand.set_mlab_paths(matlab_cmd=matlab_cmd, use_mcr=True)
1111

nipype/pipeline/engine.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,8 @@ class Node(WorkflowBase):
10991099
Examples
11001100
--------
11011101
1102-
>>> from nipype import Node, spm
1102+
>>> from nipype import Node
1103+
>>> from nipype.interfaces import spm
11031104
>>> realign = Node(spm.Realign(), 'realign')
11041105
>>> realign.inputs.in_files = 'functional.nii'
11051106
>>> realign.inputs.register_to_mean = True
@@ -1984,7 +1985,8 @@ class MapNode(Node):
19841985
Examples
19851986
--------
19861987
1987-
>>> from nipype import MapNode, fsl
1988+
>>> from nipype import MapNode
1989+
>>> from nipype.interfaces import fsl
19881990
>>> realign = MapNode(fsl.MCFLIRT(), 'in_file', 'realign')
19891991
>>> realign.inputs.in_file = ['functional.nii',
19901992
... 'functional2.nii',

0 commit comments

Comments
 (0)