Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
d365c58
add a pylintrc
oesteban Aug 8, 2016
e08743b
use open from builtins always
oesteban Aug 8, 2016
9a3c73d
update CHANGES
oesteban Aug 9, 2016
02b19ae
travis: force install requirements
oesteban Aug 9, 2016
6c057f4
futurize files that needed it
oesteban Aug 9, 2016
65031e8
remove .pylintrc
oesteban Aug 9, 2016
339e216
Replace traits.Str by traits.Unicode
oesteban Aug 9, 2016
f052346
futurize traits Str and DictStrStr
oesteban Aug 9, 2016
1fb9335
fix traits_extension and interfaces.base
oesteban Aug 9, 2016
cdd09f0
futurize interfaces.io
oesteban Aug 9, 2016
fe12b80
add absolute_import in base and io
oesteban Aug 9, 2016
cfd20fd
circle: bump tests to py3.5 and give more retries to wget
oesteban Aug 9, 2016
e764e15
circle: bump tests to py3.5 (fixed in docker calls)
oesteban Aug 9, 2016
9d253d6
add encoding comment at top
oesteban Aug 9, 2016
1c157c8
fix json writing in py2
oesteban Aug 9, 2016
bbc1d4f
add matplotlib, coverage, nose-cov and boto to dockerfile
oesteban Aug 9, 2016
feaf9d5
remove coding indication in info.py, breaks exec
oesteban Aug 9, 2016
c40ba40
restore LANG and LC_ALL in docker image
oesteban Aug 9, 2016
5b9a796
docker image: add sphinx to build docs
oesteban Aug 9, 2016
f38fb07
Merge branch 'fix/DipyBreaksBuildDocs' into fix/Py3UseBuiltinOpen
oesteban Aug 9, 2016
4bc2fd1
futurize stages 1 and 2
oesteban Aug 10, 2016
e334a8b
remove dependency from external/six
oesteban Aug 10, 2016
2aad2d5
replace relative imports of six
oesteban Aug 10, 2016
d0f9cba
finish up removing external six
oesteban Aug 10, 2016
bdceaf4
fixing tests...
oesteban Aug 10, 2016
81449b6
making tests pass in python 2
oesteban Aug 10, 2016
e2dbf1d
fix incorrect use of except in py3
oesteban Aug 11, 2016
a61008c
Fix provenance code
oesteban Aug 11, 2016
160defa
Re-enabled the ValueError caching for one case (sequences)
oesteban Aug 11, 2016
1315863
make test_provenance py3 compatible
oesteban Aug 11, 2016
0290058
examples: do not cleanup work directory before run
oesteban Aug 11, 2016
46910c2
remove large try...except structures in provenance
oesteban Aug 11, 2016
041e2ff
add doctest-ignore-unicode
oesteban Aug 11, 2016
7104f43
remove all appearances of py3compat
oesteban Aug 11, 2016
b2270ad
add --with-doctest-ignore-unicode to .travis
oesteban Aug 11, 2016
8de6a37
fix errors in doctest vals of afni.preprocess
oesteban Aug 11, 2016
25194e1
Update doctests to Python3, with nose ignore flags
oesteban Aug 12, 2016
57496bd
fixing error in doctests
oesteban Aug 12, 2016
6ebda75
Merge branch 'fix/Py3UseBuiltinOpen' of github.com:oesteban/nipype in…
oesteban Aug 12, 2016
9147d39
fix some tests py3.5
oesteban Aug 12, 2016
dadc8a8
update travis file to new conda installation
oesteban Aug 12, 2016
1dc919a
travis: remove conda installation of nipype before installing current
oesteban Aug 12, 2016
36307f0
travis: install miniconda in same path, regardless version
oesteban Aug 12, 2016
62e2086
travis: simplify miniconda install
oesteban Aug 12, 2016
8abb4eb
travis: fix miniconda install
oesteban Aug 12, 2016
bf99979
travis: install doctest-ignore-unicode always
oesteban Aug 12, 2016
c109cbc
bring doctest-ignore back to py2, and see how doctest should be
oesteban Aug 12, 2016
f1aacb3
handle OrderedDict
oesteban Aug 12, 2016
54e5f7f
still working on travis file
oesteban Aug 12, 2016
8794c72
still working on travis file (fix error)
oesteban Aug 12, 2016
b1302f7
still working on travis file (add auto-yes to conda install)
oesteban Aug 12, 2016
bcc1af2
still working on travis file (vtk not installed if dependencies are n…
oesteban Aug 12, 2016
f4e039c
travis: do not install vtk if nodeps or python is 3.4
oesteban Aug 12, 2016
3f255fb
fix clipping text in provenance
oesteban Aug 12, 2016
8403762
fix clipping text in provenance (2)
oesteban Aug 12, 2016
cb4fc57
remove u-strings from doctests
oesteban Aug 12, 2016
cf08a84
fixing doctests (remove u-string)
oesteban Aug 12, 2016
9acc8f2
fixing doctests (remove u-string)
oesteban Aug 12, 2016
61cafcc
fixing doctests, some missing IGNORE_UNICODE tags
oesteban Aug 13, 2016
13f4d87
restrict vtk to python 2.7 for now
oesteban Aug 13, 2016
7507829
add IGNORE_UNICODE in doctest
oesteban Aug 13, 2016
f137e45
re-enable a reduced version of fsl_course_data
oesteban Aug 13, 2016
2d0a775
circle: fix nipype-fsl_course_data link
oesteban Aug 13, 2016
f0ad210
Merge remote-tracking branch 'upstream/master' into fix/Py3UseBuiltin…
oesteban Aug 15, 2016
e083c87
Merge branch 'master' into fix/Py3UseBuiltinOpen
oesteban Aug 15, 2016
963d3a0
fix IGNORE_UNICODE flags
oesteban Aug 15, 2016
a6e042d
circleci: fix work directory in nosetests
oesteban Aug 15, 2016
b89c312
save crashfiles to an artifacts dir
oesteban Aug 15, 2016
627f032
circle: fixing eddy tests
oesteban Aug 16, 2016
f6b7a89
travis: remove vtk for now
oesteban Aug 16, 2016
ac41ff2
circle: fix copy crashfiles, update py27 image
oesteban Aug 16, 2016
bb2c6aa
[FIX] Update MRIPretess to name_source, add freesurfer.utils tests
oesteban Aug 17, 2016
52e85aa
travis: chasing md5 digest problem, circle: make specs
oesteban Aug 17, 2016
d361c87
fix syntax error
oesteban Aug 17, 2016
a0ca996
fixing syntax errors in interfaces.base
oesteban Aug 17, 2016
b84ce93
update Dockerfiles to reduce number of skipped tests
oesteban Aug 17, 2016
a9654db
do not use six.text_types
oesteban Aug 17, 2016
791f34d
revert py3 string formatting
oesteban Aug 17, 2016
984f7a3
DEBUG: Separate stat test, add err_msg
effigies Aug 18, 2016
846762e
Merge remote-tracking branch 'effigies/fix_linkchain_test' into fix/P…
oesteban Aug 18, 2016
37ddd15
compatibility with old bytes in py2
oesteban Aug 19, 2016
0e06a2d
py2/3 compatibility hashing inputs
oesteban Aug 19, 2016
c826680
update specs
oesteban Aug 19, 2016
ba57f3b
compat py2/3, fix encoding issues
oesteban Aug 19, 2016
39477c0
compat py2/3: fix spm_base test
oesteban Aug 19, 2016
b264391
compat 2/3: open mode b to dump json in py2
oesteban Aug 19, 2016
917d273
add unicode_literals to test_provenance
oesteban Aug 19, 2016
a2db4bb
travis: fixing coverage errors in the end of tests
oesteban Aug 19, 2016
e81a6bc
TEST: Separate recopy test, err_msg for debugging
effigies Aug 18, 2016
a2daadd
When creating a symlink, check against realpath of source
effigies Aug 19, 2016
05f393b
Update changelog
effigies Aug 19, 2016
cbe60b2
Merge remote-tracking branch 'effigies/fix_linkchain_test' into fix/P…
oesteban Aug 19, 2016
0ed04d6
Update CHANGES
oesteban Aug 19, 2016
e682455
comment out failing tests from effigies/fix_linkchain_test branch
oesteban Aug 19, 2016
9792641
Merge remote-tracking branch 'effigies/fix_linkchain_test' into fix/P…
oesteban Aug 21, 2016
8b6a173
Merge branch 'master' into fix/Py3UseBuiltinOpen
oesteban Aug 21, 2016
0748dd2
update data links
oesteban Aug 22, 2016
0a3ee98
Merge remote-tracking branch 'upstream/master' into fix/Py3UseBuiltin…
oesteban Aug 24, 2016
632c1f1
multiple fixes for python 3 compatibility
oesteban Aug 24, 2016
e6bf7d5
fixing python 2 compatibility
oesteban Aug 25, 2016
e9f608e
fix invalid string comparison
oesteban Aug 25, 2016
ce2274e
make check-before-commit
oesteban Aug 25, 2016
a16b7eb
add from builtins import open where needed, fixed some open and never…
oesteban Aug 25, 2016
90f0cc0
fixing missing open from builtins, unicode details
oesteban Aug 25, 2016
36e5920
fix syntax error
oesteban Aug 25, 2016
4e040ac
add dipy to docker images
oesteban Aug 25, 2016
637a73b
fixing indentation problem in examples/fmri_ants_openfmri.py
oesteban Aug 25, 2016
3b19e82
remove unnecessary ENV layers from docker images
oesteban Aug 25, 2016
85bd23d
Merge remote-tracking branch 'upstream/master' into fix/Py3UseBuiltin…
oesteban Aug 25, 2016
cc86fc6
Re-arrange Dockerfiles, move fsl_imglob.py to external
oesteban Aug 26, 2016
0d51e9c
Merge remote-tracking branch 'upstream/master' into fix/Py3UseBuiltin…
oesteban Aug 29, 2016
27d0099
remove make specs from dockerfile
oesteban Aug 30, 2016
37aa532
build py27 image, run nosetests py27, run multiproc (py27, py35) of f…
oesteban Aug 30, 2016
128e0dc
see if circle does not fail with pre-cached files
oesteban Aug 30, 2016
bee71be
produce one xunitfile per py version and merge them
oesteban Aug 30, 2016
0b93918
tweaks to speed up image build
oesteban Aug 30, 2016
d49efb7
add debug trace to failing operation, update dockerimages
oesteban Sep 1, 2016
74c93ec
fix syntax errors in Dockerfile
oesteban Sep 1, 2016
c4f1a52
unicode fixes, np.savetxt does not take unicode fmt
oesteban Sep 1, 2016
d686bde
fix np.savetxt with format
oesteban Sep 2, 2016
ce6a10b
making pickle compatible py 2 and 3
oesteban Sep 2, 2016
6009b57
clean up previous execution of examples
oesteban Sep 2, 2016
eed2157
fix tests
oesteban Sep 2, 2016
426bf46
fix runtime profiler tests
oesteban Sep 2, 2016
608f3f7
enable runtime profiler tests
oesteban Sep 2, 2016
39742cf
make fakes3 detection more reliable and python <2.6 compatible
oesteban Sep 2, 2016
d32422a
fixing runtime_profiler tests
oesteban Sep 2, 2016
b8129f8
fix error in test_io
oesteban Sep 6, 2016
cd4f89a
add documentation about testing
oesteban Sep 6, 2016
6defc92
Merge remote-tracking branch 'upstream/master' into fix/Py3UseBuiltin…
oesteban Sep 6, 2016
306c8e5
fix typo in testing docs
oesteban Sep 6, 2016
314b2fe
save python 2.7 image as it contains more layers than the 3.5 image
oesteban Sep 6, 2016
f97dc45
add link to developer install
oesteban Sep 6, 2016
0921506
limit number of cpus in MultiProc test workflows
oesteban Sep 7, 2016
38cbf46
Merge branch 'master' into fix/Py3UseBuiltinOpen
oesteban Sep 7, 2016
644aa54
ensure n_procs is int
oesteban Sep 7, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
*.pyc
*.egg-info
__pycache__

docker/nipype_*
docker/test-*
.coverage
3 changes: 2 additions & 1 deletion .noserc
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[nosetests]
verbosity=3

logging-level=DEBUG
with-doctest=1
with-doctest-ignore-unicode=1

with-xunit=1
with-coverage=1
cover-branches=1
Expand Down
68 changes: 25 additions & 43 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,58 +10,40 @@ env:
- INSTALL_DEB_DEPENDECIES=false
- INSTALL_DEB_DEPENDECIES=true DUECREDIT_ENABLE=yes
before_install:
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
-O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
-O miniconda.sh; fi
- chmod +x miniconda.sh
- "./miniconda.sh -b"
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then export PATH=/home/travis/miniconda2/bin:$PATH; else export PATH=/home/travis/miniconda3/bin:$PATH; fi
- wget http://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-latest-Linux-x86_64.sh
-O /home/travis/.cache/miniconda.sh
- bash /home/travis/.cache/miniconda.sh -b -p /home/travis/miniconda
- export PATH=/home/travis/miniconda/bin:$PATH
- if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; fi
- if $INSTALL_DEB_DEPENDECIES; then sudo ln -s /run/shm /dev/shm; fi
- bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh)
- sudo apt-get update
- sudo apt-get install xvfb
- if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -qq --no-install-recommends
fsl afni elastix; fi
- if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -qq fsl-atlases;
fi
- if $INSTALL_DEB_DEPENDECIES; then source /etc/fsl/fsl.sh; fi
- if $INSTALL_DEB_DEPENDECIES; then source /etc/afni/afni.sh; fi
- sudo apt-get -y update
- sudo apt-get -y install xvfb fusefat
- if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -y -qq
fsl afni elastix fsl-atlases; fi
- if $INSTALL_DEB_DEPENDECIES; then
source /etc/fsl/fsl.sh;
source /etc/afni/afni.sh; fi
- export FSLOUTPUTTYPE=NIFTI_GZ
# Install vtk and fix numpy installation problem
# Fix numpy problem: https://github.com/enthought/enable/issues/34#issuecomment-2029381
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then travis_retry sudo apt-get install -qq libx11-dev swig;
echo '[x11]' >> $HOME/.numpy-site.cfg;
echo 'library_dirs = /usr/lib64:/usr/lib:/usr/lib/x86_64-linux-gnu' >> $HOME/.numpy-site.cfg;
echo 'include_dirs = /usr/include:/usr/include/X11' >> $HOME/.numpy-site.cfg;
fi
install:
- sudo apt-get install fusefat
- conda config --add channels conda-forge
- conda update --yes conda
- conda create -n testenv --yes pip python=$TRAVIS_PYTHON_VERSION
- source activate testenv
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then pip install ordereddict; fi
- conda install --yes numpy scipy nose networkx python-dateutil
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then conda install --yes traits; else pip install traits; fi
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then conda install --yes vtk; fi
- pip install python-coveralls
- pip install nose-cov
- if [ ! -z "$DUECREDIT_ENABLE"]; then pip install --user -v duecredit; fi
# Add tvtk (PIL is required by blockcanvas)
# Install mayavi (see https://github.com/enthought/mayavi/issues/271)
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then
pip install http://effbot.org/downloads/Imaging-1.1.7.tar.gz;
pip install -e git+https://github.com/enthought/etsdevtools.git#egg=etsdevtools;
pip install -e git+https://github.com/enthought/blockcanvas.git#egg=blockcanvas;
pip install -e git+https://github.com/enthought/etsproxy.git#egg=etsproxy;
pip install https://github.com/dmsurti/mayavi/archive/4d4aaf315a29d6a86707dd95149e27d9ed2225bf.zip;
pip install -e git+https://github.com/enthought/ets.git#egg=ets;
fi
- conda update --all -y python=$TRAVIS_PYTHON_VERSION
# - if [[ "${INSTALL_DEB_DEPENDECIES}" == "true" && ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]]; then
# conda install -y vtk mayavi; fi
- conda install -y nipype
- pip install python-coveralls coverage doctest-ignore-unicode
- if [ ! -z "$DUECREDIT_ENABLE"]; then pip install duecredit; fi
- rm -r /home/travis/miniconda/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype*
- pip install -r requirements.txt
- pip install -e .
- export COVERAGE_PROCESS_START=$(pwd)/.coveragerc
- export COVERAGE_DATA_FILE=$(pwd)/.coverage
- echo "data_file = ${COVERAGE_DATA_FILE}" >> ${COVERAGE_PROCESS_START}
script:
- python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest --with-cov --cover-package nipype --cov-config .coveragerc --logging-level=DEBUG --verbosity=3
- python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest --with-doctest-ignore-unicode --with-cov --cover-package nipype --logging-level=DEBUG --verbosity=3
after_success:
- coveralls --config_file .coveragerc
- coveralls --config_file ${COVERAGE_PROCESS_START}
deploy:
provider: pypi
user: satra
Expand Down
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Upcoming release 0.13
=====================

* FIX: Use builtins open and unicode literals for py3 compatibility (https://github.com/nipy/nipype/pull/1572)
* TST: reduce the size of docker images & use tags for images (https://github.com/nipy/nipype/pull/1564)
* ENH: Implement missing inputs/outputs in FSL AvScale (https://github.com/nipy/nipype/pull/1563)
* FIX: Fix symlink test in copyfile (https://github.com/nipy/nipype/pull/1570, https://github.com/nipy/nipype/pull/1586)
Expand Down
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,24 @@ clean-ctags:
clean-doc:
rm -rf doc/_build

clean: clean-build clean-pyc clean-so clean-ctags clean-doc
clean-tests:
rm -f .coverage

clean: clean-build clean-pyc clean-so clean-ctags clean-doc clean-tests

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

test-code: in
$(NOSETESTS) -s nipype --with-doctest
$(NOSETESTS) -s nipype --with-doctest --with-doctest-ignore-unicode

test-doc:
$(NOSETESTS) -s --with-doctest --doctest-tests --doctest-extension=rst \
$(NOSETESTS) -s --with-doctest --with-doctest-ignore-unicode --doctest-tests --doctest-extension=rst \
--doctest-fixtures=_fixture doc/

test-coverage:
$(NOSETESTS) -s --with-doctest --with-coverage --cover-package=nipype \
test-coverage: clean-tests in
$(NOSETESTS) -s --with-doctest --with-doctest-ignore-unicode --with-coverage --cover-package=nipype \
--config=.coveragerc

test: clean test-code
Expand Down
7 changes: 4 additions & 3 deletions build_docs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Expand All @@ -7,8 +8,8 @@

python setup.py build_sphinx
"""

from __future__ import print_function
from __future__ import print_function, division, unicode_literals, absolute_import
from builtins import open, str

# Standard library imports
import sys
Expand All @@ -22,7 +23,7 @@

_info_fname = pjoin(os.path.dirname(__file__), 'nipype', 'info.py')
INFO_VARS = {}
exec(open(_info_fname, 'rt').read(), {}, INFO_VARS)
exec(str(open(_info_fname, 'rt').read()), {}, INFO_VARS)

DOC_BUILD_DIR = os.path.join('doc', '_build', 'html')
DOC_DOCTREES_DIR = os.path.join('doc', '_build', 'doctrees')
Expand Down
44 changes: 26 additions & 18 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,49 @@ dependencies:
- sudo apt-get -y update && sudo apt-get install -y wget bzip2

override:
- mkdir -p ~/scratch/nose ~/examples
- 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
- mkdir -p ~/examples ~/scratch/nose ~/scratch/logs
- 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
- 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
- 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
- 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
- if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
- docker build -f docker/nipype_test_py27/Dockerfile -t nipype/nipype_test:py27 . :
- docker build -f docker/nipype_test/Dockerfile_py35 -t nipype/nipype_test:py35 . :
timeout: 1600
- docker build -f docker/nipype_test/Dockerfile_py27 -t nipype/nipype_test:py27 . :
timeout: 1600
- mkdir -p ~/docker; docker save nipype/nipype_test:py27 > ~/docker/image.tar :
timeout: 1600
- pip install xunitmerge

test:
override:
- 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
- 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 :
- 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
- 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 :
timeout: 2600
- 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 :
timeout: 2600
- 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 :
timeout: 1600
- 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 :
- 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 :
timeout: 1600
- 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
- 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 :
- 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
- 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 :
timeout: 1600
- 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 :
- 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 :
timeout: 1600
- 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
- 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
- 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
- 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 :
timeout: 2600
- 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
- 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the NIPYPE_NUMBER_OF_CPUS variable used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see!

On Wed, Sep 7, 2016 at 11:41 AM, Oscar Esteban [email protected]
wrote:

In circle.yml
#1572 (comment):

     timeout: 1600
    • 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
    • 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
    • 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
    • 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 :
  •    timeout: 2600
    
    • 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
    • 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

https://github.com/oesteban/nipype/blob/fix/Py3UseBuiltinOpen/tools/run_
examples.py#L23


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nipy/nipype/pull/1572/files/644aa549fd478afb50419774e3238eab0c08ab93#r77880468,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAOkp4eDjPttM0KyEuGRHIgJO0KyZRFRks5qnwV0gaJpZM4Jfl9M
.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was the way to set it in run_examples.py with the least changes.

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

post:
- bash docker/circleci/teardown.sh

general:
artifacts:
- "~/docs"
- "~/logs"
- "~/coverage.xml"
- "~/nosetests.xml"
- "~/builddocs.log"
- "~/coverage_py27.xml"
- "~/coverage_py35.xml"
- "~/nosetests_py27.xml"
- "~/nosetests_py35.xml"
- "~/scratch"
1 change: 1 addition & 0 deletions doc/devel/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ conventions documented in the `NIPY Developers Guide
architecture
provenance
software_using_nipype
testing_nipype


.. include:: ../links_names.txt
73 changes: 73 additions & 0 deletions doc/devel/testing_nipype.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
==============
Testing nipype
==============

In order to ensure the stability of each release of Nipype, the project uses two
continuous integration services: `CircleCI <https://circleci.com/gh/nipy/nipype/tree/master>`_
and `Travis CI <https://travis-ci.org/nipy/nipype>`_.
If both batteries of tests are passing, the following badges should be shown in green color:

.. image:: https://travis-ci.org/nipy/nipype.png?branch=master
:target: https://travis-ci.org/nipy/nipype

.. image:: https://circleci.com/gh/nipy/nipype/tree/master.svg?style=svg
:target: https://circleci.com/gh/nipy/nipype/tree/master


Tests implementation
--------------------

Nipype testing framework is built upon `nose <http://nose.readthedocs.io/en/latest/>`_.
By the time these guidelines are written, Nipype implements 17638 tests.

To run the tests locally, first get nose installed::

pip install nose


Then, after nipype is `installed in developer mode <../users/install.html#nipype-for-developers>`_,
the tests can be run with the following simple command::

make tests


Skip tests
----------

Nipype will skip some tests depending on the currently available software and data
dependencies. Installing software dependencies and downloading the necessary data
will reduce the number of skip tests.

Some tests in Nipype make use of some images distributed within the `FSL course data
<http://fsl.fmrib.ox.ac.uk/fslcourse/>`_. This reduced version of the package can be downloaded `here
<https://3552243d5be815c1b09152da6525cb8fe7b900a6.googledrive.com/host/0BxI12kyv2olZVUswazA3NkFvOXM/nipype-fsl_course_data.tar.gz>`_.
To enable the tests depending on these data, just unpack the targz file and set the :code:`FSL_COURSE_DATA` environment
variable to point to that folder.


Testing Nipype using Docker
---------------------------

As of :code:`nipype-0.13`, Nipype is tested inside Docker containers. Once the developer
`has installed the Docker Engine <https://docs.docker.com/engine/installation/>`_, testing
Nipype is as easy as follows::

cd path/to/nipype/
docker build -f docker/nipype_test/Dockerfile_py27 -t nipype/nipype_test:py27
docker run -it --rm -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

For running nipype in Python 3.5::

cd path/to/nipype/
docker build -f docker/nipype_test/Dockerfile_py35 -t nipype/nipype_test:py35
docker run -it --rm -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
4 changes: 2 additions & 2 deletions doc/sphinxext/autosummary_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
./ext/autosummary_generate.py -o source/generated source/*.rst

"""
from __future__ import print_function, unicode_literals
from builtins import open

from __future__ import print_function
import glob
import re
import inspect
import os
Expand Down
1 change: 1 addition & 0 deletions doc/sphinxext/numpy_ext/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# -*- coding: utf-8 -*-
4 changes: 2 additions & 2 deletions doc/sphinxext/numpy_ext/docscrape.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
"""Extract reference documentation from the NumPy source tree.

"""

from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
Expand All @@ -13,7 +13,7 @@
import pydoc
from warnings import warn

from nipype.external.six import StringIO
from io import StringIO


class Reader(object):
Expand Down
7 changes: 4 additions & 3 deletions doc/sphinxext/numpy_ext/docscrape_sphinx.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from __future__ import absolute_import
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from builtins import str, bytes
import re
import inspect
import textwrap
import pydoc
import sphinx
from .docscrape import NumpyDocString, FunctionDoc, ClassDoc
from nipype.external.six import string_types


class SphinxDocString(NumpyDocString):
Expand Down Expand Up @@ -146,7 +147,7 @@ def _str_references(self):
out = []
if self['References']:
out += self._str_header('References')
if isinstance(self['References'], string_types):
if isinstance(self['References'], (str, bytes)):
self['References'] = [self['References']]
out.extend(self['References'])
out += ['']
Expand Down
1 change: 1 addition & 0 deletions doc/sphinxext/numpy_ext/numpydoc.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
"""
========
numpydoc
Expand Down
3 changes: 2 additions & 1 deletion docker/circleci/run_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -x
set -u

mkdir -p /root/.nipype
mkdir -p /scratch/logs
echo '[logging]' > /root/.nipype/nipype.cfg
echo 'workflow_level = DEBUG' >> /root/.nipype/nipype.cfg
echo 'interface_level = DEBUG' >> /root/.nipype/nipype.cfg
Expand All @@ -13,3 +12,5 @@ echo 'log_to_file = true' >> /root/.nipype/nipype.cfg
echo 'log_directory = /scratch/logs/' >> /root/.nipype/nipype.cfg

python /root/src/nipype/tools/run_examples.py $@

chmod 777 -R /scratch/logs
Loading