Skip to content

Commit ad48e19

Browse files
committed
Merge remote-tracking branch 'origin/master' into HEAD
2 parents ecbea3d + 70b2084 commit ad48e19

Some content is hidden

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

77 files changed

+1377
-1049
lines changed

.circle/tests.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
#
3+
# Balance nipype testing workflows across CircleCI build nodes
4+
#
5+
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.
10+
11+
if [ "${CIRCLE_NODE_TOTAL:-}" != "4" ]; then
12+
echo "These tests were designed to be run at 4x parallelism."
13+
exit 1
14+
fi
15+
16+
# These tests are manually balanced based on previous build timings.
17+
# They may need to be rebalanced in the future.
18+
case ${CIRCLE_NODE_INDEX} in
19+
0)
20+
docker run --rm=false -it -e CODECOV_TOKEN=${CODECOV_TOKEN} -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 CODECOV_TOKEN=${CODECOV_TOKEN} -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 -e CODECOV_TOKEN=${CODECOV_TOKEN} -v $WORKDIR:/work -w /src/nipype/doc nipype/nipype:py35 /usr/bin/run_builddocs.sh && \
23+
docker run --rm=false -it -e CODECOV_TOKEN=${CODECOV_TOKEN} -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 -e CODECOV_TOKEN=${CODECOV_TOKEN} -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
25+
;;
26+
1)
27+
docker run --rm=false -it -e CODECOV_TOKEN=${CODECOV_TOKEN} -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 -e CODECOV_TOKEN=${CODECOV_TOKEN} -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
29+
;;
30+
2)
31+
docker run --rm=false -it -e CODECOV_TOKEN=${CODECOV_TOKEN} -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 CODECOV_TOKEN=${CODECOV_TOKEN} -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
33+
;;
34+
3)
35+
docker run --rm=false -it -e CODECOV_TOKEN=${CODECOV_TOKEN} -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 -e CODECOV_TOKEN=${CODECOV_TOKEN} -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 -e CODECOV_TOKEN=${CODECOV_TOKEN} -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
38+
;;
39+
esac

.coveragerc

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

.dockerignore

Lines changed: 9 additions & 6 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,12 +24,14 @@ src/
2324
# other
2425
docs/**/*
2526
docs/
26-
.coverage
27-
.coveragerc
28-
codecov.yml
29-
rtd_requirements.txt
27+
.cache/
28+
.circle/**/*
29+
.circle/
3030
circle.yml
31+
rtd_requirements.txt
3132
Vagrantfile
3233
.travis.yml
33-
.noserc
34+
.mailmap
3435

36+
# Previous coverage results
37+
.coverage

.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

CHANGES

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,31 @@
1-
Upcoming release 0.13
1+
Upcoming Release
22
=====================
33

4+
* ENH: Added non-steady state detector for EPI data (https://github.com/nipy/nipype/pull/1839)
5+
* ENH: Enable new BBRegister init options for FSv6+ (https://github.com/nipy/nipype/pull/1811)
6+
* REF: Splits nipype.interfaces.utility into base, csv, and wrappers (https://github.com/nipy/nipype/pull/1828)
7+
* FIX: Makespec now runs with nipype in current directory (https://github.com/nipy/nipype/pull/1813)
8+
* FIX: Flexible nifti opening with mmap if Numpy < 1.12.0 (https://github.com/nipy/nipype/pull/1796 + https://github.com/nipy/nipype/pull/1831)
49
* ENH: DVARS includes intensity normalization feature - turned on by default (https://github.com/nipy/nipype/pull/1827)
510
* FIX: DVARS is correctly using sum of squares instead of standard deviation (https://github.com/nipy/nipype/pull/1827)
611
* ENH: Refactoring of nipype.interfaces.utility (https://github.com/nipy/nipype/pull/1828)
712
* FIX: CircleCI were failing silently. Some fixes to tests (https://github.com/nipy/nipype/pull/1833)
813
* FIX: Issues in Docker image permissions, and docker documentation (https://github.com/nipy/nipype/pull/1825)
914
* ENH: Revised all Dockerfiles and automated deployment to Docker Hub
1015
from CircleCI (https://github.com/nipy/nipype/pull/1815)
16+
* ENH: Update ReconAll interface for FreeSurfer v6.0.0 (https://github.com/nipy/nipype/pull/1790)
17+
* FIX: Cast DVARS float outputs to avoid memmap error (https://github.com/nipy/nipype/pull/1777)
18+
* FIX: FSL FNIRT intensity mapping files (https://github.com/nipy/nipype/pull/1799)
19+
* ENH: Additional outputs generated by FSL EDDY (https://github.com/nipy/nipype/pull/1793)
20+
* TST: Parallelize CircleCI build across 4 containers (https://github.com/nipy/nipype/pull/1769)
21+
22+
23+
0.13.0-rc1 (January 4, 2017)
24+
===============================
25+
26+
* FIX: Compatibility with traits 4.6 (https://github.com/nipy/nipype/pull/1770)
27+
* FIX: Multiproc deadlock (https://github.com/nipy/nipype/pull/1756)
28+
* TST: Replace nose and unittest with pytest (https://github.com/nipy/nipype/pull/1722, https://github.com/nipy/nipype/pull/1751)
1129
* FIX: Semaphore capture using MultiProc plugin (https://github.com/nipy/nipype/pull/1689)
1230
* REF: Refactor AFNI interfaces (https://github.com/nipy/nipype/pull/1678, https://github.com/nipy/nipype/pull/1680)
1331
* ENH: Move nipype commands to group command using click (https://github.com/nipy/nipype/pull/1608)
@@ -36,7 +54,6 @@ Upcoming release 0.13
3654
* ENH: Added support for custom job submission check in SLURM (https://github.com/nipy/nipype/pull/1582)
3755
* ENH: Added ANTs interface CreateJacobianDeterminantImage; replaces deprecated JacobianDeterminant
3856
(https://github.com/nipy/nipype/pull/1654)
39-
* ENH: Update ReconAll interface for FreeSurfer v6.0.0 (https://github.com/nipy/nipype/pull/1790)
4057

4158
Release 0.12.1 (August 3, 2016)
4259
===============================

Dockerfile

Lines changed: 42 additions & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -30,191 +30,74 @@
3030
#
3131
# Based on https://github.com/poldracklab/fmriprep/blob/9c92a3de9112f8ef1655b876de060a2ad336ffb0/Dockerfile
3232
#
33-
FROM ubuntu:xenial-20161213
33+
FROM nipype/base:latest
3434
MAINTAINER The nipype developers https://github.com/nipy/nipype
3535

36-
ARG DEBIAN_FRONTEND=noninteractive
37-
38-
# Pre-cache neurodebian key
39-
COPY docker/files/neurodebian.gpg /root/.neurodebian.gpg
40-
41-
# Prepare environment
42-
RUN apt-key add /root/.neurodebian.gpg && \
43-
apt-get update && \
44-
apt-get install -y --no-install-recommends curl bzip2 ca-certificates xvfb && \
45-
curl -sSL http://neuro.debian.net/lists/xenial.us-ca.full >> /etc/apt/sources.list.d/neurodebian.sources.list && \
46-
apt-key adv --refresh-keys --keyserver hkp://ha.pool.sks-keyservers.net 0xA5D32F012649A5A9 || true; \
47-
apt-get update
48-
49-
# Installing freesurfer
50-
RUN curl -sSL https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.0/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz | tar zxv -C /opt \
51-
--exclude='freesurfer/trctrain' \
52-
--exclude='freesurfer/subjects/fsaverage_sym' \
53-
--exclude='freesurfer/subjects/fsaverage3' \
54-
--exclude='freesurfer/subjects/fsaverage4' \
55-
--exclude='freesurfer/subjects/fsaverage5' \
56-
--exclude='freesurfer/subjects/fsaverage6' \
57-
--exclude='freesurfer/subjects/cvs_avg35' \
58-
--exclude='freesurfer/subjects/cvs_avg35_inMNI152' \
59-
--exclude='freesurfer/subjects/bert' \
60-
--exclude='freesurfer/subjects/V1_average' \
61-
--exclude='freesurfer/average/mult-comp-cor' \
62-
--exclude='freesurfer/lib/cuda' \
63-
--exclude='freesurfer/lib/qt'
64-
65-
ENV FSL_DIR=/usr/share/fsl/5.0 \
66-
OS=Linux \
67-
FS_OVERRIDE=0 \
68-
FIX_VERTEX_AREA= \
69-
FSF_OUTPUT_FORMAT=nii.gz \
70-
FREESURFER_HOME=/opt/freesurfer
71-
ENV SUBJECTS_DIR=$FREESURFER_HOME/subjects \
72-
FUNCTIONALS_DIR=$FREESURFER_HOME/sessions \
73-
MNI_DIR=$FREESURFER_HOME/mni \
74-
LOCAL_DIR=$FREESURFER_HOME/local \
75-
FSFAST_HOME=$FREESURFER_HOME/fsfast \
76-
MINC_BIN_DIR=$FREESURFER_HOME/mni/bin \
77-
MINC_LIB_DIR=$FREESURFER_HOME/mni/lib \
78-
MNI_DATAPATH=$FREESURFER_HOME/mni/data \
79-
FMRI_ANALYSIS_DIR=$FREESURFER_HOME/fsfast
80-
ENV PERL5LIB=$MINC_LIB_DIR/perl5/5.8.5 \
81-
MNI_PERL5LIB=$MINC_LIB_DIR/perl5/5.8.5 \
82-
PATH=$FREESURFER_HOME/bin:$FSFAST_HOME/bin:$FREESURFER_HOME/tktools:$MINC_BIN_DIR:$PATH
83-
RUN echo "cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IC9vcHQvZnJlZXN1cmZlci9saWNlbnNlLnR4dAo=" | base64 -d | sh
84-
85-
# Installing Neurodebian packages (FSL, AFNI, git)
86-
RUN apt-get install -y --no-install-recommends \
87-
fsl-core=5.0.9-1~nd+1+nd16.04+1 \
88-
fsl-mni152-templates=5.0.7-2 \
89-
afni=16.2.07~dfsg.1-2~nd16.04+1
90-
91-
ENV FSLDIR=/usr/share/fsl/5.0 \
92-
FSLOUTPUTTYPE=NIFTI_GZ \
93-
FSLMULTIFILEQUIT=TRUE \
94-
POSSUMDIR=/usr/share/fsl/5.0 \
95-
LD_LIBRARY_PATH=/usr/lib/fsl/5.0:$LD_LIBRARY_PATH \
96-
FSLTCLSH=/usr/bin/tclsh \
97-
FSLWISH=/usr/bin/wish \
98-
AFNI_MODELPATH=/usr/lib/afni/models \
99-
AFNI_IMSAVE_WARNINGS=NO \
100-
AFNI_TTATLAS_DATASET=/usr/share/afni/atlases \
101-
AFNI_PLUGINPATH=/usr/lib/afni/plugins \
102-
PATH=/usr/lib/fsl/5.0:/usr/lib/afni/bin:$PATH
103-
104-
# Installing and setting up ANTs
105-
RUN mkdir -p /opt/ants && \
106-
curl -sSL "https://github.com/stnava/ANTs/releases/download/v2.1.0/Linux_Ubuntu14.04.tar.bz2" \
107-
| tar -xjC /opt/ants --strip-components 1
108-
109-
ENV ANTSPATH=/opt/ants \
110-
PATH=$ANTSPATH:$PATH
111-
112-
# Installing and setting up c3d
113-
RUN mkdir -p /opt/c3d && \
114-
curl -sSL "http://downloads.sourceforge.net/project/c3d/c3d/1.0.0/c3d-1.0.0-Linux-x86_64.tar.gz" \
115-
| tar -xzC /opt/c3d --strip-components 1
116-
117-
ENV C3DPATH=/opt/c3d/ \
118-
PATH=$C3DPATH/bin:$PATH
119-
120-
# Install some other required tools
121-
RUN apt-get install -y --no-install-recommends \
122-
git=1:2.7.4-0ubuntu1 \
123-
graphviz=2.38.0-12ubuntu2 \
124-
unzip \
125-
apt-utils \
126-
fusefat \
127-
make \
128-
ruby=1:2.3.0+1 && \
129-
apt-get clean && \
130-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
131-
132-
# Install fake-S3
133-
ENV GEM_HOME /usr/lib/ruby/gems/2.3
134-
ENV BUNDLE_PATH="$GEM_HOME" \
135-
BUNDLE_BIN="$GEM_HOME/bin" \
136-
BUNDLE_SILENCE_ROOT_WARNING=1 \
137-
BUNDLE_APP_CONFIG="$GEM_HOME"
138-
ENV PATH $BUNDLE_BIN:$PATH
139-
RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" && \
140-
chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
141-
142-
RUN gem install fakes3
143-
144-
# Install Matlab MCR: from the good old install_spm_mcr.sh of @chrisfilo
145-
WORKDIR /opt
146-
RUN echo "destinationFolder=/opt/mcr" > mcr_options.txt && \
147-
echo "agreeToLicense=yes" >> mcr_options.txt && \
148-
echo "outputFile=/tmp/matlabinstall_log" >> mcr_options.txt && \
149-
echo "mode=silent" >> mcr_options.txt && \
150-
mkdir -p matlab_installer && \
151-
curl -sSL http://www.mathworks.com/supportfiles/downloads/R2015a/deployment_files/R2015a/installers/glnxa64/MCR_R2015a_glnxa64_installer.zip \
152-
-o matlab_installer/installer.zip && \
153-
unzip matlab_installer/installer.zip -d matlab_installer/ && \
154-
matlab_installer/install -inputFile mcr_options.txt && \
155-
rm -rf matlab_installer mcr_options.txt
156-
157-
# Install SPM
158-
RUN curl -sSL http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/spm12_r6472_Linux_R2015a.zip -o spm12.zip && \
159-
unzip spm12.zip && \
160-
rm -rf spm12.zip
161-
162-
ENV MATLABCMD="/opt/mcr/v85/toolbox/matlab" \
163-
SPMMCRCMD="/opt/spm12/run_spm12.sh /opt/mcr/v85/ script" \
164-
FORCE_SPMMCR=1
165-
36+
ARG PYTHON_VERSION_MAJOR=3
16637

16738
# Installing and setting up miniconda
168-
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda3-4.2.12-Linux-x86_64.sh && \
169-
bash Miniconda3-4.2.12-Linux-x86_64.sh -b -p /usr/local/miniconda && \
170-
rm Miniconda3-4.2.12-Linux-x86_64.sh
39+
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda${PYTHON_VERSION_MAJOR}-4.2.12-Linux-x86_64.sh && \
40+
bash Miniconda${PYTHON_VERSION_MAJOR}-4.2.12-Linux-x86_64.sh -b -p /usr/local/miniconda && \
41+
rm Miniconda${PYTHON_VERSION_MAJOR}-4.2.12-Linux-x86_64.sh
17142

17243
ENV PATH=/usr/local/miniconda/bin:$PATH \
17344
LANG=C.UTF-8 \
17445
LC_ALL=C.UTF-8 \
175-
ACCEPT_INTEL_PYTHON_EULA=yes
46+
ACCEPT_INTEL_PYTHON_EULA=yes \
47+
MKL_NUM_THREADS=1 \
48+
OMP_NUM_THREADS=1
49+
# MKL/OMP_NUM_THREADS: unless otherwise specified, each process should
50+
# only use one thread - nipype will handle parallelization
17651

17752
# Installing precomputed python packages
178-
RUN conda config --add channels conda-forge --add channels intel && \
179-
chmod +x /usr/local/miniconda/bin/* && \
180-
conda config --set always_yes yes --set changeps1 no && \
181-
conda update -q conda && \
182-
chmod +x /usr/local/miniconda/bin/*; sync && \
183-
conda install -y mkl=2017.0.1 \
184-
numpy=1.11.2 \
185-
scipy=0.18.1 \
186-
scikit-learn=0.17.1 \
187-
matplotlib=1.5.3 \
188-
pandas=0.19.0 \
189-
libxml2=2.9.4 \
190-
libxslt=1.1.29 \
53+
ARG PYTHON_VERSION_MINOR=5
54+
RUN conda config --add channels conda-forge; sync && \
55+
conda config --set always_yes yes --set changeps1 no; sync && \
56+
conda install -y python=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} \
57+
mkl \
58+
numpy \
59+
scipy \
60+
scikit-learn \
61+
matplotlib \
62+
pandas \
63+
libxml2 \
64+
libxslt \
19165
traits=4.6.0 \
192-
psutil=5.0.1 \
66+
psutil \
19367
icu=58.1 && \
194-
find /usr/local/miniconda/ -exec chmod 775 {} +
68+
sync;
19569

19670
# matplotlib cleanups: set default backend, precaching fonts
197-
RUN sed -i 's/\(backend *: \).*$/\1Agg/g' /usr/local/miniconda/lib/python3.5/site-packages/matplotlib/mpl-data/matplotlibrc && \
71+
RUN sed -i 's/\(backend *: \).*$/\1Agg/g' /usr/local/miniconda/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/matplotlib/mpl-data/matplotlibrc && \
19872
python -c "from matplotlib import font_manager"
19973

200-
# Unless otherwise specified each process should only use one thread - nipype
201-
# will handle parallelization
202-
ENV MKL_NUM_THREADS=1 \
203-
OMP_NUM_THREADS=1
74+
# Install codecov inside container
75+
RUN curl -so /usr/bin/codecov.io https://codecov.io/bash && \
76+
chmod 755 /usr/bin/codecov.io
77+
78+
# Install CI scripts
79+
COPY docker/files/run_* /usr/bin/
80+
RUN chmod +x /usr/bin/run_*
81+
82+
# Replace imglob with a Python3 compatible version
83+
COPY nipype/external/fsl_imglob.py /usr/bin/fsl_imglob.py
84+
RUN rm -rf ${FSLDIR}/bin/imglob && \
85+
chmod +x /usr/bin/fsl_imglob.py && \
86+
ln -s /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob
20487

20588
# Installing dev requirements (packages that are not in pypi)
206-
WORKDIR /root/
89+
WORKDIR /src/
20790
COPY requirements.txt requirements.txt
20891
RUN pip install -r requirements.txt && \
20992
rm -rf ~/.cache/pip
21093

21194
# Installing nipype
212-
COPY . /root/src/nipype
213-
RUN cd /root/src/nipype && \
95+
COPY . /src/nipype
96+
RUN cd /src/nipype && \
21497
pip install -e .[all] && \
21598
rm -rf ~/.cache/pip
21699

217-
WORKDIR /root/
100+
WORKDIR /work/
218101

219102
ARG BUILD_DATE
220103
ARG VCS_REF

0 commit comments

Comments
 (0)