Skip to content

Commit c649f0e

Browse files
committed
Merge remote-tracking branch 'upstream/master' into fix_sge
2 parents a53df7b + f5ed4d6 commit c649f0e

Some content is hidden

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

68 files changed

+1055
-1788
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

.travis.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,13 @@ install:
3333
conda config --add channels conda-forge &&
3434
conda update --yes conda &&
3535
conda update --all -y python=$TRAVIS_PYTHON_VERSION &&
36-
conda install -y nipype &&
36+
conda install -y nipype icu &&
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-
- py.test --doctest-modules --cov=nipype nipype
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

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Upcoming release 0.13
2929
* ENH: Added support for custom job submission check in SLURM (https://github.com/nipy/nipype/pull/1582)
3030
* ENH: Added ANTs interface CreateJacobianDeterminantImage; replaces deprecated JacobianDeterminant
3131
(https://github.com/nipy/nipype/pull/1654)
32+
* ENH: Update ReconAll interface for FreeSurfer v6.0.0 (https://github.com/nipy/nipype/pull/1790)
3233

3334
Release 0.12.1 (August 3, 2016)
3435
===============================

README.rst

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,16 @@ 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 open an issue
81-
in this GitHub repository.
80+
If you have a problem or would like to ask a question about how to do something in Nipype please open an issue to
81+
`NeuroStars.org <http://neurostars.org>`_ with a *nipype* tag. `NeuroStars.org <http://neurostars.org>`_ is a
82+
platform similar to StackOverflow but dedicated to neuroinformatics.
8283

8384
To participate in the Nipype development related discussions please use the following mailing list::
8485

8586
http://mail.python.org/mailman/listinfo/neuroimaging
8687

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

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-
9590

9691
Nipype structure
9792
----------------

circle.yml

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

2222
override:
23-
- mkdir -p ~/examples ~/scratch/pytest ~/scratch/logs
23+
- mkdir -p ~/docker ~/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
27-
- if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
27+
- if [[ -e ~/docker/image.tar ]]; then mv -n ~/docker/image.tar ~/docker/image_27.tar; fi
28+
- if [[ -e ~/docker/image_27.tar ]]; then docker load -i ~/docker/image_27.tar; fi
29+
- if [[ -e ~/docker/image_35.tar ]]; then docker load -i ~/docker/image_35.tar; fi
30+
- docker build -f docker/nipype_test/Dockerfile_py27 -t nipype/nipype_test:py27 . :
31+
timeout: 1600
2832
- docker build -f docker/nipype_test/Dockerfile_py35 -t nipype/nipype_test:py35 . :
2933
timeout: 1600
30-
- docker build -f docker/nipype_test/Dockerfile_py27 -t nipype/nipype_test:py27 . :
34+
- docker save nipype/nipype_test:py27 > ~/docker/image_27.tar :
3135
timeout: 1600
32-
- mkdir -p ~/docker; docker save nipype/nipype_test:py27 > ~/docker/image.tar :
36+
- docker save nipype/nipype_test:py35 > ~/docker/image_35.tar :
3337
timeout: 1600
3438

3539
test:
3640
override:
37-
- 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_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 :
41-
timeout: 2600
42-
- 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 :
43-
timeout: 1600
44-
- 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 :
45-
timeout: 1600
46-
- 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 fmri_fsl_feeds Linear /root/examples/ l1pipeline
47-
- 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 fmri_spm_dartel Linear /root/examples/ level1 :
48-
timeout: 1600
49-
- 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 fmri_spm_dartel Linear /root/examples/ l2pipeline :
50-
timeout: 1600
51-
- 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 fmri_fsl_reuse Linear /root/examples/ level1_workflow
52-
- docker run -v /etc/localtime:/etc/localtime:ro -e NIPYPE_NUMBER_OF_CPUS=4 -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /root/examples/ level1
53-
- docker run -v /etc/localtime:/etc/localtime:ro -e NIPYPE_NUMBER_OF_CPUS=4 -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py35 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /root/examples/ level1
54-
- docker run -v /etc/localtime:/etc/localtime:ro -e NIPYPE_NUMBER_OF_CPUS=4 -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py35 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /root/examples/ l2pipeline
55-
56-
post:
57-
- bash docker/circleci/teardown.sh
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
41+
- bash docker/circleci/tests.sh :
42+
timeout: 7200
43+
parallel: true
6044

6145
general:
6246
artifacts:

doc/devel/interface_specs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ CommandLine
353353
be fixed it's recommended to just use ``usedefault``.
354354

355355
``sep``
356-
For List traits the string with witch elements of the list will be joined.
356+
For List traits the string with which elements of the list will be joined.
357357

358358
``name_source``
359359
Indicates the list of input fields from which the value of the current File

doc/users/config_file.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Execution
5555
Should the input files be checked for changes using their content (slow, but
5656
100% accurate) or just their size and modification date (fast, but
5757
potentially prone to errors)? (possible values: ``content`` and
58-
``timestamp``; default value: ``content``)
58+
``timestamp``; default value: ``timestamp``)
5959

6060
*keep_inputs*
6161
Ensures that all inputs that are created in the nodes working directory are
@@ -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/tests.sh

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash
2+
3+
set -o nounset
4+
set -o xtrace
5+
6+
export CODECOV_TOKEN=ac172a50-8e66-42e5-8822-5373fcf54686
7+
8+
if [ "${CIRCLE_NODE_TOTAL:-}" != "4" ]; then
9+
echo "These tests were designed to be run at 4x parallelism."
10+
exit 1
11+
fi
12+
13+
# These tests are manually balanced based on previous build timings.
14+
# They may need to be rebalanced in the future.
15+
case ${CIRCLE_NODE_INDEX} in
16+
0)
17+
time 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 fmri_spm_dartel Linear /root/examples/ level1
18+
;;
19+
1)
20+
time 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 fmri_spm_dartel Linear /root/examples/ l2pipeline
21+
time 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
22+
time 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
23+
time docker run -v /etc/localtime:/etc/localtime:ro -e NIPYPE_NUMBER_OF_CPUS=4 -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /root/examples/ level1
24+
;;
25+
2)
26+
time docker run -v /etc/localtime:/etc/localtime:ro -e NIPYPE_NUMBER_OF_CPUS=4 -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py35 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /root/examples/ l2pipeline
27+
time 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
28+
time 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
29+
time docker run -v /etc/localtime:/etc/localtime:ro -e NIPYPE_NUMBER_OF_CPUS=4 -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py35 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /root/examples/ level1
30+
;;
31+
3)
32+
time 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
33+
time 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 fmri_fsl_feeds Linear /root/examples/ l1pipeline
34+
time 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 fmri_fsl_reuse Linear /root/examples/ level1_workflow
35+
;;
36+
esac
37+
38+
# Put the artifacts in place
39+
bash docker/circleci/teardown.sh
40+
41+
# Send coverage data to codecov.io
42+
curl -so codecov.io https://codecov.io/bash
43+
chmod 755 codecov.io
44+
find "${CIRCLE_TEST_REPORTS}/pytest" -name 'coverage*.xml' -print0 | \
45+
xargs -0 -I file ./codecov.io -f file -t "${CODECOV_TOKEN}" -F unittests
46+
find "${CIRCLE_TEST_REPORTS}/pytest" -name 'smoketests*.xml' -print0 | \
47+
xargs -0 -I file ./codecov.io -f file -t "${CODECOV_TOKEN}" -F smoketests
48+
49+
50+

nipype/__init__.py

Lines changed: 18 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
STATUS as __status__,
1212
__version__)
1313
from .utils.config import NipypeConfig
14-
from .fixes.numpy.testing import nosetester
1514
from .utils.logger import Logging
1615
from .refs import due
16+
from .pkg_info import get_pkg_info as _get_pkg_info
1717

1818
try:
1919
import faulthandler
@@ -25,48 +25,26 @@
2525
logging = Logging(config)
2626

2727

28-
class _NoseTester(nosetester.NoseTester):
29-
""" Subclass numpy's NoseTester to add doctests by default
30-
"""
31-
32-
def _get_custom_doctester(self):
33-
return None
34-
35-
def test(self, label='fast', verbose=1, extra_argv=['--exe'],
36-
doctests=True, coverage=False):
37-
"""Run the full test suite
28+
class NipypeTester(object):
29+
def __call__(self, doctests=True):
30+
try:
31+
import pytest
32+
except:
33+
raise RuntimeError('py.test not installed, run: pip install pytest')
34+
params = {'args': []}
35+
if doctests:
36+
params['args'].append('--doctest-modules')
37+
nipype_path = os.path.dirname(__file__)
38+
params['args'].extend(['-x', '--ignore={}/external'.format(nipype_path),
39+
nipype_path])
40+
pytest.main(**params)
3841

39-
Examples
40-
--------
41-
This will run the test suite and stop at the first failing
42-
example
43-
>>> from nipype import test
44-
>>> test(extra_argv=['--exe', '-sx']) # doctest: +SKIP
45-
"""
46-
return super(_NoseTester, self).test(label=label,
47-
verbose=verbose,
48-
extra_argv=extra_argv,
49-
doctests=doctests,
50-
coverage=coverage)
51-
52-
try:
53-
test = _NoseTester(raise_warnings="release").test
54-
except TypeError:
55-
# Older versions of numpy do not have a raise_warnings argument
56-
test = _NoseTester().test
57-
del nosetester
42+
test = NipypeTester()
5843

59-
# Set up package information function
60-
from .pkg_info import get_pkg_info as _get_pkg_info
61-
get_info = lambda: _get_pkg_info(os.path.dirname(__file__))
62-
63-
# If this file is exec after being imported, the following lines will
64-
# fail
65-
try:
66-
del Tester
67-
except:
68-
pass
6944

45+
def get_info():
46+
"""Returns package information"""
47+
return _get_pkg_info(os.path.dirname(__file__))
7048

7149
from .pipeline import Node, MapNode, JoinNode, Workflow
7250
from .interfaces import (DataGrabber, DataSink, SelectFiles,

nipype/algorithms/confounds.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ def _run_interface(self, runtime):
127127
dvars = compute_dvars(self.inputs.in_file, self.inputs.in_mask,
128128
remove_zerovariance=self.inputs.remove_zerovariance)
129129

130-
self._results['avg_std'] = dvars[0].mean()
131-
self._results['avg_nstd'] = dvars[1].mean()
132-
self._results['avg_vxstd'] = dvars[2].mean()
130+
self._results['avg_std'] = float(dvars[0].mean())
131+
self._results['avg_nstd'] = float(dvars[1].mean())
132+
self._results['avg_vxstd'] = float(dvars[2].mean())
133133

134134
tr = None
135135
if isdefined(self.inputs.series_tr):

0 commit comments

Comments
 (0)