Skip to content

Commit 08ddd14

Browse files
committed
Merge branch 'master' of https://github.com/nipy/nipype into fix/ersh
2 parents ff05dea + a81d993 commit 08ddd14

31 files changed

+229
-251
lines changed

.circle/codecov.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
#
3+
# This script pull all coverage files into the $CIRCLE_TEST_REPORTS folder
4+
# and sends data to codecov.
5+
#
6+
7+
# Setting # $ help set
8+
set -e # Exit immediately if a command exits with a non-zero status.
9+
set -u # Treat unset variables as an error when substituting.
10+
set -x # Print command traces before executing command.
11+
12+
mkdir -p ${CIRCLE_TEST_REPORTS}/
13+
for report in $( ls ~/scratch/*.xml ); do
14+
rname=$( basename $report )
15+
cp ${report} ${CIRCLE_TEST_REPORTS}/${rname:: -4}_${CIRCLE_NODE_INDEX}.xml
16+
done
17+
18+
# Send coverage data to codecov.io
19+
curl -so codecov.io https://codecov.io/bash
20+
chmod 755 codecov.io
21+
22+
find "${CIRCLE_TEST_REPORTS}/" -name 'coverage*.xml' -print0 | \
23+
xargs -0 -I file ./codecov.io -f file -t "${CODECOV_TOKEN}" -F unittests
24+
find "${CIRCLE_TEST_REPORTS}/" -name 'smoketests*.xml' -print0 | \
25+
xargs -0 -I file ./codecov.io -f file -t "${CODECOV_TOKEN}" -F smoketests
Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
#!/bin/bash
2+
#
3+
# Balance nipype testing workflows across CircleCI build nodes
4+
#
25

3-
set -o nounset
4-
set -o xtrace
5-
6-
export CODECOV_TOKEN=ac172a50-8e66-42e5-8822-5373fcf54686
6+
# Setting # $ help set
7+
set -e # Exit immediately if a command exits with a non-zero status.
8+
set -u # Treat unset variables as an error when substituting.
9+
set -x # Print command traces before executing command.
710

811
if [ "${CIRCLE_NODE_TOTAL:-}" != "4" ]; then
912
echo "These tests were designed to be run at 4x parallelism."
@@ -14,15 +17,15 @@ fi
1417
# They may need to be rebalanced in the future.
1518
case ${CIRCLE_NODE_INDEX} in
1619
0)
17-
docker run --rm -it -v $HOME/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-
docker run --rm -it -v $HOME/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
19-
;;
20-
1)
21-
docker run --rm -it -v $HOME/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-
docker run --rm -it -v $HOME/examples:/root/examples:ro -v $SCRATCH:/scratch -w /scratch nipype/nipype_test:py35 /usr/bin/run_examples.sh test_spm Linear /root/examples/ workflow4d && \
2320
docker run --rm -it -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" -v $HOME/examples:/root/examples:ro -v $SCRATCH:/scratch -w /root/src/nipype nipype/nipype_test:py27 /usr/bin/run_pytests.sh py27 && \
2421
docker run --rm -it -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" -v $HOME/examples:/root/examples:ro -v $SCRATCH:/scratch -w /root/src/nipype nipype/nipype_test:py35 /usr/bin/run_pytests.sh py35 && \
25-
docker run --rm -it -v $SCRATCH:/scratch -w /root/src/nipype/doc nipype/nipype_test:py35 /usr/bin/run_builddocs.sh
22+
docker run --rm -it -v $SCRATCH:/scratch -w /root/src/nipype/doc nipype/nipype_test:py35 /usr/bin/run_builddocs.sh && \
23+
docker run --rm -it -v $HOME/examples:/root/examples:ro -v $SCRATCH:/scratch -w /scratch nipype/nipype_test:py35 /usr/bin/run_examples.sh test_spm Linear /root/examples/ workflow3d && \
24+
docker run --rm -it -v $HOME/examples:/root/examples:ro -v $SCRATCH:/scratch -w /scratch nipype/nipype_test:py35 /usr/bin/run_examples.sh test_spm Linear /root/examples/ workflow4d
25+
;;
26+
1)
27+
docker run --rm -it -v $HOME/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 && \
28+
docker run --rm -it -v $HOME/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
2629
;;
2730
2)
2831
docker run --rm -it -e NIPYPE_NUMBER_OF_CPUS=4 -v $HOME/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 && \
@@ -34,14 +37,3 @@ case ${CIRCLE_NODE_INDEX} in
3437
docker run --rm -it -v $HOME/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
3538
;;
3639
esac
37-
38-
# Put the artifacts in place
39-
bash docker/files/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

.dockerignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ src/
2323
# other
2424
docs/**/*
2525
docs/
26+
.circle/**/*
27+
.circle/
28+
circle.yml
2629
.coverage
2730
.coveragerc
2831
codecov.yml
2932
rtd_requirements.txt
30-
circle.yml
3133
Vagrantfile
3234
.travis.yml
3335
.noserc

README.rst

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ Support and Communication
7878
-------------------------
7979

8080
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.
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.
8383

8484
To participate in the Nipype development related discussions please use the following mailing list::
8585

@@ -117,16 +117,3 @@ Currently Nipype consists of the following files and directories:
117117
setup.py
118118
Script for building and installing NIPYPE.
119119

120-
License information
121-
-------------------
122-
123-
We use the 3-clause BSD license; the full license is in the file ``LICENSE`` in
124-
the nipype distribution.
125-
126-
There are interfaces to some GNU code but these are entirely optional.
127-
128-
All trademarks referenced herein are property of their respective
129-
holders.
130-
131-
Copyright (c) 2009-2015, NIPY Developers
132-
All rights reserved.

circle.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ machine:
88
DATA_NIPYPE_FSL_COURSE: "${OSF_NIPYPE_URL}/57f472cf9ad5a101f977ecfe"
99
DATA_NIPYPE_FSL_FEEDS: "${OSF_NIPYPE_URL}/57f473066c613b01f113e7af"
1010
SCRATCH: "$HOME/scratch"
11+
CODECOV_TOKEN: "ac172a50-8e66-42e5-8822-5373fcf54686"
1112
services:
1213
- docker
1314

@@ -32,34 +33,39 @@ dependencies:
3233
- 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
3334
- docker images
3435
- sed -i -E "s/(__version__ = )'[A-Za-z0-9.-]+'/\1'$CIRCLE_TAG'/" nipype/info.py
35-
- e=1 && for i in {1..5}; do docker build -t nipype/nipype:latest --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg VCS_REF=`git rev-parse --short HEAD` --build-arg VERSION=$CIRCLE_TAG . && e=0 && break || sleep 15; done && [ "$e" -eq "0" ] :
36+
- e=1 && for i in {1..5}; do docker build --rm=false -t nipype/nipype:latest --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg VCS_REF=`git rev-parse --short HEAD` --build-arg VERSION=$CIRCLE_TAG . && e=0 && break || sleep 15; done && [ "$e" -eq "0" ] :
3637
timeout: 21600
37-
- e=1 && for i in {1..5}; do docker build -f docker/Dockerfile_py27 -t nipype/nipype_test:py27 . && e=0 && break || sleep 15; done && [ "$e" -eq "0" ] :
38+
- e=1 && for i in {1..5}; do docker build --rm=false -f docker/Dockerfile_py27 -t nipype/nipype_test:py27 . && e=0 && break || sleep 15; done && [ "$e" -eq "0" ] :
3839
timeout: 1600
39-
- e=1 && for i in {1..5}; do docker build -f docker/Dockerfile_py35 -t nipype/nipype_test:py35 . && e=0 && break || sleep 15; done && [ "$e" -eq "0" ] :
40+
- e=1 && for i in {1..5}; do docker build --rm=false -f docker/Dockerfile_py35 -t nipype/nipype_test:py35 . && e=0 && break || sleep 15; done && [ "$e" -eq "0" ] :
4041
timeout: 1600
4142
- docker save -o $HOME/docker/cache.tar nipype/nipype:latest nipype/nipype_test:py27 nipype/nipype_test:py35 :
4243
timeout: 6000
4344

4445
test:
4546
override:
46-
- bash docker/files/tests.sh :
47+
- bash .circle/tests.sh :
4748
timeout: 7200
4849
parallel: true
50+
post:
51+
# Send coverage data to codecov.io
52+
- bash .circle/codecov.sh
4953

5054
general:
5155
artifacts:
52-
- "~/docs"
53-
- "~/logs"
56+
- "~/scratch/docs"
57+
- "~/scratch/logs"
5458

5559
deployment:
5660
production:
5761
tag: /.*/
5862
commands:
63+
# Deploy to docker hub
5964
- if [[ -n "$DOCKER_PASS" ]]; then docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS && docker push nipype/nipype:latest; fi :
6065
timeout: 21600
6166
- if [[ -n "$DOCKER_PASS" ]]; then docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS && docker tag nipype/nipype nipype/nipype:$CIRCLE_TAG && docker push nipype/nipype:$CIRCLE_TAG; fi :
6267
timeout: 21600
68+
6369
# Automatic deployment to Pypi:
6470
# - printf "[distutils]\nindex-servers =\n pypi\n\n[pypi]\nusername:$PYPI_USER\npassword:$PYPI_PASS\n" > ~/.pypirc
6571
# - python setup.py sdist upload -r pypi

docker/files/teardown.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

nipype/algorithms/tests/test_auto_CompCor.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

nipype/algorithms/tests/test_auto_ComputeDVARS.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ def test_ComputeDVARS_inputs():
1717
),
1818
in_mask=dict(mandatory=True,
1919
),
20+
intensity_normalization=dict(usedefault=True,
21+
),
2022
remove_zerovariance=dict(usedefault=True,
2123
),
2224
save_all=dict(usedefault=True,

nipype/algorithms/tests/test_auto_FramewiseDisplacement.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ def test_FramewiseDisplacement_inputs():
1919
),
2020
out_file=dict(usedefault=True,
2121
),
22+
parameter_source=dict(mandatory=True,
23+
),
2224
radius=dict(usedefault=True,
2325
),
2426
save_plot=dict(usedefault=True,

nipype/algorithms/tests/test_auto_ErrorMap.py renamed to nipype/algorithms/tests/test_auto_NonSteadyStateDetector.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,26 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
22
from __future__ import unicode_literals
3-
from ..metrics import ErrorMap
3+
from ..confounds import NonSteadyStateDetector
44

55

6-
def test_ErrorMap_inputs():
6+
def test_NonSteadyStateDetector_inputs():
77
input_map = dict(ignore_exception=dict(nohash=True,
88
usedefault=True,
99
),
10-
in_ref=dict(mandatory=True,
10+
in_file=dict(mandatory=True,
1111
),
12-
in_tst=dict(mandatory=True,
13-
),
14-
mask=dict(),
15-
metric=dict(mandatory=True,
16-
usedefault=True,
17-
),
18-
out_map=dict(),
1912
)
20-
inputs = ErrorMap.input_spec()
13+
inputs = NonSteadyStateDetector.input_spec()
2114

2215
for key, metadata in list(input_map.items()):
2316
for metakey, value in list(metadata.items()):
2417
assert getattr(inputs.traits()[key], metakey) == value
2518

2619

27-
def test_ErrorMap_outputs():
28-
output_map = dict(distance=dict(),
29-
out_map=dict(),
20+
def test_NonSteadyStateDetector_outputs():
21+
output_map = dict(n_volumes_to_discard=dict(),
3022
)
31-
outputs = ErrorMap.output_spec()
23+
outputs = NonSteadyStateDetector.output_spec()
3224

3325
for key, metadata in list(output_map.items()):
3426
for metakey, value in list(metadata.items()):

0 commit comments

Comments
 (0)