Skip to content

Commit f59c467

Browse files
committed
Merge branch 'master' into enh/JSONFileSink
2 parents 69e09f4 + ccc4166 commit f59c467

File tree

293 files changed

+26512
-3587
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

293 files changed

+26512
-3587
lines changed

.travis.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
1+
cache:
2+
- apt
13
language: python
24
python:
35
- 2.6
46
- 2.7
7+
env:
8+
- INSTALL_DEB_DEPENDECIES=true
9+
- INSTALL_DEB_DEPENDECIES=false
510
# Setup anaconda
611
before_install:
7-
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda-3.0.0-Linux-x86_64.sh -O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-3.0.0-Linux-x86_64.sh -O miniconda.sh; fi
12+
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-3.6.0-Linux-x86_64.sh -O miniconda.sh; fi
813
- chmod +x miniconda.sh
914
- ./miniconda.sh -b
1015
- export PATH=/home/travis/miniconda/bin:$PATH
11-
# The next couple lines fix a crash with multiprocessing on Travis
12-
- sudo rm -rf /dev/shm
13-
- sudo ln -s /run/shm /dev/shm
14-
- bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh)
15-
- travis_retry sudo apt-get install -qq --no-install-recommends fsl afni
16-
- travis_retry sudo apt-get install -qq fsl-atlases
17-
- source /etc/fsl/fsl.sh
16+
- if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; fi
17+
- if $INSTALL_DEB_DEPENDECIES; then sudo ln -s /run/shm /dev/shm; fi
18+
- if $INSTALL_DEB_DEPENDECIES; then bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh); fi
19+
- if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -qq --no-install-recommends fsl afni elastix; fi
20+
- if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -qq fsl-atlases; fi
21+
- if $INSTALL_DEB_DEPENDECIES; then source /etc/fsl/fsl.sh; fi
1822

1923
# Install packages
2024
install:

CHANGES

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,60 @@
1-
Next Release
1+
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``).
5-
* ENH: New ANTs interface: ApplyTransformsToPoints
4+
* ENH: Updated N4BiasCorrection input spec to include weight image and spline order. Made
5+
argument formatting consistent. Cleaned ants.segmentation according to PEP8.
6+
(https://github.com/nipy/nipype/pull/990/files)
7+
* ENH: SPM12 Normalize interface (https://github.com/nipy/nipype/pull/986)
8+
* FIX: Utility interface test dir (https://github.com/nipy/nipype/pull/986)
9+
* FIX: IPython engine directory reset after crash (https://github.com/nipy/nipype/pull/987)
10+
* ENH: Resting state fMRI example with NiPy realignment and no SPM (https://github.com/nipy/nipype/pull/992)
11+
* FIX: Corrected Freesurfer SegStats _list_outputs to avoid error if summary_file is
12+
undefined (issue #994)(https://https://github.com/nipy/nipype/pull/996)
13+
* FIX: OpenfMRI support and FSL 5.0.7 changes (https://github.com/nipy/nipype/pull/1006)
14+
15+
Release 0.10.0 (October 10, 2014)
16+
============
17+
18+
* ENH: New miscelaneous interfaces: SplitROIs (mapper), MergeROIs (reducer)
19+
to enable parallel processing of very large images.
20+
* ENH: Updated FSL interfaces: BEDPOSTX and XFibres, former interfaces are still
21+
available with the version suffix: BEDPOSTX4 and XFibres4. Added gpu
22+
versions of BEDPOSTX: BEDPOSTXGPU, BEDPOSTX5GPU, and BEDPOSTX4GPU
23+
* ENH: Added experimental support for MIPAV algorithms thorugh JIST plugins
24+
* ENH: New dipy interfaces: Denoise, Resample
25+
* ENH: New Freesurfer interfaces: Tkregister2 (for conversion of fsl style matrices to freesurfer format), MRIPretess
26+
* ENH: New FSL interfaces: WarpPoints, WarpPointsToStd, EpiReg, ProbTrackX2, WarpUtils, ConvertWarp
27+
* ENH: New miscelaneous interfaces: AddCSVRow, NormalizeProbabilityMapSet, AddNoise
28+
* ENH: New AFNI interfaces: Eval, Means, SVMTest, SVMTrain
29+
* ENH: FUGUE interface has been refactored to use the name_template system, 3 examples
30+
added to doctests, some bugs solved.
31+
* API: Interfaces to external packages are no longer available in the top-level
32+
``nipype`` namespace, and must be imported directly (e.g.
33+
``from nipype.interfaces import fsl``).
34+
* ENH: Support for elastix via a set of new interfaces: Registration, ApplyWarp,
35+
AnalyzeWarp, PointsWarp, and EditTransform
36+
* ENH: New ANTs interface: ApplyTransformsToPoints, LaplacianThickness
37+
* ENH: New Diffusion Toolkit interface: TrackMerge
38+
* ENH: New MRtrix interface: FilterTracks
39+
* ENH: New metrics group in algorithms. Now Distance, Overlap, and FuzzyOverlap
40+
are found in nipype.algorithms.metrics instead of misc. Overlap interface
41+
extended to allow files containing multiple ROIs and volume physical units.
42+
* ENH: New interface in algorithms.metrics: ErrorMap (a voxel-wise diff map).
643
* ENH: New FreeSurfer workflow: create_skullstripped_recon_flow()
44+
* ENH: Deep revision of workflows for correction of dMRI artifacts. New dmri_preprocessing
45+
example.
746
* ENH: New data grabbing interface that works over SSH connections, SSHDataGrabber
47+
* ENH: New color mode for write_graph
48+
* ENH: You can now force MapNodes to be run serially
49+
* ENH: Added ANTS based openfmri workflow
50+
* ENH: MapNode now supports flattening of nested lists
51+
* ENH: Support for headless mode using Xvfb
52+
* ENH: nipype_display_crash has a debugging mode
853
* FIX: MRTrix tracking algorithms were ignoring mask parameters.
54+
* FIX: FNIRT registration pathway and associated OpenFMRI example script
55+
* FIX: spm12b compatibility for Model estimate
56+
* FIX: Batch scheduler controls the number of maximum jobs properly
57+
* FIX: Update for FSL 5.0.7 which deprecated Contrast Manager
958

1059
Release 0.9.2 (January 31, 2014)
1160
============
@@ -26,7 +75,8 @@ Release 0.9.0 (December 20, 2013)
2675
* ENH: new tools for defining workflows: JoinNode, synchronize and itersource
2776
* ENH: W3C PROV support with optional RDF export built into Nipype
2877
* ENH: Added support for Simple Linux Utility Resource Management (SLURM)
29-
* ENH: AFNI interfaces refactor, prefix, suffix are replaced by "flexible_%s_templates"
78+
* ENH: AFNI interfaces refactor, prefix, suffix are replaced by
79+
"flexible_%s_templates"
3080
* ENH: New SPM interfaces:
3181
- spm.ResliceToReference,
3282
- spm.DicomImport

CONTRIBUTING.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## Contributing pull-requests (PRs)
2+
3+
* All work is submitted via Pull Requests.
4+
* Pull Requests can be submitted as soon as there is code worth discussing.
5+
Pull Requests track the branch, so you can continue to work after the PR is submitted.
6+
Review and discussion can begin well before the work is complete,
7+
and the more discussion the better.
8+
The worst case is that the PR is closed.
9+
* Pull Requests should generally be made against master
10+
* Pull Requests should be tested, if feasible:
11+
- bugfixes should include regression tests
12+
- new behavior should at least get minimal exercise
13+
* Use a descriptive prefix for your PR: ENH, FIX, TST, DOC, STY, REF (refactor), WIP (Work in progress)
14+
* After submiting the PR, include an update to the CHANGES file: prefix: description (URL of pull request)
15+
* `make specs`
16+
* do: `make check-before-commit` before submitting the PR. This will require you to either install or be in developer mode with: `python setup.py install/develop`.
17+
18+
## Contributing issues
19+
20+
When opening a new Issue, please take the following steps:
21+
22+
1. Search GitHub and/or [Neurostars](neurostars.org) for your issue to avoid duplicate reports.
23+
Keyword searches for your error messages are most helpful.
24+
2. If possible, try updating to master and reproducing your issue,
25+
because we may have already fixed it.
26+
3. OS and version
27+
4. Nipype version
28+
5. Output of: `import nipype; nipype.get_info()`
29+
6. Versions of underlying tools (e.g., ANTS, FSL, SPM, etc.,.)
30+
7. Any script, or output log, in a gist (gist.github.com)
31+
8. When applicable, and where possible, pointers to relevant data files.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ specs:
7070
@echo "Checking specs and autogenerating spec tests"
7171
python tools/checkspecs.py
7272

73-
check-before-commit: trailing-spaces html test specs
73+
check-before-commit: specs trailing-spaces html test
7474
@echo "removed spaces"
7575
@echo "built docs"
7676
@echo "ran test"

README.rst

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,25 @@ NIPYPE: Neuroimaging in Python: Pipelines and Interfaces
88
.. image:: https://coveralls.io/repos/nipy/nipype/badge.png
99
:target: https://coveralls.io/r/nipy/nipype
1010

11+
.. image:: https://pypip.in/version/nipype/badge.png
12+
:target: https://pypi.python.org/pypi/nipype/
13+
:alt: Latest Version
14+
15+
.. image:: https://pypip.in/download/nipype/badge.png
16+
:target: https://pypi.python.org/pypi/nipype/
17+
:alt: Downloads
18+
19+
.. image:: https://pypip.in/py_versions/nipype/badge.png
20+
:target: https://pypi.python.org/pypi/nipype/
21+
:alt: Supported Python versions
22+
23+
.. image:: https://pypip.in/status/nipype/badge.png
24+
:target: https://pypi.python.org/pypi/nipype/
25+
:alt: Development Status
26+
27+
.. image:: https://pypip.in/license/nipype/badge.png
28+
:target: https://pypi.python.org/pypi/nipype/
29+
:alt: License
1130

1231
Current neuroimaging software offer users an incredible opportunity to
1332
analyze data using a variety of different algorithms. However, this has
@@ -19,7 +38,7 @@ umbrella of NiPy, is a Python project that provides a uniform interface
1938
to existing neuroimaging software and facilitates interaction between
2039
these packages within a single workflow. Nipype provides an environment
2140
that encourages interactive exploration of algorithms from different
22-
packages (e.g., SPM, FSL, FreeSurfer, AFNI, Slicer), eases the
41+
packages (e.g., SPM, FSL, FreeSurfer, AFNI, Slicer, ANTS), eases the
2342
design of workflows within and between packages, and reduces the
2443
learning curve necessary to use different packages. Nipype is creating a
2544
collaborative platform for neuroimaging software development in a
@@ -44,29 +63,31 @@ documentation.
4463
Website
4564
-------
4665

47-
Information specific to NIPYPE is located here::
66+
Information specific to Nipype is located here::
4867
4968
http://nipy.org/nipype
5069

5170

52-
Mailing Lists
53-
-------------
54-
55-
For core NIPYPE related issues, please see the developer's list here::
56-
57-
http://projects.scipy.org/mailman/listinfo/nipy-devel
71+
Support and Communication
72+
-------------------------
5873

59-
For user NIPYPE related issues, please see the user's list here::
74+
If you have a problem or would like to ask a question about how to do something in Nipype please submit a question
75+
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. All previous Nipype questions are available here::
6076

61-
http://groups.google.com/group/nipy-user
77+
http://neurostars.org/t/nipype/
78+
6279

63-
For NIPYPE related issues, please add *NIPYPE* to the subject line
80+
To participate in the Nipype development related discussion please use the following mailing list::
81+
82+
http://projects.scipy.org/mailman/listinfo/nipy-devel
83+
84+
Please add *[nipype]* to the subject line when posting on the mailing list.
6485

6586

66-
NIPYPE structure
87+
Nipype structure
6788
----------------
6889

69-
Currently NIPYPE consists of the following files and directories:
90+
Currently Nipype consists of the following files and directories:
7091

7192
INSTALL
7293
NIPYPE prerequisites, installation, development, testing, and

bin/nipype_display_crash

Lines changed: 59 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,85 @@
11
#!/usr/bin/env python
22
"""Displays crash information from Nipype crash files. For certain crash files,
33
one can rerun a failed node in a temp directory.
4-
"""
54
6-
import argparse
7-
from nipype.utils.filemanip import loadcrash
5+
Examples:
6+
7+
nipype_display_crash crashfile.pklz
8+
nipype_display_crash crashfile.pklz -r -i
9+
nipype_display_crash crashfile.pklz -r -i
10+
11+
"""
812

9-
def display_crash_files(crashfile, rerun):
13+
def display_crash_files(crashfile, rerun, debug, directory):
1014
"""display crash file content and rerun if required"""
1115

16+
from nipype.utils.filemanip import loadcrash
1217
crash_data = loadcrash(crashfile)
1318
node = None
1419
if 'node' in crash_data:
1520
node = crash_data['node']
1621
tb = crash_data['traceback']
17-
print "\n"
18-
print "File: %s"%crashfile
22+
print("\n")
23+
print("File: %s" % crashfile)
1924
if node:
20-
print "Node: %s"%node
25+
print("Node: %s" % node)
2126
if node.base_dir:
22-
print "Working directory: %s"%node.output_dir()
27+
print("Working directory: %s" % node.output_dir())
2328
else:
24-
print "Node crashed before execution"
25-
print "\n"
26-
print "Node inputs:"
27-
print node.inputs
28-
print "\n"
29-
print "Traceback: "
30-
print ''.join(tb)
31-
print "\n"
29+
print("Node crashed before execution")
30+
print("\n")
31+
print("Node inputs:")
32+
print(node.inputs)
33+
print("\n")
34+
print("Traceback: ")
35+
print(''.join(tb))
36+
print ("\n")
3237

3338
if rerun:
3439
if node is None:
35-
print "No node in crashfile. Cannot rerun"
40+
print("No node in crashfile. Cannot rerun")
3641
return
37-
print "Rerunning node"
38-
node.base_dir = None
42+
print("Rerunning node")
43+
node.base_dir = directory
3944
node.config = {'execution': {'crashdump_dir': '/tmp'}}
40-
node.run()
41-
print "\n"
45+
try:
46+
node.run()
47+
except:
48+
if debug and debug != 'ipython':
49+
import pdb
50+
pdb.post_mortem()
51+
else:
52+
raise
53+
print("\n")
4254

4355
if __name__ == "__main__":
44-
parser = argparse.ArgumentParser(prog='nipype_display_crash',
45-
description=__doc__)
56+
from argparse import ArgumentParser, RawTextHelpFormatter
57+
defstr = ' (default %(default)s)'
58+
parser = ArgumentParser(prog='nipype_display_crash',
59+
description=__doc__,
60+
formatter_class=RawTextHelpFormatter)
4661
parser.add_argument('crashfile', metavar='f', type=str,
47-
help='crash file to display')
62+
help='crash file to display')
4863
parser.add_argument('-r','--rerun', dest='rerun',
4964
default=False, action="store_true",
50-
help='rerun crashed node')
65+
help='rerun crashed node' + defstr)
66+
group = parser.add_mutually_exclusive_group()
67+
group.add_argument('-d','--debug', dest='debug',
68+
default=False, action="store_true",
69+
help='enable python debugger when re-executing' + defstr)
70+
group.add_argument('-i','--ipydebug', dest='ipydebug',
71+
default=False, action="store_true",
72+
help='enable ipython debugger when re-executing' + defstr)
73+
parser.add_argument('--dir', dest='directory',
74+
default=None,
75+
help='Directory to run the node in' + defstr)
5176
args = parser.parse_args()
52-
53-
display_crash_files(args.crashfile, args.rerun)
77+
debug = 'ipython' if args.ipydebug else args.debug
78+
if debug == 'ipython':
79+
import sys
80+
from IPython.core import ultratb
81+
sys.excepthook = ultratb.FormattedTB(mode='Verbose',
82+
color_scheme='Linux',
83+
call_pdb=1)
84+
display_crash_files(args.crashfile, args.rerun,
85+
debug, args.directory)

doc/_templates/indexsidebar.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ <h3>{{ _('Links') }}</h3>
44
<ul>
55
<li>Docs: <a href="http://nipy.org/nipype">Stable</a> · <a href="http://www.mit.edu/~satra/nipype-nightly/">Nightly</a></li>
66
<li>Code: <a href="http://github.com/nipy/nipype">Github</a> · <a href="http://github.com/nipy/nipype/issues">Bugs-Requests</a></li>
7-
<li>Forum: <a href="http://groups.google.com/group/nipy-user">User</a> · <a href="http://projects.scipy.org/mailman/listinfo/nipy-devel">Developer</a></li>
8-
<li>Info: <a href="http://nipy.org/software/license/index.html">License</a> · <a href="http://nipy.org/about/funding.html">Funding</a></li>
7+
<li>Forum: <a href="http://neurostars.org/t/nipype">User</a> · <a href="http://projects.scipy.org/mailman/listinfo/nipy-devel">Developer</a></li>
8+
<li><a href="http://nipy.org/software/license/index.html"><img src="https://pypip.in/license/nipype/badge.png" alt="License"></a> · <a href="http://nipy.org/about/funding.html">Funding</a></li>
99
<li><a href="https://travis-ci.org/nipy/nipype"><img src="https://travis-ci.org/nipy/nipype.png?branch=master" alt="travis"></a> · <a href='https://coveralls.io/r/nipy/nipype'><img src='https://coveralls.io/repos/nipy/nipype/badge.png' alt='Coverage Status' /></a></li>
10+
<li><a href="https://pypi.python.org/pypi/nipype/"><img src="https://pypip.in/download/nipype/badge.png" alt="Downloads"></a> · <a href='https://pypi.python.org/pypi/nipype/'><img src='https://pypip.in/py_versions/nipype/badge.png' alt='Python Versions' /></a></li>
1011
</ul>
1112

1213
{% endblock %}

doc/_templates/sidebar_versions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h3>{{ _('Versions') }}</h3>
1717
<td align="left">Release</td><td align="right">Devel</td>
1818
</tr>
1919
<tr>
20-
<td align="left">0.9.2</td><td align="right">1.0-dev</td>
20+
<td align="left">0.10.0</td><td align="right">1.0-dev</td>
2121
</tr>
2222
<tr>
2323
<td align="left"><a href="{{pathto('users/install')}}">Download</a></td>

doc/conf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
'sphinx.ext.autosummary',
3939
'numpy_ext.numpydoc',
4040
'matplotlib.sphinxext.plot_directive',
41-
'matplotlib.sphinxext.only_directives'
41+
'matplotlib.sphinxext.only_directives',
42+
'IPython.sphinxext.ipython_directive',
43+
'IPython.sphinxext.ipython_console_highlighting'
4244
]
4345

4446
# Add any paths that contain templates here, relative to this directory.
@@ -55,7 +57,7 @@
5557

5658
# General information about the project.
5759
project = u'nipype'
58-
copyright = u'2009-13, Neuroimaging in Python team'
60+
copyright = u'2009-14, Neuroimaging in Python team'
5961

6062
# The version info for the project you're documenting, acts as replacement for
6163
# |version| and |release|, also used in various other places throughout the

doc/devel/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ conventions documented in the `NIPY Developers Guide
1818
gitwash/index
1919
architecture
2020
provenance
21+
software_using_nipype
2122

2223

2324
.. include:: ../links_names.txt

doc/devel/interface_specs.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,9 @@ If you used genfile:
404404

405405
And optionally:
406406

407+
* ``_redirect_x``: If set to True it will make Nipype start Xvfb before running the interface and redirect X output to it. This is useful for
408+
commandlines that spawn a graphical user interface.
409+
407410
* ``_format_arg(name, spec, value)``: For extra formatting of the input values before passing them to generic ``_parse_inputs()`` method.
408411

409412
For example this is the class definition for Flirt, minus the docstring::

0 commit comments

Comments
 (0)