Skip to content

Commit 45ed6d3

Browse files
committed
Merge branch 'fix/Py3UseBuiltinOpen' into enh/FSLb0calc
2 parents f9fd701 + cc86fc6 commit 45ed6d3

File tree

633 files changed

+3237
-3814
lines changed

Some content is hidden

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

633 files changed

+3237
-3814
lines changed

.dockerignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
*.pyc
33
*.egg-info
44
__pycache__
5-
5+
docker/nipype_*
6+
docker/test-*
7+
.coverage

.noserc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[nosetests]
22
verbosity=3
3-
43
logging-level=DEBUG
54
with-doctest=1
5+
with-doctest-ignore-unicode=1
6+
67
with-xunit=1
78
with-coverage=1
89
cover-branches=1

.travis.yml

Lines changed: 24 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,57 +9,39 @@ env:
99
- INSTALL_DEB_DEPENDECIES=true
1010
- INSTALL_DEB_DEPENDECIES=false
1111
before_install:
12-
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
13-
-O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
14-
-O miniconda.sh; fi
15-
- chmod +x miniconda.sh
16-
- "./miniconda.sh -b"
17-
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then export PATH=/home/travis/miniconda2/bin:$PATH; else export PATH=/home/travis/miniconda3/bin:$PATH; fi
12+
- wget http://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-latest-Linux-x86_64.sh
13+
-O /home/travis/.cache/miniconda.sh
14+
- bash /home/travis/.cache/miniconda.sh -b -p /home/travis/miniconda
15+
- export PATH=/home/travis/miniconda/bin:$PATH
1816
- if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; fi
1917
- if $INSTALL_DEB_DEPENDECIES; then sudo ln -s /run/shm /dev/shm; fi
2018
- bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh)
21-
- sudo apt-get update
22-
- sudo apt-get install xvfb
23-
- if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -qq --no-install-recommends
24-
fsl afni elastix; fi
25-
- if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -qq fsl-atlases;
26-
fi
27-
- if $INSTALL_DEB_DEPENDECIES; then source /etc/fsl/fsl.sh; fi
28-
- if $INSTALL_DEB_DEPENDECIES; then source /etc/afni/afni.sh; fi
19+
- sudo apt-get -y update
20+
- sudo apt-get -y install xvfb fusefat
21+
- if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -y -qq
22+
fsl afni elastix fsl-atlases; fi
23+
- if $INSTALL_DEB_DEPENDECIES; then
24+
source /etc/fsl/fsl.sh;
25+
source /etc/afni/afni.sh; fi
2926
- export FSLOUTPUTTYPE=NIFTI_GZ
30-
# Install vtk and fix numpy installation problem
31-
# Fix numpy problem: https://github.com/enthought/enable/issues/34#issuecomment-2029381
32-
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then travis_retry sudo apt-get install -qq libx11-dev swig;
33-
echo '[x11]' >> $HOME/.numpy-site.cfg;
34-
echo 'library_dirs = /usr/lib64:/usr/lib:/usr/lib/x86_64-linux-gnu' >> $HOME/.numpy-site.cfg;
35-
echo 'include_dirs = /usr/include:/usr/include/X11' >> $HOME/.numpy-site.cfg;
36-
fi
3727
install:
38-
- sudo apt-get install fusefat
28+
- conda config --add channels conda-forge
3929
- conda update --yes conda
40-
- conda create -n testenv --yes pip python=$TRAVIS_PYTHON_VERSION
41-
- source activate testenv
42-
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then pip install ordereddict; fi
43-
- conda install --yes numpy scipy nose networkx python-dateutil
44-
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then conda install --yes traits; else pip install traits; fi
45-
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then conda install --yes vtk; fi
46-
- pip install python-coveralls
47-
- pip install nose-cov
48-
# Add tvtk (PIL is required by blockcanvas)
49-
# Install mayavi (see https://github.com/enthought/mayavi/issues/271)
50-
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then
51-
pip install http://effbot.org/downloads/Imaging-1.1.7.tar.gz;
52-
pip install -e git+https://github.com/enthought/etsdevtools.git#egg=etsdevtools;
53-
pip install -e git+https://github.com/enthought/blockcanvas.git#egg=blockcanvas;
54-
pip install -e git+https://github.com/enthought/etsproxy.git#egg=etsproxy;
55-
pip install https://github.com/dmsurti/mayavi/archive/4d4aaf315a29d6a86707dd95149e27d9ed2225bf.zip;
56-
pip install -e git+https://github.com/enthought/ets.git#egg=ets;
57-
fi
30+
- conda update --all -y python=$TRAVIS_PYTHON_VERSION
31+
# - if [[ "${INSTALL_DEB_DEPENDECIES}" == "true" && ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]]; then
32+
# conda install -y vtk mayavi; fi
33+
- conda install -y nipype
34+
- pip install python-coveralls coverage doctest-ignore-unicode
35+
- rm -r /home/travis/miniconda/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype*
36+
- pip install -r requirements.txt
5837
- pip install -e .
38+
- export COVERAGE_PROCESS_START=$(pwd)/.coveragerc
39+
- export COVERAGE_DATA_FILE=$(pwd)/.coverage
40+
- echo "data_file = ${COVERAGE_DATA_FILE}" >> ${COVERAGE_PROCESS_START}
5941
script:
60-
- python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest --with-cov --cover-package nipype --cov-config .coveragerc --logging-level=DEBUG --verbosity=3
42+
- python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest --with-doctest-ignore-unicode --with-cov --cover-package nipype --logging-level=DEBUG --verbosity=3
6143
after_success:
62-
- coveralls --config_file .coveragerc
44+
- coveralls --config_file ${COVERAGE_PROCESS_START}
6345
deploy:
6446
provider: pypi
6547
user: satra

CHANGES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ Upcoming release 0.13
22
=====================
33

44
* ENH: New interface to b0calc of FSL-POSSUM (https://github.com/nipy/nipype/pull/1399)
5+
* FIX: Use builtins open and unicode literals for py3 compatibility (https://github.com/nipy/nipype/pull/1572)
56
* TST: reduce the size of docker images & use tags for images (https://github.com/nipy/nipype/pull/1564)
67
* ENH: Implement missing inputs/outputs in FSL AvScale (https://github.com/nipy/nipype/pull/1563)
8+
* FIX: Fix symlink test in copyfile (https://github.com/nipy/nipype/pull/1570, https://github.com/nipy/nipype/pull/1586)
9+
* ENH: Added support for custom job submission check in SLURM (https://github.com/nipy/nipype/pull/1582)
710

811

912
Release 0.12.1 (August 3, 2016)

Makefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,24 @@ clean-ctags:
4646
clean-doc:
4747
rm -rf doc/_build
4848

49-
clean: clean-build clean-pyc clean-so clean-ctags clean-doc
49+
clean-tests:
50+
rm -f .coverage
51+
52+
clean: clean-build clean-pyc clean-so clean-ctags clean-doc clean-tests
5053

5154
in: inplace # just a shortcut
5255
inplace:
5356
$(PYTHON) setup.py build_ext -i
5457

5558
test-code: in
56-
$(NOSETESTS) -s nipype --with-doctest
59+
$(NOSETESTS) -s nipype --with-doctest --with-doctest-ignore-unicode
5760

5861
test-doc:
59-
$(NOSETESTS) -s --with-doctest --doctest-tests --doctest-extension=rst \
62+
$(NOSETESTS) -s --with-doctest --with-doctest-ignore-unicode --doctest-tests --doctest-extension=rst \
6063
--doctest-fixtures=_fixture doc/
6164

62-
test-coverage:
63-
$(NOSETESTS) -s --with-doctest --with-coverage --cover-package=nipype \
65+
test-coverage: clean-tests in
66+
$(NOSETESTS) -s --with-doctest --with-doctest-ignore-unicode --with-coverage --cover-package=nipype \
6467
--config=.coveragerc
6568

6669
test: clean test-code

build_docs.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
23
# vi: set ft=python sts=4 ts=4 sw=4 et:
34
"""
@@ -7,8 +8,8 @@
78
89
python setup.py build_sphinx
910
"""
10-
11-
from __future__ import print_function
11+
from __future__ import print_function, division, unicode_literals, absolute_import
12+
from builtins import open, str
1213

1314
# Standard library imports
1415
import sys
@@ -22,7 +23,7 @@
2223

2324
_info_fname = pjoin(os.path.dirname(__file__), 'nipype', 'info.py')
2425
INFO_VARS = {}
25-
exec(open(_info_fname, 'rt').read(), {}, INFO_VARS)
26+
exec(str(open(_info_fname, 'rt').read()), {}, INFO_VARS)
2627

2728
DOC_BUILD_DIR = os.path.join('doc', '_build', 'html')
2829
DOC_DOCTREES_DIR = os.path.join('doc', '_build', 'doctrees')

circle.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,38 @@ dependencies:
99
- "~/.apt-cache"
1010

1111
pre:
12-
- mkdir -p "~/scratch/nose"
13-
- mkdir -p "~/examples"
1412
# Let CircleCI cache the apt archive
15-
- sudo rm -rf /var/cache/apt/archives && sudo ln -s ~/.apt-cache /var/cache/apt/archives && mkdir -p ~/.apt-cache/partial
13+
- mkdir -p ~/.apt-cache/partial && sudo rm -rf /var/cache/apt/archives && sudo ln -s ~/.apt-cache /var/cache/apt/archives
1614
- sudo apt-get -y update && sudo apt-get install -y wget bzip2
1715

1816
override:
17+
- mkdir -p ~/examples ~/scratch/nose ~/scratch/logs
18+
- if [[ ! -d ~/examples/nipype-tutorial ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -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
20+
- if [[ ! -d ~/examples/feeds ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q https://3552243d5be815c1b09152da6525cb8fe7b900a6.googledrive.com/host/0BxI12kyv2olZVUswazA3NkFvOXM/fsl-5.0.9-feeds.tar.gz && tar xzf fsl-5.0.9-feeds.tar.gz -C ~/examples/; fi
1921
- if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
20-
- docker build -f docker/nipype_test_py27/Dockerfile -t nipype/nipype_test:py27 . :
22+
- docker build -f docker/nipype_test/Dockerfile_py35 -t nipype/nipype_test:py35 . :
2123
timeout: 1600
22-
- mkdir -p ~/docker; docker save nipype/nipype_test:py27 > ~/docker/image.tar :
24+
- mkdir -p ~/docker; docker save nipype/nipype_test:py35 > ~/docker/image.tar :
2325
timeout: 1600
24-
- 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
25-
- 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
2626

2727
test:
2828
override:
29-
- docker run -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /root/src/nipype/doc nipype/nipype_test:py27 /usr/bin/run_builddocs.sh
30-
- 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 test_spm Linear /root/examples/ workflow3d :
29+
- 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
30+
- 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_nosetests.sh :
31+
timeout: 2600
32+
- 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 :
3133
timeout: 1600
32-
- 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 test_spm Linear /root/examples/ workflow4d :
34+
- 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 :
3335
timeout: 1600
34-
- 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_feeds Linear /root/examples/ l1pipeline
35-
- 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_dartel Linear /root/examples/ level1 :
36+
- 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
37+
- 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 :
3638
timeout: 1600
37-
- 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_dartel Linear /root/examples/ l2pipeline :
39+
- 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 :
3840
timeout: 1600
39-
- 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
40-
- 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
41-
- 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
42-
- docker run -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_nosetests.sh :
43-
timeout: 2600
41+
- 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
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 fmri_spm_nested Linear /root/examples/ level1
43+
- 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_nested Linear /root/examples/ l2pipeline
4444
post:
4545
- bash docker/circleci/teardown.sh
4646

@@ -50,5 +50,4 @@ general:
5050
- "~/logs"
5151
- "~/coverage.xml"
5252
- "~/nosetests.xml"
53-
- "~/builddocs.log"
5453
- "~/scratch"

doc/sphinxext/autosummary_generate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
./ext/autosummary_generate.py -o source/generated source/*.rst
1717
1818
"""
19+
from __future__ import print_function, unicode_literals
20+
from builtins import open
1921

20-
from __future__ import print_function
21-
import glob
2222
import re
2323
import inspect
2424
import os

doc/sphinxext/numpy_ext/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# -*- coding: utf-8 -*-

doc/sphinxext/numpy_ext/docscrape.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
# -*- coding: utf-8 -*-
12
"""Extract reference documentation from the NumPy source tree.
23
34
"""
4-
55
from __future__ import print_function
66
from future import standard_library
77
standard_library.install_aliases()
@@ -13,7 +13,7 @@
1313
import pydoc
1414
from warnings import warn
1515

16-
from nipype.external.six import StringIO
16+
from io import StringIO
1717

1818

1919
class Reader(object):

0 commit comments

Comments
 (0)