Skip to content

Commit 6df4b26

Browse files
committed
Merge remote-tracking branch 'nipy/master'
2 parents 1f99dea + cf2b1f8 commit 6df4b26

39 files changed

+765
-357
lines changed

.circle/codecov.sh

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

.circle/tests.sh

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,27 @@ fi
1717
# They may need to be rebalanced in the future.
1818
case ${CIRCLE_NODE_INDEX} in
1919
0)
20-
docker run --rm -it -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /src/nipype nipype/nipype:py27 /usr/bin/run_pytests.sh py27 && \
21-
docker run --rm -it -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /src/nipype nipype/nipype:py35 /usr/bin/run_pytests.sh py35 && \
22-
docker run --rm -it -v $WORKDIR:/work -w /src/nipype/doc nipype/nipype:py35 /usr/bin/run_builddocs.sh && \
23-
docker run --rm -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh test_spm Linear /data/examples/ workflow3d && \
24-
docker run --rm -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh test_spm Linear /data/examples/ workflow4d
20+
docker run --rm=false -it -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py35 /usr/bin/run_pytests.sh && \
21+
docker run --rm=false -it -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py27 /usr/bin/run_pytests.sh && \
22+
docker run --rm=false -it -v $WORKDIR:/work -w /src/nipype/doc nipype/nipype:py35 /usr/bin/run_builddocs.sh && \
23+
docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh test_spm Linear /data/examples/ workflow3d && \
24+
docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh test_spm Linear /data/examples/ workflow4d
2525
;;
2626
1)
27-
docker run --rm -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh fmri_spm_dartel Linear /data/examples/ level1 && \
28-
docker run --rm -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh fmri_spm_dartel Linear /data/examples/ l2pipeline
27+
docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh fmri_spm_dartel Linear /data/examples/ level1 && \
28+
docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh fmri_spm_dartel Linear /data/examples/ l2pipeline
2929
;;
3030
2)
31-
docker run --rm -it -e NIPYPE_NUMBER_OF_CPUS=4 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py27 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ level1 && \
32-
docker run --rm -it -e NIPYPE_NUMBER_OF_CPUS=4 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ l2pipeline
31+
docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py27 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ level1 && \
32+
docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ l2pipeline
3333
;;
3434
3)
35-
docker run --rm -it -e NIPYPE_NUMBER_OF_CPUS=4 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ level1 && \
36-
docker run --rm -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh fmri_fsl_feeds Linear /data/examples/ l1pipeline && \
37-
docker run --rm -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh fmri_fsl_reuse Linear /data/examples/ level1_workflow
35+
docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ level1 && \
36+
docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh fmri_fsl_feeds Linear /data/examples/ l1pipeline && \
37+
docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh fmri_fsl_reuse Linear /data/examples/ level1_workflow
3838
;;
3939
esac
40+
41+
cp ${WORKDIR}/tests/*.xml ${CIRCLE_TEST_REPORTS}/tests/
42+
codecov -f "coverage*.xml" -s "${WORKDIR}/tests/" -R "${HOME}/nipype/" -F unittests -e CIRCLE_NODE_INDEX
43+
codecov -f "smoketest*.xml" -s "${WORKDIR}/tests/" -R "${HOME}/nipype/" -F smoketests -e CIRCLE_NODE_INDEX

.coveragerc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
11
[run]
22
branch = True
3-
include = */nipype/*
4-
omit =
5-
*/nipype/external/*
6-
*/nipype/fixes/*
7-
*/setup.py

.dockerignore

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# python cache
2-
__pycache__/**/*
32
__pycache__
3+
**/__pycache__
4+
**/*.pyc
45
*.pyc
56

67
# python distribution
@@ -23,14 +24,14 @@ src/
2324
# other
2425
docs/**/*
2526
docs/
27+
.cache/
2628
.circle/**/*
2729
.circle/
2830
circle.yml
29-
.coverage
30-
.coveragerc
31-
codecov.yml
3231
rtd_requirements.txt
3332
Vagrantfile
3433
.travis.yml
35-
.noserc
34+
.mailmap
3635

36+
# Previous coverage results
37+
.coverage

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ crash*.pklz
2424
htmlcov/
2525
__pycache__/
2626
*~
27+
.*.swp
2728
.ipynb_checkpoints/
2829
.ruby-version

.noserc

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

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ before_install:
4242
install:
4343
- travis_retry pip install -e .[$NIPYPE_EXTRAS]
4444
script:
45-
- py.test --doctest-modules nipype
45+
- py.test -v --doctest-modules nipype
4646
deploy:
4747
provider: pypi
4848
user: satra

Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ RUN conda config --add channels conda-forge; sync && \
7171
RUN sed -i 's/\(backend *: \).*$/\1Agg/g' /usr/local/miniconda/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/matplotlib/mpl-data/matplotlibrc && \
7272
python -c "from matplotlib import font_manager"
7373

74+
# Install CI scripts
75+
COPY docker/files/run_* /usr/bin/
76+
RUN chmod +x /usr/bin/run_*
77+
78+
# Replace imglob with a Python3 compatible version
79+
COPY nipype/external/fsl_imglob.py /usr/bin/fsl_imglob.py
80+
RUN rm -rf ${FSLDIR}/bin/imglob && \
81+
chmod +x /usr/bin/fsl_imglob.py && \
82+
ln -s /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob
83+
7484
# Installing dev requirements (packages that are not in pypi)
7585
WORKDIR /src/
7686
COPY requirements.txt requirements.txt
@@ -83,16 +93,6 @@ RUN cd /src/nipype && \
8393
pip install -e .[all] && \
8494
rm -rf ~/.cache/pip
8595

86-
# Install CI scripts
87-
COPY docker/files/run_* /usr/bin/
88-
RUN chmod +x /usr/bin/run_*
89-
90-
# Replace imglob with a Python3 compatible version
91-
COPY nipype/external/fsl_imglob.py /usr/bin/fsl_imglob.py
92-
RUN rm -rf ${FSLDIR}/bin/imglob && \
93-
chmod +x /usr/bin/fsl_imglob.py && \
94-
ln -s /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob
95-
9696
WORKDIR /work/
9797

9898
ARG BUILD_DATE

circle.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,18 @@ dependencies:
1717
- "~/docker"
1818
- "~/examples"
1919
- "~/.apt-cache"
20+
- "~/bin"
2021

2122
pre:
2223
# Let CircleCI cache the apt archive
2324
- mkdir -p ~/.apt-cache/partial && sudo rm -rf /var/cache/apt/archives && sudo ln -s ~/.apt-cache /var/cache/apt/archives
2425
- sudo apt-get -y update && sudo apt-get install -y wget bzip2
2526
# Create work folder and force group permissions
2627
- mkdir -p $WORKDIR && sudo setfacl -d -m group:ubuntu:rwx $WORKDIR && sudo setfacl -m group:ubuntu:rwx $WORKDIR
27-
- mkdir -p $HOME/docker $HOME/examples $WORKDIR/pytest $WORKDIR/logs
28+
- mkdir -p $HOME/docker $HOME/examples $WORKDIR/tests $WORKDIR/logs $WORKDIR/crashfiles ${CIRCLE_TEST_REPORTS}/tests/
29+
- if [[ ! -e "$HOME/bin/codecov" ]]; then mkdir -p $HOME/bin; curl -so $HOME/bin/codecov https://codecov.io/bash && chmod 755 $HOME/bin/codecov; fi
2830
override:
29-
- if [[ -e $HOME/docker/cache.tar ]]; then docker load --input $HOME/docker/cache.tar; fi :
31+
- if [[ -e "$HOME/docker/cache.tar" ]]; then docker load --input $HOME/docker/cache.tar; fi :
3032
timeout: 6000
3133
- docker images
3234
- docker pull nipype/base:latest
@@ -48,14 +50,13 @@ test:
4850
- bash .circle/tests.sh :
4951
timeout: 7200
5052
parallel: true
51-
post:
52-
# Send coverage data to codecov.io
53-
- bash .circle/codecov.sh
5453

5554
general:
5655
artifacts:
5756
- "~/work/docs"
5857
- "~/work/logs"
58+
- "~/work/tests"
59+
- "~/work/crashfiles"
5960

6061
deployment:
6162
production:

codecov.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@ coverage:
2222
threshold: 100
2323
flags:
2424
- "smoketests"
25+
ignore: # files and folders that will be removed during processing
26+
- "nipype/external/*"
27+
- "tools/*"
28+
- "doc/*"

0 commit comments

Comments
 (0)