Skip to content

Commit 14179a0

Browse files
committed
Merge branch 'master' into enh/DipyImproveTDI
Conflicts: CHANGES
2 parents c32da92 + 58c3b1d commit 14179a0

File tree

226 files changed

+6593
-1459
lines changed

Some content is hidden

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

226 files changed

+6593
-1459
lines changed

.travis.yml

Lines changed: 40 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,48 @@
11
cache:
2-
- apt
2+
- apt
33
language: python
44
python:
5-
- 2.7
5+
- 2.7
66
env:
7-
- INSTALL_DEB_DEPENDECIES=true
8-
- INSTALL_DEB_DEPENDECIES=false
9-
# Setup anaconda
7+
- INSTALL_DEB_DEPENDECIES=true
8+
- INSTALL_DEB_DEPENDECIES=false
109
before_install:
11-
- 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
12-
- chmod +x miniconda.sh
13-
- ./miniconda.sh -b
14-
- export PATH=/home/travis/miniconda/bin:$PATH
15-
- if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; fi
16-
- if $INSTALL_DEB_DEPENDECIES; then sudo ln -s /run/shm /dev/shm; fi
17-
- if $INSTALL_DEB_DEPENDECIES; then bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh); fi
18-
- if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -qq --no-install-recommends fsl afni elastix; fi
19-
- if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -qq fsl-atlases; fi
20-
- if $INSTALL_DEB_DEPENDECIES; then source /etc/fsl/fsl.sh; fi
21-
22-
# Install packages
10+
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
11+
-O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-3.6.0-Linux-x86_64.sh
12+
-O miniconda.sh; fi
13+
- chmod +x miniconda.sh
14+
- "./miniconda.sh -b"
15+
- export PATH=/home/travis/miniconda/bin:$PATH
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);
19+
fi
20+
- if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -qq --no-install-recommends
21+
fsl afni elastix; fi
22+
- if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -qq fsl-atlases;
23+
fi
24+
- if $INSTALL_DEB_DEPENDECIES; then source /etc/fsl/fsl.sh; fi
2325
install:
24-
- conda update --yes conda
25-
- conda create -n testenv --yes pip python=$TRAVIS_PYTHON_VERSION
26-
- source activate testenv
27-
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then pip install ordereddict; fi
28-
- conda install --yes numpy scipy nose traits networkx dateutil
29-
- pip install nibabel
30-
- pip install python-coveralls
31-
- pip install nose-cov
32-
- pip install https://github.com/RDFLib/rdflib/archive/master.zip
33-
- pip install https://github.com/trungdong/prov/archive/rdf.zip
34-
- python setup.py install
35-
36-
# Run test
26+
- conda update --yes conda
27+
- conda create -n testenv --yes pip python=$TRAVIS_PYTHON_VERSION
28+
- source activate testenv
29+
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then pip install ordereddict; fi
30+
- conda install --yes numpy scipy nose traits networkx dateutil
31+
- pip install nibabel
32+
- pip install python-coveralls
33+
- pip install nose-cov
34+
- pip install https://github.com/RDFLib/rdflib/archive/master.zip
35+
- pip install https://github.com/trungdong/prov/archive/rdf.zip
36+
- python setup.py install
3737
script:
38-
- nosetests --with-doctest --with-cov --cov nipype --cov-config .coveragerc --logging-level=INFO
39-
40-
# Calculate coverage
38+
- nosetests --with-doctest --with-cov --cov nipype --cov-config .coveragerc --logging-level=INFO
4139
after_success:
42-
- coveralls --config_file .coveragerc
40+
- coveralls --config_file .coveragerc
41+
deploy:
42+
provider: pypi
43+
user: satra
44+
password:
45+
secure: ZaN6Y4hfybPMi1rW3Qe03irCe/3GU4J4BJsjG+tClVN5Fjc3FCJaYU0k4wNd9q2kMjuRDv1efA9BN/5QasJS32oqs6wHvxzIWA18ucel4BBnAAkuviC1vqi/8Hk/DGB6e1gnmZ1Nv58zVLfn0MwlOKmsGDtvGQWc+HbaV2fS5NA=
46+
on:
47+
tags: true
48+
branch: master

CHANGES

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
Next release
22
============
33

4-
* ENH: Improved TrackDensityMap of dipy (https://github.com/nipy/nipype/pull/1091)
4+
* ENH: dipy.TrackDensityMap interface now accepts a reference image (https://github.com/nipy/nipype/pull/1091)
5+
* FIX: Bug in XFibres5 (https://github.com/nipy/nipype/pull/1168)
6+
* ENH: Attempt to use hard links for data sink.
7+
(https://github.com/nipy/nipype/pull/1161)
8+
* FIX: Updates to SGE Plugins
9+
(https://github.com/nipy/nipype/pull/1129)
10+
* ENH: Add ants JointFusion() node with testing
11+
(https://github.com/nipy/nipype/pull/1160)
12+
* ENH: Add --float option for antsRegistration calls
13+
(https://github.com/nipy/nipype/pull/1159)
514
* ENH: Added interface to simulate DWIs using the multi-tensor model
615
(https://github.com/nipy/nipype/pull/1085)
716
* ENH: New interface for FSL fslcpgeom utility (https://github.com/nipy/nipype/pull/1152)
17+
* ENH: Added SLURMGraph plugin for submitting jobs to SLURM with dependencies (https://github.com/nipy/nipype/pull/1136)
818
* FIX: Enable absolute path definitions in DCMStack (https://github.com/nipy/nipype/pull/1089,
919
replaced by https://github.com/nipy/nipype/pull/1093)
1020
* ENH: New mesh.MeshWarpMaths to operate on surface-defined warpings

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ include doc/documentation.zip
1010
include nipype/COMMIT_INFO.txt
1111

1212
recursive-include doc *
13-
recursive-include matlabscripts *
1413
recursive-include tools *

README.rst

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,33 @@ NIPYPE: Neuroimaging in Python: Pipelines and Interfaces
44

55
.. image:: https://travis-ci.org/nipy/nipype.png?branch=master
66
:target: https://travis-ci.org/nipy/nipype
7+
8+
.. image:: https://circleci.com/gh/nipy/nipype/tree/master.svg?style=svg
9+
:target: https://circleci.com/gh/nipy/nipype/tree/master
710

811
.. image:: https://coveralls.io/repos/nipy/nipype/badge.png
912
:target: https://coveralls.io/r/nipy/nipype
13+
14+
.. image:: https://www.codacy.com/project/badge/182f27944c51474490b369d0a23e2f32
15+
:target: https://www.codacy.com/app/krzysztof-gorgolewski/nipy_nipype
1016

11-
.. image:: https://pypip.in/version/nipype/badge.png
17+
.. image:: https://img.shields.io/pypi/v/nipype.svg
1218
:target: https://pypi.python.org/pypi/nipype/
1319
:alt: Latest Version
1420

15-
.. image:: https://pypip.in/download/nipype/badge.png
21+
.. image:: https://img.shields.io/pypi/dm/nipype.svg
1622
:target: https://pypi.python.org/pypi/nipype/
1723
:alt: Downloads
1824

19-
.. image:: https://pypip.in/py_versions/nipype/badge.png
25+
.. image:: https://img.shields.io/pypi/pyversions/nipype.svg
2026
:target: https://pypi.python.org/pypi/nipype/
2127
:alt: Supported Python versions
2228

23-
.. image:: https://pypip.in/status/nipype/badge.png
29+
.. image:: https://img.shields.io/pypi/status/nipype.svg
2430
:target: https://pypi.python.org/pypi/nipype/
2531
:alt: Development Status
2632

27-
.. image:: https://pypip.in/license/nipype/badge.png
33+
.. image:: https://img.shields.io/pypi/l/nipype.svg
2834
:target: https://pypi.python.org/pypi/nipype/
2935
:alt: License
3036

circle.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
dependencies:
2+
cache_directories:
3+
- "~/examples/data"
4+
- "~/examples/fsdata"
5+
- "~/examples/feeds"
6+
- "~/mcr"
7+
- "~/spm12"
8+
- "~/examples/fsl_course_data"
9+
override:
10+
- pip install --upgrade pip
11+
- pip install -e .
12+
- pip install matplotlib sphinx ipython
13+
- if [[ ! -d ~/examples/data ]]; then wget "http://tcpdiag.dl.sourceforge.net/project/nipy/nipype/nipype-0.2/nipype-tutorial.tar.bz2"; tar jxvf nipype-tutorial.tar.bz2; mkdir ~/examples; mv nipype-tutorial/* ~/examples/; fi
14+
# we download this manually because CircleCI does not cache apt
15+
- if [[ ! -d ~/examples/feeds ]]; then wget "http://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-5.0.8-feeds.tar.gz"; tar zxvf fsl-5.0.8-feeds.tar.gz; mv feeds ~/examples/; fi
16+
- if [[ ! -d ~/examples/fsl_course_data ]]; then wget -c "http://fsl.fmrib.ox.ac.uk/fslcourse/fdt1.tar.gz" ; wget -c "http://fsl.fmrib.ox.ac.uk/fslcourse/fdt2.tar.gz"; wget -c "http://fsl.fmrib.ox.ac.uk/fslcourse/tbss.tar.gz"; mkdir ~/examples/fsl_course_data; tar zxvf fdt1.tar.gz -C ~/examples/fsl_course_data; tar zxvf fdt2.tar.gz -C ~/examples/fsl_course_data; tar zxvf tbss.tar.gz -C ~/examples/fsl_course_data; fi
17+
- wget -O- http://neuro.debian.net/lists/trusty.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
18+
- sudo apt-key adv --recv-keys --keyserver hkp://pgp.mit.edu:80 0xA5D32F012649A5A9
19+
- sudo apt-get update -y; sudo apt-get install -y fsl-core fsl-atlases
20+
- bash ~/nipype/tools/install_spm_mcr.sh
21+
- mkdir -p ~/.nipype && echo "[logging]" > ~/.nipype/nipype.cfg && echo "workflow_level = DEBUG" >> ~/.nipype/nipype.cfg && echo "interface_level = DEBUG" >> ~/.nipype/nipype.cfg && echo "filemanip_level = DEBUG" >> ~/.nipype/nipype.cfg
22+
test:
23+
override:
24+
- . /usr/share/fsl/5.0/etc/fslconf/fsl.sh && nosetests --with-doctest --logging-level=DEBUG --verbosity=3:
25+
environment:
26+
SPMMCRCMD: "$HOME/spm12/run_spm12.sh $HOME/mcr/v85/ script"
27+
FORCE_SPMMCR: 1
28+
FSL_COURSE_DATA: "$HOME/examples/fsl_course_data"
29+
timeout: 2600
30+
- set -o pipefail && cd doc && make html 2>&1 | tee ~/log.txt
31+
- cat ~/log.txt && if grep -q "ERROR" ~/log.txt; then false; else true; fi
32+
- . /usr/share/fsl/5.0/etc/fslconf/fsl.sh && python ~/nipype/tools/run_examples.py fmri_fsl_feeds Linear l1pipeline:
33+
pwd: ../examples
34+
- . /usr/share/fsl/5.0/etc/fslconf/fsl.sh && python ~/nipype/tools/run_examples.py fmri_spm_dartel Linear level1 l2pipeline:
35+
pwd: ../examples
36+
environment:
37+
SPMMCRCMD: "$HOME/spm12/run_spm12.sh $HOME/mcr/v85/ script"
38+
FORCE_SPMMCR: 1
39+
timeout: 1600
40+
- . /usr/share/fsl/5.0/etc/fslconf/fsl.sh && python ~/nipype/tools/run_examples.py fmri_fsl_reuse Linear level1_workflow:
41+
pwd: ../examples
42+
- . /usr/share/fsl/5.0/etc/fslconf/fsl.sh && python ~/nipype/tools/run_examples.py fmri_spm_nested Linear level1 l2pipeline:
43+
pwd: ../examples
44+
environment:
45+
SPMMCRCMD: "$HOME/spm12/run_spm12.sh $HOME/mcr/v85/ script"
46+
FORCE_SPMMCR: 1
47+
48+
general:
49+
artifacts:
50+
- "doc/_build/html"
51+
- "~/log.txt"

doc/_templates/indexsidebar.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ <h3>{{ _('Links') }}</h3>
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>
77
<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>
8+
<li><a href="http://nipy.org/software/license/index.html"><img src="https://img.shields.io/pypi/l/nipype.svg" 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>
10+
<li><a href="https://pypi.python.org/pypi/nipype/"><img src="https://img.shields.io/pypi/dm/nipype.svg" alt="Downloads"></a> · <a href='https://pypi.python.org/pypi/nipype/'><img src='https://img.shields.io/pypi/pyversions/nipype.svg' alt='Python Versions' /></a></li>
1111
</ul>
1212

1313
{% endblock %}

doc/_templates/sidebar_versions.html

Lines changed: 2 additions & 2 deletions
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.10.0</td><td align="right">1.0-dev</td>
20+
<td align="left">0.10.0</td><td align="right">{{ version }}</td>
2121
</tr>
2222
<tr>
2323
<td align="left"><a href="{{pathto('users/install')}}">Download</a></td>
@@ -29,7 +29,7 @@ <h3>{{ _('Versions') }}</h3>
2929
<div id="buttons">
3030
<div id="ohloh-use" style="margin-right: 25px; margin-top: -2px; float: left;">
3131
<script type="text/javascript"
32-
src="http://www.ohloh.net/p/480871/widgets/project_users_logo.js">
32+
src="https://www.openhub.net/p/480871/widgets/project_users_logo.js">
3333
</script>
3434
</div><!-- use -->
3535
<g:plusone size="medium" annotation="none"></g:plusone>

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
# General information about the project.
5959
project = u'nipype'
60-
copyright = u'2009-14, Neuroimaging in Python team'
60+
copyright = u'2009-15, Neuroimaging in Python team'
6161

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

doc/devel/cmd_interface_devel.rst

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ grouped into separate classes (usually suffixed with InputSpec and OutputSpec).
2121
For example:
2222

2323
.. testcode::
24-
24+
2525
class ExampleInputSpec(TraitedSpec):
2626
input_volume = File(desc = "Input volume", exists = True,
2727
mandatory = True)
2828
parameter = traits.Int(desc = "some parameter")
29-
29+
3030
class ExampleOutputSpec(TraitedSpec):
3131
output_volume = File(desc = "Output volume", exists = True)
32-
32+
3333
For the Traits (and Nipype) to work correctly output and input spec has to be
3434
inherited from TraitedSpec (however, this does not have to be direct
3535
inheritance).
@@ -39,7 +39,7 @@ above example we have used the ``desc`` metadata which holds human readable
3939
description of the input. The ``mandatory`` flag forces Nipype to throw an
4040
exception if the input was not set. ``exists`` is a special flag that works only
4141
for ``File traits`` and checks if the provided file exists. More details can be
42-
found at `interface_specs`_.
42+
found at :doc:`interface_specs`.
4343

4444
The input and output specifications have to be connected to the our example
4545
interface class:
@@ -49,13 +49,13 @@ interface class:
4949
class Example(Interface):
5050
input_spec = ExampleInputSpec
5151
output_spec = ExampleOutputSpec
52-
52+
5353
Where the names of the classes grouping inputs and outputs were arbitrary the
5454
names of the fields within the interface they are assigned are not (it always
5555
has to be input_spec and output_spec). Of course this interface does not do much
5656
because we have not specified how to process the inputs and create the outputs.
5757
This can be done in many ways.
58-
58+
5959
Command line executable
6060
=======================
6161

@@ -67,32 +67,32 @@ between the inputs and the generated command line. To achieve this we have
6767
added two metadata: ``argstr`` (string defining how the argument should be
6868
formated) and ``position`` (number defining the order of the arguments).
6969
For example
70-
70+
7171
.. testcode::
7272

7373
class ExampleInputSpec(CommandLineSpec):
7474
input_volume = File(desc = "Input volume", exists = True,
7575
mandatory = True, position = 0, argstr="%s")
7676
parameter = traits.Int(desc = "some parameter", argstr = "--param %d")
77-
77+
7878
As you probably noticed the ``argstr`` is a printf type string with formatting
7979
symbols. For an input defined in InputSpec to be included into the executed
8080
commandline ``argstr`` has to be included. Additionally inside the main
8181
interface class you need to specify the name of the executable by assigning it
8282
to the ``_cmd`` field. Also the main interface class needs to inherit from
83-
`CommandLine`_:
83+
:class:`nipype.interfaces.base.CommandLine`:
8484

8585
.. testcode::
8686

8787
class Example(CommandLine):
8888
_cmd = 'my_command'
8989
input_spec = ExampleInputSpec
9090
output_spec = ExampleOutputSpec
91-
91+
9292
There is one more thing we need to take care of. When the executable finishes
9393
processing it will presumably create some output files. We need to know which
9494
files to look for, check if they exist and expose them to whatever node would
95-
like to use them. This is done by implementing `_list_outputs`_ method in the
95+
like to use them. This is done by implementing ``_list_outputs`` method in the
9696
main interface class. Basically what it does is assigning the expected output
9797
files to the fields of our output spec:
9898

@@ -102,7 +102,7 @@ files to the fields of our output spec:
102102
outputs = self.output_spec().get()
103103
outputs['output_volume'] = os.path.abspath('name_of_the_file_this_cmd_made.nii')
104104
return outputs
105-
105+
106106
Sometimes the inputs need extra parsing before turning into command line
107107
parameters. For example imagine a parameter selecting between three methods:
108108
"old", "standard" and "new". Imagine also that the command line accept this as
@@ -122,42 +122,42 @@ numbers. We need to do additional parsing by overloading the following method
122122
in the main interface class:
123123

124124
.. testcode::
125-
125+
126126
def _format_arg(self, name, spec, value):
127127
if name == 'method':
128128
return spec.argstr%{"old":0, "standard":1, "new":2}[value]
129129
return super(Example, self)._format_arg(name, spec, value)
130-
130+
131131
Here is a minimalistic interface for the gzip command:
132132

133133
.. testcode::
134-
134+
135135
from nipype.interfaces.base import (
136-
TraitedSpec,
136+
TraitedSpec,
137137
CommandLineInputSpec,
138-
CommandLine,
138+
CommandLine,
139139
File
140140
)
141141
import os
142-
142+
143143
class GZipInputSpec(CommandLineInputSpec):
144144
input_file = File(desc="File", exists=True, mandatory=True, argstr="%s")
145-
145+
146146
class GZipOutputSpec(TraitedSpec):
147147
output_file = File(desc = "Zip file", exists = True)
148-
148+
149149
class GZipTask(CommandLine):
150150
input_spec = GZipInputSpec
151151
output_spec = GZipOutputSpec
152152
cmd = 'gzip'
153-
153+
154154
def _list_outputs(self):
155155
outputs = self.output_spec().get()
156156
outputs['output_file'] = os.path.abspath(self.inputs.input_file + ".gz")
157157
return outputs
158-
158+
159159
if __name__ == '__main__':
160-
160+
161161
zipper = GZipTask(input_file='an_existing_file')
162162
print zipper.cmdline
163163
zipper.run()
@@ -193,9 +193,9 @@ hash_files
193193

194194
name_template (optional)
195195
overrides the default ``_generated`` suffix
196-
196+
197197
output_name (optional)
198-
name of the output (if this is not set same name as the input will be
198+
name of the output (if this is not set same name as the input will be
199199
assumed)
200200

201201
keep_extension (optional - not used)

0 commit comments

Comments
 (0)