Skip to content

Commit e122466

Browse files
committed
Merge branch 'master' of https://github.com/nipy/nipype into enh/eddy
2 parents 8ae44ff + 29ba1b2 commit e122466

File tree

848 files changed

+4312
-6502
lines changed

Some content is hidden

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

848 files changed

+4312
-6502
lines changed

.coveragerc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ source = nipype
44
include = */nipype/*
55
omit =
66
*/nipype/external/*
7-
*/nipype/workflows/*
87
*/nipype/fixes/*
98
*/setup.py

.github/ISSUE_TEMPLATE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
### Summary
2+
3+
### Actual behavior
4+
5+
### Expected behavior
6+
7+
### How to replicate the behavior
8+
9+
### Platform details:
10+
please paste the output of: `python -c "import nipype; print(nipype.get_info())"`

.travis.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ before_install:
1919
if $INSTALL_DEB_DEPENDECIES; then sudo ln -s /run/shm /dev/shm; fi &&
2020
bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh) &&
2121
sudo apt-get -y update &&
22-
sudo apt-get -y install xvfb fusefat &&
22+
sudo apt-get -y install xvfb fusefat graphviz &&
2323
if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -y -qq
2424
fsl afni elastix fsl-atlases; fi &&
2525
if $INSTALL_DEB_DEPENDECIES; then
2626
source /etc/fsl/fsl.sh;
27-
source /etc/afni/afni.sh;
27+
source /etc/afni/afni.sh;
2828
export FSLOUTPUTTYPE=NIFTI_GZ; fi }
2929
- travis_retry bef_inst
3030
install:
@@ -36,15 +36,10 @@ install:
3636
conda install -y nipype &&
3737
rm -r /home/travis/miniconda/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype* &&
3838
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}; }
39+
pip install -e .[$NIPYPE_EXTRAS]; }
4340
- travis_retry inst
4441
script:
45-
- python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest --with-doctest-ignore-unicode --with-cov --cover-package nipype --logging-level=DEBUG --verbosity=3
46-
after_success:
47-
- bash <(curl -s https://codecov.io/bash) -t ac172a50-8e66-42e5-8822-5373fcf54686 -cF unittests
42+
- py.test --doctest-modules nipype
4843
deploy:
4944
provider: pypi
5045
user: satra

Makefile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
PYTHON ?= python
66
NOSETESTS=`which nosetests`
77

8-
.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
8+
.PHONY: zipdoc sdist egg upload_to_pypi trailing-spaces clean-pyc clean-so clean-build clean-ctags clean in inplace test-code test-coverage test html specs check-before-commit check
99

1010
zipdoc: html
1111
zip documentation.zip doc/_build/html
@@ -56,16 +56,11 @@ inplace:
5656
$(PYTHON) setup.py build_ext -i
5757

5858
test-code: in
59-
python -W once:FSL:UserWarning:nipype $(NOSETESTS) --with-doctest --with-doctest-ignore-unicode --logging-level=DEBUG --verbosity=3 nipype
60-
61-
test-doc:
62-
$(NOSETESTS) -s --with-doctest --with-doctest-ignore-unicode --doctest-tests --doctest-extension=rst \
63-
--doctest-fixtures=_fixture doc/
59+
py.test --doctest-module nipype
6460

6561
test-coverage: clean-tests in
66-
$(NOSETESTS) -s --with-doctest --with-doctest-ignore-unicode --with-coverage --cover-package=nipype \
67-
--config=.coveragerc
68-
62+
py.test --doctest-modules --cov-config .coveragerc --cov=nipype nipype
63+
6964
test: tests # just another name
7065
tests: clean test-code
7166

README.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,21 @@ Information specific to Nipype is located here::
7777
Support and Communication
7878
-------------------------
7979

80-
If you have a problem or would like to ask a question about how to do something in Nipype please submit a question
81-
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::
82-
83-
http://neurostars.org/t/nipype/
84-
80+
If you have a problem or would like to ask a question about how to do something in Nipype please open an issue
81+
in this GitHub repository.
8582

8683
To participate in the Nipype development related discussions please use the following mailing list::
8784

8885
http://mail.python.org/mailman/listinfo/neuroimaging
8986

9087
Please add *[nipype]* to the subject line when posting on the mailing list.
9188

89+
.. warning ::
90+
91+
As of `Nov 23, 2016 <https://twitter.com/neuroquestion/status/801453442132754432>`_,
92+
`NeuroStars <http://neurostars.org>`_ is down. We used to have all previous Nipype
93+
questions available under the `nipype <http://neurostars.org/t/nipype/>`_ label.
94+
9295
9396
Nipype structure
9497
----------------

circle.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ dependencies:
2020
- sudo apt-get -y update && sudo apt-get install -y wget bzip2
2121

2222
override:
23-
- mkdir -p ~/examples ~/scratch/nose ~/scratch/logs
23+
- mkdir -p ~/examples ~/scratch/pytest ~/scratch/logs
2424
- 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
2525
- 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
2626
- 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
@@ -35,10 +35,10 @@ dependencies:
3535
test:
3636
override:
3737
- docker run -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /root/src/nipype/doc nipype/nipype_test:py35 /usr/bin/run_builddocs.sh
38-
- docker run -v /etc/localtime:/etc/localtime:ro -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /root/src/nipype nipype/nipype_test:py35 /usr/bin/run_nosetests.sh py35 :
38+
- docker run -v /etc/localtime:/etc/localtime:ro -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /root/src/nipype nipype/nipype_test:py35 /usr/bin/run_pytests.sh py35 :
39+
timeout: 2600
40+
- docker run -v /etc/localtime:/etc/localtime:ro -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /root/src/nipype nipype/nipype_test:py27 /usr/bin/run_pytests.sh py27 :
3941
timeout: 2600
40-
- docker run -v /etc/localtime:/etc/localtime:ro -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /root/src/nipype nipype/nipype_test:py27 /usr/bin/run_nosetests.sh py27 :
41-
timeout: 5200
4242
- docker run -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py35 /usr/bin/run_examples.sh test_spm Linear /root/examples/ workflow3d :
4343
timeout: 1600
4444
- docker run -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py35 /usr/bin/run_examples.sh test_spm Linear /root/examples/ workflow4d :
@@ -55,8 +55,8 @@ test:
5555

5656
post:
5757
- 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
58+
- for xml_f in ${CIRCLE_TEST_REPORTS}/pytest/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}/pytest/smoketest*.xml; do bash <(curl -s https://codecov.io/bash) -f $xml_f -t ac172a50-8e66-42e5-8822-5373fcf54686 -F smoketests; done
6060

6161
general:
6262
artifacts:

doc/devel/testing_nipype.rst

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ or::
4040
Test implementation
4141
-------------------
4242

43-
Nipype testing framework is built upon `nose <http://nose.readthedocs.io/en/latest/>`_.
43+
Nipype testing framework is built upon `pytest <http://doc.pytest.org/en/latest/>`_.
4444
By the time these guidelines are written, Nipype implements 17638 tests.
4545

4646
After installation in developer mode, the tests can be run with the
@@ -50,20 +50,18 @@ following simple command at the root folder of the project ::
5050

5151
If ``make`` is not installed in the system, it is possible to run the tests using::
5252

53-
python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest \
54-
--with-doctest-ignore-unicode --logging-level=DEBUG --verbosity=3 nipype
53+
py.test --doctest-modules --cov=nipype nipype
5554

5655

57-
A successful test run should complete in a few minutes and end with
56+
A successful test run should complete in 10-30 minutes and end with
5857
something like::
5958

6059
----------------------------------------------------------------------
61-
Ran 17922 tests in 107.254s
60+
2445 passed, 41 skipped, 7 xfailed in 1277.66 seconds
6261

63-
OK (SKIP=27)
6462

6563

66-
All tests should pass (unless you're missing a dependency). If the ``SUBJECTS_DIR```
64+
No test should fail (unless you're missing a dependency). If the ``SUBJECTS_DIR```
6765
environment variable is not set, some FreeSurfer related tests will fail.
6866
If any of the tests failed, please report them on our `bug tracker
6967
<http://github.com/nipy/nipype/issues>`_.
@@ -90,6 +88,11 @@ Some tests in Nipype make use of some images distributed within the `FSL course
9088
To enable the tests depending on these data, just unpack the targz file and set the :code:`FSL_COURSE_DATA` environment
9189
variable to point to that folder.
9290

91+
Xfail tests
92+
~~~~~~~~~~
93+
94+
Some tests are expect to fail until the code will be changed or for other reasons.
95+
9396

9497
Avoiding any MATLAB calls from testing
9598
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -115,7 +118,7 @@ Nipype is as easy as follows::
115118
-v ~/examples:/root/examples:ro \
116119
-v ~/scratch:/scratch \
117120
-w /root/src/nipype \
118-
nipype/nipype_test:py27 /usr/bin/run_nosetests.sh
121+
nipype/nipype_test:py27 /usr/bin/run_pytest.sh
119122

120123
For running nipype in Python 3.5::
121124

@@ -126,4 +129,4 @@ For running nipype in Python 3.5::
126129
-v ~/examples:/root/examples:ro \
127130
-v ~/scratch:/scratch \
128131
-w /root/src/nipype \
129-
nipype/nipype_test:py35 /usr/bin/run_nosetests.sh
132+
nipype/nipype_test:py35 /usr/bin/run_pytest.sh

doc/users/config_file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Execution
134134
*poll_sleep_duration*
135135
This controls how long the job submission loop will sleep between submitting
136136
all pending jobs and checking for job completion. To be nice to cluster
137-
schedulers the default is set to 60 seconds.
137+
schedulers the default is set to 2 seconds.
138138

139139
*xvfb_max_wait*
140140
Maximum time (in seconds) to wait for Xvfb to start, if the _redirect_x parameter of an Interface is True.

docker/circleci/run_nosetests.sh renamed to docker/circleci/run_pytests.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -u
66
PYTHON_VERSION=$( python -c "import sys; print('{}{}'.format(sys.version_info[0], sys.version_info[1]))" )
77

88
# Create necessary directories
9-
mkdir -p /scratch/nose /scratch/crashfiles /scratch/logs/py${PYTHON_VERSION}
9+
mkdir -p /scratch/pytest /scratch/crashfiles /scratch/logs/py${PYTHON_VERSION}
1010

1111
# Create a nipype config file
1212
mkdir -p /root/.nipype
@@ -20,17 +20,18 @@ if [[ "${PYTHON_VERSION}" -lt "30" ]]; then
2020
echo 'profile_runtime = true' >> /root/.nipype/nipype.cfg
2121
fi
2222

23-
# Run tests
23+
# Run tests using pytest
2424
cd /root/src/nipype/
2525
make clean
26-
nosetests -s nipype -c /root/src/nipype/.noserc --xunit-file="/scratch/nosetests_py${PYTHON_VERSION}.xml" --cover-xml-file="/scratch/coverage_py${PYTHON_VERSION}.xml"
26+
py.test --doctest-modules --cov-report xml:/scratch/coverage_py${PYTHON_VERSION}.xml --cov=nipype nipype
27+
2728

2829
# Workaround: run here the profiler tests in python 3
2930
if [[ "${PYTHON_VERSION}" -ge "30" ]]; then
3031
echo '[execution]' >> /root/.nipype/nipype.cfg
3132
echo 'profile_runtime = true' >> /root/.nipype/nipype.cfg
32-
nosetests nipype/interfaces/tests/test_runtime_profiler.py --xunit-file="/scratch/nosetests_py${PYTHON_VERSION}_profiler.xml" --cover-xml-file="/scratch/coverage_py${PYTHON_VERSION}_profiler.xml"
33-
nosetests nipype/pipeline/plugins/tests/test_multiproc*.py --xunit-file="/scratch/nosetests_py${PYTHON_VERSION}_multiproc.xml" --cover-xml-file="/scratch/coverage_py${PYTHON_VERSION}_multiproc.xml"
33+
py.test --cov-report xml:/scratch/coverage_py${PYTHON_VERSION}_profiler.xml --cov=nipype nipype/interfaces/tests/test_runtime_profiler.py
34+
py.test --cov-report xml:/scratch/coverage_py${PYTHON_VERSION}_multiproc.xml --cov=nipype nipype/pipeline/plugins/tests/test_multiproc*.py
3435
fi
3536

3637
# Copy crashfiles to scratch

docker/circleci/teardown.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
set -u
77
set -e
88

9-
mkdir -p ${CIRCLE_TEST_REPORTS}/nose
10-
sudo mv ~/scratch/*.xml ${CIRCLE_TEST_REPORTS}/nose
9+
mkdir -p ${CIRCLE_TEST_REPORTS}/pytest
10+
sudo mv ~/scratch/*.xml ${CIRCLE_TEST_REPORTS}/pytest
1111
mkdir -p ~/docs
1212
sudo mv ~/scratch/docs/* ~/docs/
1313
mkdir -p ~/logs

0 commit comments

Comments
 (0)