Skip to content

Commit 7b05e48

Browse files
committed
Merge branch 'master' into enh/InterfaceLoadSettings
2 parents 48c80b4 + b05d153 commit 7b05e48

File tree

8 files changed

+590
-346
lines changed

8 files changed

+590
-346
lines changed

circle.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ dependencies:
1616
override:
1717
- mkdir -p ~/scratch/nose ~/examples
1818
- if [[ ! -d ~/examples/nipype-tutorial ]]; then wget -q -O nipype-tutorial.tar.bz2 https://dl.dropbox.com/s/jzgq2nupxyz36bp/nipype-tutorial.tar.bz2 && tar xjf nipype-tutorial.tar.bz2 -C ~/examples/; fi
19+
- if [[ ! -d ~/examples/nipype-fsl_course_data ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q https://3552243d5be815c1b09152da6525cb8fe7b900a6.googledrive.com/host/0BxI12kyv2olZVUswazA3NkFvOXM/nipype-fsl_course_data.tar.gz && tar xzf nipype-fsl_course_data.tar.gz -C ~/examples/; fi
1920
- if [[ ! -d ~/examples/feeds ]]; then wget -q -O fsl-feeds.tar.gz https://googledrive.com/host/0BxI12kyv2olZNXBONlJKV0Y1Tm8 && tar xzf fsl-feeds.tar.gz -C ~/examples/; fi
2021
- if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
2122
- docker build -f docker/nipype_test_py27/Dockerfile -t nipype/nipype_test:py27 . :
@@ -38,7 +39,7 @@ test:
3839
- docker run -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v $(pwd)/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_examples.sh fmri_fsl_reuse Linear /root/examples/ level1_workflow
3940
- docker run -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v $(pwd)/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_examples.sh fmri_spm_nested Linear /root/examples/ level1
4041
- docker run -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v $(pwd)/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_examples.sh fmri_spm_nested Linear /root/examples/ l2pipeline
41-
- docker run -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_nosetests.sh :
42+
- docker run -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_nosetests.sh :
4243
timeout: 2600
4344
post:
4445
- bash docker/circleci/teardown.sh

docker/nipype_test_base/Dockerfile

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ MAINTAINER Nipype developers
3131

3232
# Preparations
3333
RUN ln -snf /bin/bash /bin/sh
34-
ARG DEBIAN_FRONTEND=noninteractive
34+
ENV SHELL /bin/bash
3535

36+
ARG DEBIAN_FRONTEND=noninteractive
3637
RUN sed -i -e 's,main$,main contrib non-free,g' /etc/apt/sources.list.d/neurodebian.sources.list && \
3738
apt-get -y update && \
3839
apt-get install -y curl \
@@ -48,14 +49,14 @@ RUN sed -i -e 's,main$,main contrib non-free,g' /etc/apt/sources.list.d/neurodeb
4849
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
4950
echo ". /etc/fsl/fsl.sh" >> /etc/bash.bashrc
5051

51-
ENV FSLDIR=/usr/share/fsl/5.0
52-
ENV FSLOUTPUTTYPE=NIFTI_GZ
53-
ENV PATH=/usr/lib/fsl/5.0:$PATH
54-
ENV FSLMULTIFILEQUIT=TRUE
55-
ENV POSSUMDIR=/usr/share/fsl/5.0
56-
ENV LD_LIBRARY_PATH=/usr/lib/fsl/5.0:$LD_LIBRARY_PATH
57-
ENV FSLTCLSH=/usr/bin/tclsh
58-
ENV FSLWISH=/usr/bin/wish
52+
ENV FSLDIR=/usr/share/fsl/5.0 \
53+
FSLOUTPUTTYPE=NIFTI_GZ \
54+
PATH=/usr/lib/fsl/5.0:$PATH \
55+
FSLMULTIFILEQUIT=TRUE \
56+
POSSUMDIR=/usr/share/fsl/5.0 \
57+
LD_LIBRARY_PATH=/usr/lib/fsl/5.0:$LD_LIBRARY_PATH \
58+
FSLTCLSH=/usr/bin/tclsh \
59+
FSLWISH=/usr/bin/wish
5960

6061
# Install Matlab: from the good old install_spm_mcr.sh of @chrisfilo
6162
WORKDIR /opt
@@ -79,5 +80,25 @@ RUN curl -sSL http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/sp
7980
unzip spm12.zip && \
8081
rm -rf spm12.zip
8182

83+
WORKDIR /root
84+
# Install miniconda
85+
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh && \
86+
/bin/bash Miniconda-latest-Linux-x86_64.sh -b -p /usr/local/miniconda && \
87+
rm Miniconda-latest-Linux-x86_64.sh
88+
89+
ENV PATH /usr/local/miniconda/bin:$PATH
90+
91+
# http://bugs.python.org/issue19846
92+
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
93+
ENV LANG C.UTF-8
94+
95+
# Add conda-forge channel in conda
96+
RUN conda config --add channels conda-forge && \
97+
conda install -y lockfile nipype matplotlib sphinx boto coverage dipy
98+
99+
# Install run scripts
100+
COPY docker/circleci/run_* /usr/bin/
101+
RUN chmod +x /usr/bin/run_*
102+
82103
CMD ["/bin/bash"]
83104

docker/nipype_test_py27/Dockerfile

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,38 +26,16 @@
2626
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2727
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828

29-
FROM nipype/nipype_test:base
29+
FROM nipype/nipype_test:base-0.0.1
3030
MAINTAINER The nipype developers https://github.com/nipy/nipype
31-
# Preparations
32-
RUN ln -snf /bin/bash /bin/sh
33-
WORKDIR /root
3431

35-
# Install miniconda
36-
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh && \
37-
/bin/bash Miniconda-latest-Linux-x86_64.sh -b -p /usr/local/miniconda && \
38-
rm Miniconda-latest-Linux-x86_64.sh
32+
# Pre-check that requirements are installed
33+
WORKDIR /root/src/nipype
34+
COPY requirements.txt /root/src/nipype/requirements.txt
35+
RUN pip install -r requirements.txt
3936

40-
ENV PATH /usr/local/miniconda/bin:$PATH
41-
42-
# http://bugs.python.org/issue19846
43-
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
44-
ENV LANG C.UTF-8
45-
46-
# Add conda-forge channel in conda
47-
RUN conda config --add channels conda-forge && \
48-
conda install -y lockfile nipype matplotlib sphinx boto coverage
49-
50-
RUN mkdir -p /root/src/nipype
5137
COPY . /root/src/nipype
52-
53-
RUN cd /root/src/nipype && \
54-
pip install dipy && \
55-
pip install -r requirements.txt && \
38+
RUN rm -r /usr/local/miniconda/lib/python2.7/site-packages/nipype* && \
5639
pip install -e .
5740

58-
59-
COPY docker/circleci/run_* /usr/bin/
60-
RUN chmod +x /usr/bin/run_*
61-
ENV SHELL /bin/bash
62-
6341
CMD ["/bin/bash"]

nipype/interfaces/spm/base.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,10 @@
1414
spm.SPMCommand().version
1515
"""
1616

17+
# Standard library imports
1718
from __future__ import print_function
1819
from builtins import range
1920
from builtins import object
20-
21-
__docformat__ = 'restructuredtext'
22-
23-
# Standard library imports
2421
import os
2522
from copy import deepcopy
2623

@@ -38,6 +35,8 @@
3835
from ... import logging
3936
logger = logging.getLogger('interface')
4037

38+
__docformat__ = 'restructuredtext'
39+
4140

4241
def func_is_3d(in_file):
4342
"""Checks if input functional files are 3d."""
@@ -216,7 +215,8 @@ class SPMCommandInputSpec(BaseInterfaceInputSpec):
216215
usedefault=True)
217216
use_mcr = traits.Bool(desc='Run m-code using SPM MCR')
218217
use_v8struct = traits.Bool(True, min_ver='8', usedefault=True,
219-
desc=('Generate SPM8 and higher compatible jobs')
218+
desc=('Generate SPM8 and higher '
219+
'compatible jobs')
220220
)
221221

222222

@@ -476,14 +476,15 @@ def _make_matlab_command(self, contents, postscript=None):
476476
end\n
477477
"""
478478
if self.mlab.inputs.mfile:
479-
if isdefined(self.inputs.use_v8struct) and self.inputs.use_v8struct:
479+
if (isdefined(self.inputs.use_v8struct) and
480+
self.inputs.use_v8struct):
480481
mscript += self._generate_job('jobs{1}.spm.%s.%s' %
481482
(self.jobtype, self.jobname),
482483
contents[0])
483484
else:
484485
if self.jobname in ['st', 'smooth', 'preproc', 'preproc8',
485-
'fmri_spec', 'fmri_est', 'factorial_design',
486-
'defs']:
486+
'fmri_spec', 'fmri_est',
487+
'factorial_design', 'defs']:
487488
# parentheses
488489
mscript += self._generate_job('jobs{1}.%s{1}.%s(1)' %
489490
(self.jobtype, self.jobname),

0 commit comments

Comments
 (0)