Skip to content

Commit 62c11c6

Browse files
committed
Merge remote-tracking branch 'nipy/master' into clean-afni
# Conflicts: # nipype/interfaces/afni/preprocess.py
2 parents 3c07566 + bbd784c commit 62c11c6

Some content is hidden

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

55 files changed

+1470
-802
lines changed

.travis.yml

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,41 @@ 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 matplotlib nitime
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:

CHANGES

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

4+
* FIX: AFNI Retroicor interface fixes (https://github.com/nipy/nipype/pull/1669)
5+
* ENH: Add AFNI 3dNote interface (https://github.com/nipy/nipype/pull/1637)
6+
* FIX: Minor bugfixes related to unicode literals (https://github.com/nipy/nipype/pull/1656)
47
* ENH: Add a DVARS calculation interface (https://github.com/nipy/nipype/pull/1606)
8+
* ENH: New interface to b0calc of FSL-POSSUM (https://github.com/nipy/nipype/pull/1399)
59
* ENH: Convenient load/save of interface inputs (https://github.com/nipy/nipype/pull/1591)
610
* ENH: Add a Framewise Displacement calculation interface (https://github.com/nipy/nipype/pull/1604)
711
* FIX: Use builtins open and unicode literals for py3 compatibility (https://github.com/nipy/nipype/pull/1572)
@@ -124,14 +128,14 @@ Release 0.11.0 (September 15, 2015)
124128
* FIX: Bug crashed 'make api' (https://github.com/nipy/nipype/pull/1026)
125129
* ENH: Updated antsIntroduction to handle RA and RI registrations (https://github.com/nipy/nipype/pull/1009)
126130
* ENH: Updated N4BiasCorrection input spec to include weight image and spline order. Made
127-
argument formatting consistent. Cleaned ants.segmentation according to PEP8.
128-
(https://github.com/nipy/nipype/pull/990/files)
131+
argument formatting consistent. Cleaned ants.segmentation according to PEP8.
132+
(https://github.com/nipy/nipype/pull/990/files)
129133
* ENH: SPM12 Normalize interface (https://github.com/nipy/nipype/pull/986)
130134
* FIX: Utility interface test dir (https://github.com/nipy/nipype/pull/986)
131135
* FIX: IPython engine directory reset after crash (https://github.com/nipy/nipype/pull/987)
132136
* ENH: Resting state fMRI example with NiPy realignment and no SPM (https://github.com/nipy/nipype/pull/992)
133137
* FIX: Corrected Freesurfer SegStats _list_outputs to avoid error if summary_file is
134-
undefined (issue #994)(https://https://github.com/nipy/nipype/pull/996)
138+
undefined (issue #994)(https://https://github.com/nipy/nipype/pull/996)
135139
* FIX: OpenfMRI support and FSL 5.0.7 changes (https://github.com/nipy/nipype/pull/1006)
136140
* FIX: Output prefix in SPM Normalize with modulation (https://github.com/nipy/nipype/pull/1023)
137141
* ENH: Usability improvements in cluster environments (https://github.com/nipy/nipype/pull/1025)
@@ -213,11 +217,11 @@ Release 0.9.0 (December 20, 2013)
213217
* ENH: AFNI interfaces refactor, prefix, suffix are replaced by
214218
"flexible_%s_templates"
215219
* ENH: New SPM interfaces:
216-
- spm.ResliceToReference,
217-
- spm.DicomImport
220+
- spm.ResliceToReference,
221+
- spm.DicomImport
218222
* ENH: New AFNI interfaces:
219-
- afni.AFNItoNIFTI
220-
- afni.TCorr1D
223+
- afni.AFNItoNIFTI
224+
- afni.TCorr1D
221225
* ENH: Several new interfaces related to Camino were added:
222226
- camino.SFPICOCalibData
223227
- camino.Conmat
@@ -231,13 +235,13 @@ Release 0.9.0 (December 20, 2013)
231235
- mrtrix.FindShPeaks
232236
- mrtrix.Directions2Amplitude
233237
* ENH: New FSL interfaces:
234-
- fsl.PrepareFieldmap
235-
- fsl.TOPUP
236-
- fsl.ApplyTOPUP
237-
- fsl.Eddy
238+
- fsl.PrepareFieldmap
239+
- fsl.TOPUP
240+
- fsl.ApplyTOPUP
241+
- fsl.Eddy
238242
* ENH: New misc interfaces:
239-
- FuzzyOverlap,
240-
- P2PDistance
243+
- FuzzyOverlap,
244+
- P2PDistance
241245
* ENH: New workflows: nipype.workflows.dmri.fsl.epi.[fieldmap_correction&topup_correction]
242246
* ENH: Added simplified outputname generation for command line interfaces.
243247
* ENH: Allow ants use a single mask image
@@ -295,7 +299,7 @@ Release 0.7.0 (Dec 18, 2012)
295299
afni.AutoTcorrelate, DcmStack
296300
* ENH: New workflows: ants template building (both using 'ANTS' and the new 'antsRegistration')
297301
* ENH: New examples: how to use ANTS template building workflows (smri_ants_build_tmeplate),
298-
how to set SGE specific options (smri_ants_build_template_new)
302+
how to set SGE specific options (smri_ants_build_template_new)
299303
* ENH: added no_flatten option to Merge
300304
* ENH: added versioning option and checking to traits
301305
* ENH: added deprecation metadata to traits
@@ -357,9 +361,9 @@ Release 0.5 (Mar 10, 2012)
357361
* API: Canned workflows are now all under a different package structure
358362
* API: SpecifyModel event_info renamed to event_files
359363
* API: DataGrabber is always being rerun (unless overwrite is set to False on
360-
Node level)
364+
Node level)
361365
* API: "stop_on_first_rerun" does not stop for DataGrabber (unless overwrite is
362-
set to True on Node level)
366+
set to True on Node level)
363367
* API: Output prefix can be set for spm nodes (SliceTiming, Realign, Coregister,
364368
Normalize, Smooth)
365369

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"

circle.yml

Lines changed: 9 additions & 3 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,9 +21,9 @@ 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

codecov.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
coverage:
22
range: "0...100"
33
status:
4+
patch:
5+
default:
6+
target: 0
7+
threshold: 100
48
project:
59
default:
610
target: 0

doc/_templates/indexsidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ <h3>{{ _('Links') }}</h3>
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>
88
<li><a href="about.html#funding">Funding</a> · <a href="http://nipy.org/software/license/index.html"><img src="https://img.shields.io/pypi/l/nipype.svg" alt="License"></a></li>
9-
<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>
9+
<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://codecov.io/gh/nipy/nipype'><img src='https://codecov.io/gh/nipy/nipype/branch/master/graph/badge.svg' alt='Coverage Status' /></a></li>
1010
<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

doc/devel/testing_nipype.rst

Lines changed: 65 additions & 9 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
4288
<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>`_.
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)