Skip to content

Commit d12150d

Browse files
authored
Merge pull request #1572 from oesteban/fix/Py3UseBuiltinOpen
[FIX] PY3 compatibility revisited
2 parents 4eb197f + 644aa54 commit d12150d

File tree

634 files changed

+3338
-3866
lines changed

Some content is hidden

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

634 files changed

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

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Upcoming release 0.13
22
=====================
33

4+
* FIX: Use builtins open and unicode literals for py3 compatibility (https://github.com/nipy/nipype/pull/1572)
45
* TST: reduce the size of docker images & use tags for images (https://github.com/nipy/nipype/pull/1564)
56
* ENH: Implement missing inputs/outputs in FSL AvScale (https://github.com/nipy/nipype/pull/1563)
67
* FIX: Fix symlink test in copyfile (https://github.com/nipy/nipype/pull/1570, https://github.com/nipy/nipype/pull/1586)

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: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,49 @@ dependencies:
1414
- sudo apt-get -y update && sudo apt-get install -y wget bzip2
1515

1616
override:
17-
- mkdir -p ~/scratch/nose ~/examples
18-
- 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
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
1919
- 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 -q -O fsl-feeds.tar.gz https://googledrive.com/host/0BxI12kyv2olZNXBONlJKV0Y1Tm8 && tar xzf fsl-feeds.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
2121
- if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
22-
- 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 . :
23+
timeout: 1600
24+
- docker build -f docker/nipype_test/Dockerfile_py27 -t nipype/nipype_test:py27 . :
2325
timeout: 1600
2426
- mkdir -p ~/docker; docker save nipype/nipype_test:py27 > ~/docker/image.tar :
2527
timeout: 1600
28+
- pip install xunitmerge
2629

2730
test:
2831
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 :
32+
- 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
33+
- 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 py35 :
34+
timeout: 2600
35+
- 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:py27 /usr/bin/run_nosetests.sh py27 :
36+
timeout: 2600
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 test_spm Linear /root/examples/ workflow3d :
3138
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 :
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 test_spm Linear /root/examples/ workflow4d :
3340
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 :
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_feeds Linear /root/examples/ l1pipeline
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_dartel Linear /root/examples/ level1 :
3643
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 :
44+
- 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 :
3845
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 -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 :
43-
timeout: 2600
46+
- 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
47+
- docker run -v /etc/localtime:/etc/localtime:ro -e NIPYPE_NUMBER_OF_CPUS=4 -v ~/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
48+
- docker run -v /etc/localtime:/etc/localtime:ro -e NIPYPE_NUMBER_OF_CPUS=4 -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py35 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /root/examples/ level1
49+
- docker run -v /etc/localtime:/etc/localtime:ro -e NIPYPE_NUMBER_OF_CPUS=4 -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py35 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /root/examples/ l2pipeline
50+
4451
post:
4552
- bash docker/circleci/teardown.sh
4653

4754
general:
4855
artifacts:
4956
- "~/docs"
5057
- "~/logs"
51-
- "~/coverage.xml"
52-
- "~/nosetests.xml"
53-
- "~/builddocs.log"
58+
- "~/coverage_py27.xml"
59+
- "~/coverage_py35.xml"
60+
- "~/nosetests_py27.xml"
61+
- "~/nosetests_py35.xml"
5462
- "~/scratch"

doc/devel/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ conventions documented in the `NIPY Developers Guide
1919
architecture
2020
provenance
2121
software_using_nipype
22+
testing_nipype
2223

2324

2425
.. include:: ../links_names.txt

doc/devel/testing_nipype.rst

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
==============
2+
Testing nipype
3+
==============
4+
5+
In order to ensure the stability of each release of Nipype, the project uses two
6+
continuous integration services: `CircleCI <https://circleci.com/gh/nipy/nipype/tree/master>`_
7+
and `Travis CI <https://travis-ci.org/nipy/nipype>`_.
8+
If both batteries of tests are passing, the following badges should be shown in green color:
9+
10+
.. image:: https://travis-ci.org/nipy/nipype.png?branch=master
11+
:target: https://travis-ci.org/nipy/nipype
12+
13+
.. image:: https://circleci.com/gh/nipy/nipype/tree/master.svg?style=svg
14+
:target: https://circleci.com/gh/nipy/nipype/tree/master
15+
16+
17+
Tests implementation
18+
--------------------
19+
20+
Nipype testing framework is built upon `nose <http://nose.readthedocs.io/en/latest/>`_.
21+
By the time these guidelines are written, Nipype implements 17638 tests.
22+
23+
To run the tests locally, first get nose installed::
24+
25+
pip install nose
26+
27+
28+
Then, after nipype is `installed in developer mode <../users/install.html#nipype-for-developers>`_,
29+
the tests can be run with the following simple command::
30+
31+
make tests
32+
33+
34+
Skip tests
35+
----------
36+
37+
Nipype will skip some tests depending on the currently available software and data
38+
dependencies. Installing software dependencies and downloading the necessary data
39+
will reduce the number of skip tests.
40+
41+
Some tests in Nipype make use of some images distributed within the `FSL course data
42+
<http://fsl.fmrib.ox.ac.uk/fslcourse/>`_. This reduced version of the package can be downloaded `here
43+
<https://3552243d5be815c1b09152da6525cb8fe7b900a6.googledrive.com/host/0BxI12kyv2olZVUswazA3NkFvOXM/nipype-fsl_course_data.tar.gz>`_.
44+
To enable the tests depending on these data, just unpack the targz file and set the :code:`FSL_COURSE_DATA` environment
45+
variable to point to that folder.
46+
47+
48+
Testing Nipype using Docker
49+
---------------------------
50+
51+
As of :code:`nipype-0.13`, Nipype is tested inside Docker containers. Once the developer
52+
`has installed the Docker Engine <https://docs.docker.com/engine/installation/>`_, testing
53+
Nipype is as easy as follows::
54+
55+
cd path/to/nipype/
56+
docker build -f docker/nipype_test/Dockerfile_py27 -t nipype/nipype_test:py27
57+
docker run -it --rm -v /etc/localtime:/etc/localtime:ro \
58+
-e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" \
59+
-v ~/examples:/root/examples:ro \
60+
-v ~/scratch:/scratch \
61+
-w /root/src/nipype \
62+
nipype/nipype_test:py27 /usr/bin/run_nosetests.sh
63+
64+
For running nipype in Python 3.5::
65+
66+
cd path/to/nipype/
67+
docker build -f docker/nipype_test/Dockerfile_py35 -t nipype/nipype_test:py35
68+
docker run -it --rm -v /etc/localtime:/etc/localtime:ro \
69+
-e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" \
70+
-v ~/examples:/root/examples:ro \
71+
-v ~/scratch:/scratch \
72+
-w /root/src/nipype \
73+
nipype/nipype_test:py35 /usr/bin/run_nosetests.sh

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):

doc/sphinxext/numpy_ext/docscrape_sphinx.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
from __future__ import absolute_import
1+
# -*- coding: utf-8 -*-
2+
from __future__ import absolute_import, unicode_literals
3+
from builtins import str, bytes
24
import re
35
import inspect
46
import textwrap
57
import pydoc
68
import sphinx
79
from .docscrape import NumpyDocString, FunctionDoc, ClassDoc
8-
from nipype.external.six import string_types
910

1011

1112
class SphinxDocString(NumpyDocString):
@@ -146,7 +147,7 @@ def _str_references(self):
146147
out = []
147148
if self['References']:
148149
out += self._str_header('References')
149-
if isinstance(self['References'], string_types):
150+
if isinstance(self['References'], (str, bytes)):
150151
self['References'] = [self['References']]
151152
out.extend(self['References'])
152153
out += ['']

doc/sphinxext/numpy_ext/numpydoc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
"""
23
========
34
numpydoc

docker/circleci/run_examples.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ set -x
44
set -u
55

66
mkdir -p /root/.nipype
7-
mkdir -p /scratch/logs
87
echo '[logging]' > /root/.nipype/nipype.cfg
98
echo 'workflow_level = DEBUG' >> /root/.nipype/nipype.cfg
109
echo 'interface_level = DEBUG' >> /root/.nipype/nipype.cfg
@@ -13,3 +12,5 @@ echo 'log_to_file = true' >> /root/.nipype/nipype.cfg
1312
echo 'log_directory = /scratch/logs/' >> /root/.nipype/nipype.cfg
1413

1514
python /root/src/nipype/tools/run_examples.py $@
15+
16+
chmod 777 -R /scratch/logs

0 commit comments

Comments
 (0)