Skip to content

Commit d9779eb

Browse files
committed
Merge remote-tracking branch 'nipy/master'
2 parents f20b07f + d387481 commit d9779eb

File tree

23 files changed

+1173
-109
lines changed

23 files changed

+1173
-109
lines changed

CHANGES

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Upcoming Release
22
=====================
33

4+
* ENH: Sphinx extension to plot workflows (https://github.com/nipy/nipype/pull/1896)
45
* ENH: Added non-steady state detector for EPI data (https://github.com/nipy/nipype/pull/1839)
56
* ENH: Enable new BBRegister init options for FSv6+ (https://github.com/nipy/nipype/pull/1811)
67
* REF: Splits nipype.interfaces.utility into base, csv, and wrappers (https://github.com/nipy/nipype/pull/1828)
@@ -22,7 +23,7 @@ Upcoming Release
2223

2324
0.13.0-rc1 (January 4, 2017)
2425
===============================
25-
26+
2627
* FIX: Compatibility with traits 4.6 (https://github.com/nipy/nipype/pull/1770)
2728
* FIX: Multiproc deadlock (https://github.com/nipy/nipype/pull/1756)
2829
* TST: Replace nose and unittest with pytest (https://github.com/nipy/nipype/pull/1722, https://github.com/nipy/nipype/pull/1751)

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@
4242
# Add any Sphinx extension module names here, as strings. They can be extensions
4343
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
4444
extensions = ['sphinx.ext.todo',
45-
'sphinx.ext.pngmath',
45+
'sphinx.ext.imgmath',
4646
'sphinx.ext.inheritance_diagram',
4747
'sphinx.ext.graphviz',
4848
'sphinx.ext.autodoc',
4949
'sphinx.ext.doctest',
50-
'sphinx.ext.pngmath',
5150
'sphinx.ext.autosummary',
5251
'numpy_ext.numpydoc',
5352
'matplotlib.sphinxext.plot_directive',
5453
'matplotlib.sphinxext.only_directives',
54+
'nipype.sphinxext.plot_workflow',
5555
#'IPython.sphinxext.ipython_directive',
5656
#'IPython.sphinxext.ipython_console_highlighting'
5757
]

doc/documentation.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ Previous versions: `0.12.0 <http://nipype.readthedocs.io/en/0.12.0/>`_ `0.11.0
2424
:maxdepth: 2
2525

2626
users/index
27+
2728
.. toctree::
2829
:maxdepth: 1
2930

3031
changes
32+
3133
* Developer
3234

3335
.. toctree::

doc/users/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
mipav
4040
nipypecmd
4141
aws
42+
resource_sched_profiler
43+
sphinx_ext
4244

4345

4446

doc/users/sphinx_ext.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
.. _sphinx_ext:
3+
4+
Sphinx extensions
5+
-----------------
6+
7+
8+
To help users document their *Nipype*-based code, the software is shipped
9+
with a set of extensions (currently only one) to customize the appearance
10+
and simplify the generation process.
11+
12+
.. automodule:: nipype.sphinxext.plot_workflow
13+
:undoc-members:
14+
:noindex:

nipype/info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def get_nipype_gitversion():
152152
]
153153

154154
EXTRA_REQUIRES = {
155-
'doc': ['Sphinx>=0.3', 'matplotlib', 'pydotplus'],
155+
'doc': ['Sphinx>=1.4', 'matplotlib', 'pydotplus'],
156156
'tests': TESTS_REQUIRES,
157157
'fmri': ['nitime', 'nilearn', 'dipy', 'nipy', 'matplotlib'],
158158
'profiler': ['psutil'],

nipype/interfaces/afni/utils.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ class AutoboxInputSpec(AFNICommandInputSpec):
115115
desc='Number of extra voxels to pad on each side of box')
116116
out_file = File(
117117
argstr='-prefix %s',
118-
name_source='in_file')
118+
name_source='in_file',
119+
name_template='%s_autobox')
119120
no_clustering = traits.Bool(
120121
argstr='-noclust',
121122
desc='Don\'t do any clustering to find box. Any non-zero voxel will '
@@ -151,7 +152,7 @@ class Autobox(AFNICommand):
151152
>>> abox.inputs.in_file = 'structural.nii'
152153
>>> abox.inputs.padding = 5
153154
>>> abox.cmdline # doctest: +ALLOW_UNICODE
154-
'3dAutobox -input structural.nii -prefix structural_generated -npad 5'
155+
'3dAutobox -input structural.nii -prefix structural_autobox -npad 5'
155156
>>> res = abox.run() # doctest: +SKIP
156157
157158
"""
@@ -161,7 +162,7 @@ class Autobox(AFNICommand):
161162
output_spec = AutoboxOutputSpec
162163

163164
def aggregate_outputs(self, runtime=None, needed_outputs=None):
164-
outputs = self._outputs()
165+
outputs = super(Autobox, self).aggregate_outputs(runtime, needed_outputs)
165166
pattern = 'x=(?P<x_min>-?\d+)\.\.(?P<x_max>-?\d+) '\
166167
'y=(?P<y_min>-?\d+)\.\.(?P<y_max>-?\d+) '\
167168
'z=(?P<z_min>-?\d+)\.\.(?P<z_max>-?\d+)'
@@ -172,13 +173,8 @@ def aggregate_outputs(self, runtime=None, needed_outputs=None):
172173
for k in list(d.keys()):
173174
d[k] = int(d[k])
174175
outputs.set(**d)
175-
outputs.set(out_file=self._gen_filename('out_file'))
176176
return outputs
177177

178-
def _gen_filename(self, name):
179-
if name == 'out_file' and (not isdefined(self.inputs.out_file)):
180-
return Undefined
181-
return super(Autobox, self)._gen_filename(name)
182178

183179

184180
class BrickStatInputSpec(CommandLineInputSpec):

nipype/interfaces/freesurfer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
MRIFill, MRIsInflate, Sphere, FixTopology, EulerNumber,
2222
RemoveIntersection, MakeSurfaces, Curvature, CurvatureStats,
2323
Jacobian, MRIsCalc, VolumeMask, ParcellationStats, Contrast,
24-
RelabelHypointensities, Aparc2Aseg, Apas2Aseg)
24+
RelabelHypointensities, Aparc2Aseg, Apas2Aseg, MRIsExpand)
2525
from .longitudinal import (RobustTemplate, FuseSegmentations)
2626
from .registration import (MPRtoMNI305, RegisterAVItoTalairach, EMRegister, Register,
2727
Paint)
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..utils import MRIsExpand
4+
5+
6+
def test_MRIsExpand_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
distance=dict(argstr='%g',
10+
mandatory=True,
11+
position=-2,
12+
),
13+
dt=dict(argstr='-T %g',
14+
),
15+
environ=dict(nohash=True,
16+
usedefault=True,
17+
),
18+
ignore_exception=dict(nohash=True,
19+
usedefault=True,
20+
),
21+
in_file=dict(argstr='%s',
22+
copyfile=False,
23+
mandatory=True,
24+
position=-3,
25+
),
26+
navgs=dict(argstr='-navgs %d %d',
27+
),
28+
nsurfaces=dict(argstr='-N %d',
29+
),
30+
out_name=dict(argstr='%s',
31+
position=-1,
32+
usedefault=True,
33+
),
34+
pial=dict(argstr='-pial %s',
35+
copyfile=False,
36+
),
37+
smooth_averages=dict(argstr='-A %d',
38+
),
39+
sphere=dict(copyfile=False,
40+
usedefault=True,
41+
),
42+
spring=dict(argstr='-S %g',
43+
),
44+
subjects_dir=dict(),
45+
terminal_output=dict(nohash=True,
46+
),
47+
thickness=dict(argstr='-thickness',
48+
),
49+
thickness_name=dict(argstr='-thickness_name %s',
50+
copyfile=False,
51+
),
52+
write_iterations=dict(argstr='-W %d',
53+
),
54+
)
55+
inputs = MRIsExpand.input_spec()
56+
57+
for key, metadata in list(input_map.items()):
58+
for metakey, value in list(metadata.items()):
59+
assert getattr(inputs.traits()[key], metakey) == value
60+
61+
62+
def test_MRIsExpand_outputs():
63+
output_map = dict(out_file=dict(),
64+
)
65+
outputs = MRIsExpand.output_spec()
66+
67+
for key, metadata in list(output_map.items()):
68+
for metakey, value in list(metadata.items()):
69+
assert getattr(outputs.traits()[key], metakey) == value

nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,25 @@ def test_ReconAll_outputs():
124124
aparc_stats=dict(altkey='aparc',
125125
loc='stats',
126126
),
127+
area_pial=dict(altkey='area.pial',
128+
loc='surf',
129+
),
127130
aseg=dict(loc='mri',
128131
),
129132
aseg_stats=dict(altkey='aseg',
130133
loc='stats',
131134
),
135+
avg_curv=dict(loc='surf',
136+
),
132137
brain=dict(loc='mri',
133138
),
134139
brainmask=dict(loc='mri',
135140
),
136141
curv=dict(loc='surf',
137142
),
143+
curv_pial=dict(altkey='curv.pial',
144+
loc='surf',
145+
),
138146
curv_stats=dict(altkey='curv',
139147
loc='stats',
140148
),
@@ -145,6 +153,8 @@ def test_ReconAll_outputs():
145153
),
146154
inflated=dict(loc='surf',
147155
),
156+
jacobian_white=dict(loc='surf',
157+
),
148158
label=dict(altkey='*label',
149159
loc='label',
150160
),

0 commit comments

Comments
 (0)