Skip to content

Commit 430761c

Browse files
committed
Merge remote-tracking branch 'nipype/master'
2 parents 44d78af + b66ef0e commit 430761c

File tree

84 files changed

+5013
-1230
lines changed

Some content is hidden

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

84 files changed

+5013
-1230
lines changed

.travis.yml

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,45 @@ python:
66
- 3.4
77
- 3.5
88
env:
9-
- INSTALL_DEB_DEPENDECIES=true
10-
- INSTALL_DEB_DEPENDECIES=false
11-
- INSTALL_DEB_DEPENDECIES=true DUECREDIT_ENABLE=yes
9+
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler"
10+
- INSTALL_DEB_DEPENDECIES=false NIPYPE_EXTRAS="doc,tests,fmri,profiler"
11+
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,duecredit"
1212
before_install:
13-
- wget http://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-latest-Linux-x86_64.sh
14-
-O /home/travis/.cache/miniconda.sh
15-
- bash /home/travis/.cache/miniconda.sh -b -p /home/travis/miniconda
16-
- export PATH=/home/travis/miniconda/bin:$PATH
17-
- if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; fi
18-
- if $INSTALL_DEB_DEPENDECIES; then sudo ln -s /run/shm /dev/shm; fi
19-
- bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh)
20-
- sudo apt-get -y update
21-
- sudo apt-get -y install xvfb fusefat
22-
- if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -y -qq
23-
fsl afni elastix fsl-atlases; fi
24-
- if $INSTALL_DEB_DEPENDECIES; then
25-
source /etc/fsl/fsl.sh;
26-
source /etc/afni/afni.sh; fi
27-
- export FSLOUTPUTTYPE=NIFTI_GZ
13+
- function bef_inst {
14+
wget http://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-latest-Linux-x86_64.sh
15+
-O /home/travis/.cache/miniconda.sh &&
16+
bash /home/travis/.cache/miniconda.sh -b -p /home/travis/miniconda &&
17+
export PATH=/home/travis/miniconda/bin:$PATH &&
18+
if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; fi &&
19+
if $INSTALL_DEB_DEPENDECIES; then sudo ln -s /run/shm /dev/shm; fi &&
20+
bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh) &&
21+
sudo apt-get -y update &&
22+
sudo apt-get -y install xvfb fusefat &&
23+
if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -y -qq
24+
fsl afni elastix fsl-atlases; fi &&
25+
if $INSTALL_DEB_DEPENDECIES; then
26+
source /etc/fsl/fsl.sh;
27+
source /etc/afni/afni.sh; fi &&
28+
export FSLOUTPUTTYPE=NIFTI_GZ; }
29+
- travis_retry bef_inst
2830
install:
29-
- conda config --add channels conda-forge
30-
- conda update --yes conda
31-
- conda update --all -y python=$TRAVIS_PYTHON_VERSION
32-
# - if [[ "${INSTALL_DEB_DEPENDECIES}" == "true" && ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]]; then
33-
# conda install -y vtk mayavi; fi
34-
- conda install -y nipype
35-
- pip install python-coveralls coverage doctest-ignore-unicode
36-
- if [ ! -z "$DUECREDIT_ENABLE"]; then pip install duecredit; fi
37-
- rm -r /home/travis/miniconda/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype*
38-
- pip install -r requirements.txt
39-
- pip install -e .
40-
- export COVERAGE_PROCESS_START=$(pwd)/.coveragerc
41-
- export COVERAGE_DATA_FILE=$(pwd)/.coverage
42-
- echo "data_file = ${COVERAGE_DATA_FILE}" >> ${COVERAGE_PROCESS_START}
31+
# Add install of vtk and mayavi to test mesh (disabled): conda install -y vtk mayavi &&
32+
- function inst {
33+
conda config --add channels conda-forge &&
34+
conda update --yes conda &&
35+
conda update --all -y python=$TRAVIS_PYTHON_VERSION &&
36+
conda install -y nipype &&
37+
rm -r /home/travis/miniconda/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype* &&
38+
pip install -r requirements.txt &&
39+
pip install -e .[$NIPYPE_EXTRAS] &&
40+
export COVERAGE_PROCESS_START=$(pwd)/.coveragerc &&
41+
export COVERAGE_DATA_FILE=$(pwd)/.coverage &&
42+
echo "data_file = ${COVERAGE_DATA_FILE}" >> ${COVERAGE_PROCESS_START}; }
43+
- travis_retry inst
4344
script:
4445
- python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest --with-doctest-ignore-unicode --with-cov --cover-package nipype --logging-level=DEBUG --verbosity=3
4546
after_success:
46-
- coveralls --config_file ${COVERAGE_PROCESS_START}
47+
- bash <(curl -s https://codecov.io/bash) -t ac172a50-8e66-42e5-8822-5373fcf54686 -cF unittests
4748
deploy:
4849
provider: pypi
4950
user: satra

CHANGES

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Upcoming release 0.13
22
=====================
33

4+
* ENH: Add AFNI 3dNote interface (https://github.com/nipy/nipype/pull/1637)
5+
* FIX: Minor bugfixes related to unicode literals (https://github.com/nipy/nipype/pull/1656)
6+
* ENH: Add a DVARS calculation interface (https://github.com/nipy/nipype/pull/1606)
7+
* ENH: New interface to b0calc of FSL-POSSUM (https://github.com/nipy/nipype/pull/1399)
8+
* ENH: Convenient load/save of interface inputs (https://github.com/nipy/nipype/pull/1591)
9+
* ENH: Add a Framewise Displacement calculation interface (https://github.com/nipy/nipype/pull/1604)
410
* FIX: Use builtins open and unicode literals for py3 compatibility (https://github.com/nipy/nipype/pull/1572)
511
* TST: reduce the size of docker images & use tags for images (https://github.com/nipy/nipype/pull/1564)
612
* ENH: Implement missing inputs/outputs in FSL AvScale (https://github.com/nipy/nipype/pull/1563)
@@ -121,14 +127,14 @@ Release 0.11.0 (September 15, 2015)
121127
* FIX: Bug crashed 'make api' (https://github.com/nipy/nipype/pull/1026)
122128
* ENH: Updated antsIntroduction to handle RA and RI registrations (https://github.com/nipy/nipype/pull/1009)
123129
* ENH: Updated N4BiasCorrection input spec to include weight image and spline order. Made
124-
argument formatting consistent. Cleaned ants.segmentation according to PEP8.
125-
(https://github.com/nipy/nipype/pull/990/files)
130+
argument formatting consistent. Cleaned ants.segmentation according to PEP8.
131+
(https://github.com/nipy/nipype/pull/990/files)
126132
* ENH: SPM12 Normalize interface (https://github.com/nipy/nipype/pull/986)
127133
* FIX: Utility interface test dir (https://github.com/nipy/nipype/pull/986)
128134
* FIX: IPython engine directory reset after crash (https://github.com/nipy/nipype/pull/987)
129135
* ENH: Resting state fMRI example with NiPy realignment and no SPM (https://github.com/nipy/nipype/pull/992)
130136
* FIX: Corrected Freesurfer SegStats _list_outputs to avoid error if summary_file is
131-
undefined (issue #994)(https://https://github.com/nipy/nipype/pull/996)
137+
undefined (issue #994)(https://https://github.com/nipy/nipype/pull/996)
132138
* FIX: OpenfMRI support and FSL 5.0.7 changes (https://github.com/nipy/nipype/pull/1006)
133139
* FIX: Output prefix in SPM Normalize with modulation (https://github.com/nipy/nipype/pull/1023)
134140
* ENH: Usability improvements in cluster environments (https://github.com/nipy/nipype/pull/1025)
@@ -210,11 +216,11 @@ Release 0.9.0 (December 20, 2013)
210216
* ENH: AFNI interfaces refactor, prefix, suffix are replaced by
211217
"flexible_%s_templates"
212218
* ENH: New SPM interfaces:
213-
- spm.ResliceToReference,
214-
- spm.DicomImport
219+
- spm.ResliceToReference,
220+
- spm.DicomImport
215221
* ENH: New AFNI interfaces:
216-
- afni.AFNItoNIFTI
217-
- afni.TCorr1D
222+
- afni.AFNItoNIFTI
223+
- afni.TCorr1D
218224
* ENH: Several new interfaces related to Camino were added:
219225
- camino.SFPICOCalibData
220226
- camino.Conmat
@@ -228,13 +234,13 @@ Release 0.9.0 (December 20, 2013)
228234
- mrtrix.FindShPeaks
229235
- mrtrix.Directions2Amplitude
230236
* ENH: New FSL interfaces:
231-
- fsl.PrepareFieldmap
232-
- fsl.TOPUP
233-
- fsl.ApplyTOPUP
234-
- fsl.Eddy
237+
- fsl.PrepareFieldmap
238+
- fsl.TOPUP
239+
- fsl.ApplyTOPUP
240+
- fsl.Eddy
235241
* ENH: New misc interfaces:
236-
- FuzzyOverlap,
237-
- P2PDistance
242+
- FuzzyOverlap,
243+
- P2PDistance
238244
* ENH: New workflows: nipype.workflows.dmri.fsl.epi.[fieldmap_correction&topup_correction]
239245
* ENH: Added simplified outputname generation for command line interfaces.
240246
* ENH: Allow ants use a single mask image
@@ -292,7 +298,7 @@ Release 0.7.0 (Dec 18, 2012)
292298
afni.AutoTcorrelate, DcmStack
293299
* ENH: New workflows: ants template building (both using 'ANTS' and the new 'antsRegistration')
294300
* ENH: New examples: how to use ANTS template building workflows (smri_ants_build_tmeplate),
295-
how to set SGE specific options (smri_ants_build_template_new)
301+
how to set SGE specific options (smri_ants_build_template_new)
296302
* ENH: added no_flatten option to Merge
297303
* ENH: added versioning option and checking to traits
298304
* ENH: added deprecation metadata to traits
@@ -354,9 +360,9 @@ Release 0.5 (Mar 10, 2012)
354360
* API: Canned workflows are now all under a different package structure
355361
* API: SpecifyModel event_info renamed to event_files
356362
* API: DataGrabber is always being rerun (unless overwrite is set to False on
357-
Node level)
363+
Node level)
358364
* API: "stop_on_first_rerun" does not stop for DataGrabber (unless overwrite is
359-
set to True on Node level)
365+
set to True on Node level)
360366
* API: Output prefix can be set for spm nodes (SliceTiming, Realign, Coregister,
361367
Normalize, Smooth)
362368

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# rsync -e ssh nipype-0.1-py2.5.egg cburns,[email protected]:/home/frs/project/n/ni/nipy/nipype/nipype-0.1/
44

55
PYTHON ?= python
6-
NOSETESTS ?= nosetests
6+
NOSETESTS=`which nosetests`
77

88
.PHONY: zipdoc sdist egg upload_to_pypi trailing-spaces clean-pyc clean-so clean-build clean-ctags clean in inplace test-code test-doc test-coverage test html specs check-before-commit check
99

@@ -56,7 +56,7 @@ inplace:
5656
$(PYTHON) setup.py build_ext -i
5757

5858
test-code: in
59-
$(NOSETESTS) -s nipype --with-doctest --with-doctest-ignore-unicode
59+
python -W once:FSL:UserWarning:nipype $(NOSETESTS) --with-doctest --with-doctest-ignore-unicode --logging-level=DEBUG --verbosity=3 nipype
6060

6161
test-doc:
6262
$(NOSETESTS) -s --with-doctest --with-doctest-ignore-unicode --doctest-tests --doctest-extension=rst \
@@ -66,7 +66,8 @@ test-coverage: clean-tests in
6666
$(NOSETESTS) -s --with-doctest --with-doctest-ignore-unicode --with-coverage --cover-package=nipype \
6767
--config=.coveragerc
6868

69-
test: clean test-code
69+
test: tests # just another name
70+
tests: clean test-code
7071

7172
html:
7273
@echo "building docs"

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ NIPYPE: Neuroimaging in Python: Pipelines and Interfaces
88
.. image:: https://circleci.com/gh/nipy/nipype/tree/master.svg?style=svg
99
:target: https://circleci.com/gh/nipy/nipype/tree/master
1010

11-
.. image:: https://coveralls.io/repos/nipy/nipype/badge.png
12-
:target: https://coveralls.io/r/nipy/nipype
11+
.. image:: https://codecov.io/gh/nipy/nipype/branch/master/graph/badge.svg
12+
:target: https://codecov.io/gh/nipy/nipype
1313

1414
.. image:: https://www.codacy.com/project/badge/182f27944c51474490b369d0a23e2f32
1515
:target: https://www.codacy.com/app/krzysztof-gorgolewski/nipy_nipype

circle.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
machine:
2+
environment:
3+
OSF_NIPYPE_URL: "https://files.osf.io/v1/resources/nefdp/providers/osfstorage"
4+
DATA_NIPYPE_TUTORIAL_URL: "${OSF_NIPYPE_URL}/57f4739cb83f6901ed94bf21"
5+
DATA_NIPYPE_FSL_COURSE: "${OSF_NIPYPE_URL}/57f472cf9ad5a101f977ecfe"
6+
DATA_NIPYPE_FSL_FEEDS: "${OSF_NIPYPE_URL}/57f473066c613b01f113e7af"
7+
28
services:
39
- docker
410

@@ -15,17 +21,16 @@ dependencies:
1521

1622
override:
1723
- mkdir -p ~/examples ~/scratch/nose ~/scratch/logs
18-
- if [[ ! -d ~/examples/nipype-tutorial ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O nipype-tutorial.tar.bz2 https://dl.dropbox.com/s/jzgq2nupxyz36bp/nipype-tutorial.tar.bz2 && tar xjf nipype-tutorial.tar.bz2 -C ~/examples/; fi
19-
- if [[ ! -d ~/examples/nipype-fsl_course_data ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q https://3552243d5be815c1b09152da6525cb8fe7b900a6.googledrive.com/host/0BxI12kyv2olZVUswazA3NkFvOXM/nipype-fsl_course_data.tar.gz && tar xzf nipype-fsl_course_data.tar.gz -C ~/examples/; fi
20-
- if [[ ! -d ~/examples/feeds ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q https://3552243d5be815c1b09152da6525cb8fe7b900a6.googledrive.com/host/0BxI12kyv2olZVUswazA3NkFvOXM/fsl-5.0.9-feeds.tar.gz && tar xzf fsl-5.0.9-feeds.tar.gz -C ~/examples/; fi
24+
- if [[ ! -d ~/examples/nipype-tutorial ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O nipype-tutorial.tar.bz2 "${DATA_NIPYPE_TUTORIAL_URL}" && tar xjf nipype-tutorial.tar.bz2 -C ~/examples/; fi
25+
- if [[ ! -d ~/examples/nipype-fsl_course_data ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O nipype-fsl_course_data.tar.gz "${DATA_NIPYPE_FSL_COURSE}" && tar xzf nipype-fsl_course_data.tar.gz -C ~/examples/; fi
26+
- if [[ ! -d ~/examples/feeds ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O fsl-5.0.9-feeds.tar.gz "${DATA_NIPYPE_FSL_FEEDS}" && tar xzf fsl-5.0.9-feeds.tar.gz -C ~/examples/; fi
2127
- if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
2228
- docker build -f docker/nipype_test/Dockerfile_py35 -t nipype/nipype_test:py35 . :
2329
timeout: 1600
2430
- docker build -f docker/nipype_test/Dockerfile_py27 -t nipype/nipype_test:py27 . :
2531
timeout: 1600
2632
- mkdir -p ~/docker; docker save nipype/nipype_test:py27 > ~/docker/image.tar :
2733
timeout: 1600
28-
- pip install xunitmerge
2934

3035
test:
3136
override:
@@ -50,13 +55,10 @@ test:
5055

5156
post:
5257
- bash docker/circleci/teardown.sh
58+
- for xml_f in ${CIRCLE_TEST_REPORTS}/nose/coverage*.xml; do bash <(curl -s https://codecov.io/bash) -f $xml_f -t ac172a50-8e66-42e5-8822-5373fcf54686 -F unittests; done
59+
- for xml_f in ${CIRCLE_TEST_REPORTS}/nose/smoketest*.xml; do bash <(curl -s https://codecov.io/bash) -f $xml_f -t ac172a50-8e66-42e5-8822-5373fcf54686 -F smoketests; done
5360

5461
general:
5562
artifacts:
5663
- "~/docs"
5764
- "~/logs"
58-
- "~/coverage_py27.xml"
59-
- "~/coverage_py35.xml"
60-
- "~/nosetests_py27.xml"
61-
- "~/nosetests_py35.xml"
62-
- "~/scratch"

codecov.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
coverage:
2+
range: "0...100"
3+
status:
4+
patch:
5+
default:
6+
target: 0
7+
threshold: 100
8+
project:
9+
default:
10+
target: 0
11+
threshold: 100
12+
patch:
13+
target: 0
14+
threshold: 100
15+
unittests:
16+
target: 0
17+
threshold: 100
18+
flags:
19+
- "unittests"
20+
smoketests:
21+
target: 0
22+
threshold: 100
23+
flags:
24+
- "smoketests"

doc/devel/testing_nipype.rst

Lines changed: 66 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _dev_testing_nipype:
2+
13
==============
24
Testing nipype
35
==============
@@ -14,37 +16,91 @@ If both batteries of tests are passing, the following badges should be shown in
1416
:target: https://circleci.com/gh/nipy/nipype/tree/master
1517

1618

17-
Tests implementation
18-
--------------------
19+
Installation for developers
20+
---------------------------
21+
22+
To check out the latest development version::
23+
24+
git clone https://github.com/nipy/nipype.git
25+
26+
After cloning::
27+
28+
cd nipype
29+
pip install -r requirements.txt
30+
python setup.py develop
31+
32+
or::
33+
34+
cd nipype
35+
pip install -r requirements.txt
36+
pip install -e .[tests]
37+
38+
39+
40+
Test implementation
41+
-------------------
1942

2043
Nipype testing framework is built upon `nose <http://nose.readthedocs.io/en/latest/>`_.
2144
By the time these guidelines are written, Nipype implements 17638 tests.
2245

23-
To run the tests locally, first get nose installed::
46+
After installation in developer mode, the tests can be run with the
47+
following simple command at the root folder of the project ::
48+
49+
make tests
2450

25-
pip install nose
51+
If ``make`` is not installed in the system, it is possible to run the tests using::
2652

53+
python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest \
54+
--with-doctest-ignore-unicode --logging-level=DEBUG --verbosity=3 nipype
2755

28-
Then, after nipype is `installed in developer mode <../users/install.html#nipype-for-developers>`_,
29-
the tests can be run with the following simple command::
3056

31-
make tests
57+
A successful test run should complete in a few minutes and end with
58+
something like::
3259

60+
----------------------------------------------------------------------
61+
Ran 17922 tests in 107.254s
62+
63+
OK (SKIP=27)
64+
65+
66+
All tests should pass (unless you're missing a dependency). If the ``SUBJECTS_DIR```
67+
environment variable is not set, some FreeSurfer related tests will fail.
68+
If any of the tests failed, please report them on our `bug tracker
69+
<http://github.com/nipy/nipype/issues>`_.
70+
71+
On Debian systems, set the following environment variable before running
72+
tests::
73+
74+
export MATLABCMD=$pathtomatlabdir/bin/$platform/MATLAB
75+
76+
where ``$pathtomatlabdir`` is the path to your matlab installation and
77+
``$platform`` is the directory referring to x86 or x64 installations
78+
(typically ``glnxa64`` on 64-bit installations).
3379

3480
Skip tests
35-
----------
81+
~~~~~~~~~~
3682

3783
Nipype will skip some tests depending on the currently available software and data
3884
dependencies. Installing software dependencies and downloading the necessary data
3985
will reduce the number of skip tests.
4086

4187
Some tests in Nipype make use of some images distributed within the `FSL course data
42-
<http://fsl.fmrib.ox.ac.uk/fslcourse/>`_. This reduced version of the package can be downloaded `here
43-
<https://3552243d5be815c1b09152da6525cb8fe7b900a6.googledrive.com/host/0BxI12kyv2olZVUswazA3NkFvOXM/nipype-fsl_course_data.tar.gz>`_.
88+
<http://fsl.fmrib.ox.ac.uk/fslcourse/>`_. This reduced version of the package can be downloaded `here
89+
<https://files.osf.io/v1/resources/nefdp/providers/osfstorage/57f472cf9ad5a101f977ecfe>`_.
4490
To enable the tests depending on these data, just unpack the targz file and set the :code:`FSL_COURSE_DATA` environment
4591
variable to point to that folder.
4692

4793

94+
Avoiding any MATLAB calls from testing
95+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96+
97+
On unix systems, set an empty environment variable::
98+
99+
export NIPYPE_NO_MATLAB=
100+
101+
This will skip any tests that require matlab.
102+
103+
48104
Testing Nipype using Docker
49105
---------------------------
50106

doc/users/grabbing_and_sinking.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ when using multiple nested iterables.
235235
Substitutions
236236
-------------
237237

238-
The `substitutions` and `substitutions_regexp` inputs allow users to modify the
238+
The ``substitutions`` and ``regexp_substitutions`` inputs allow users to modify the
239239
output destination path and name of a file. Substitutions are a list of 2-tuples
240240
and are carried out in the order in which they were entered. Assuming that the
241241
output path of a file is:

0 commit comments

Comments
 (0)