Skip to content

Commit

Permalink
Merged with master, fixed simple conflicts. Left changes from oesteba…
Browse files Browse the repository at this point in the history
…n regarding encoding comment and imports for Python 3 compatability.
  • Loading branch information
jason-wg committed Sep 9, 2016
2 parents 04bb78c + 0f9a620 commit 6a1e80b
Show file tree
Hide file tree
Showing 641 changed files with 5,852 additions and 5,174 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
@@ -0,0 +1,7 @@
.git/
*.pyc
*.egg-info
__pycache__
docker/nipype_*
docker/test-*
.coverage
3 changes: 2 additions & 1 deletion .noserc
@@ -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: 26 additions & 42 deletions .travis.yml
Expand Up @@ -8,58 +8,42 @@ python:
env:
- INSTALL_DEB_DEPENDECIES=true
- 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
# 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
14 changes: 14 additions & 0 deletions CHANGES
@@ -1,6 +1,20 @@
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)
* ENH: Added support for custom job submission check in SLURM (https://github.com/nipy/nipype/pull/1582)


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

* FIX: runtime profiling is optional and off by default (https://github.com/nipy/nipype/pull/1561)
* TST: circle CI tests run with docker (https://github.com/nipy/nipype/pull/1541)
* FIX: workflow export functions without import error (https://github.com/nipy/nipype/pull/1552)


Release 0.12.0 (July 12, 2016)
==============================
Expand Down
13 changes: 8 additions & 5 deletions Makefile
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
10 changes: 8 additions & 2 deletions bin/nipype_crash_search
@@ -1,11 +1,12 @@
#!/usr/bin/env python
#!python
"""Search for tracebacks inside a folder of nipype crash
log files that match a given regular expression.
Examples:
nipype_crash_search -d nipype/wd/log -r '.*subject123.*'
"""
import re
import sys
import os.path as op
from glob import glob

Expand Down Expand Up @@ -60,6 +61,7 @@ def display_crash_search(logdir, regex):

if __name__ == "__main__":
from argparse import ArgumentParser, RawTextHelpFormatter

defstr = ' (default %(default)s)'
parser = ArgumentParser(prog='nipype_crash_search',
description=__doc__,
Expand All @@ -71,6 +73,10 @@ if __name__ == "__main__":
default='*',
help='Regular expression to be searched in each traceback.' + defstr)

args = parser.parse_args()
if len(sys.argv) == 1:
parser.print_help()
exit(0)

args = parser.parse_args()
display_crash_search(args.logdir, args.regex)
exit(0)
36 changes: 36 additions & 0 deletions bin/nipype_display_pklz
@@ -0,0 +1,36 @@
#!python
"""Prints the content of any .pklz file in your working directory.
Examples:
nipype_print_pklz _inputs.pklz
nipype_print_pklz _node.pklz
"""

def pprint_pklz_file(pklz_file):
""" Print the content of the pklz_file. """
from pprint import pprint
from nipype.utils.filemanip import loadpkl

pkl_data = loadpkl(pklz_file)
pprint(pkl_data)


if __name__ == "__main__":

import sys
from argparse import ArgumentParser, RawTextHelpFormatter

defstr = ' (default %(default)s)'
parser = ArgumentParser(prog='nipype_print_pklz',
description=__doc__,
formatter_class=RawTextHelpFormatter)
parser.add_argument('pklzfile', metavar='f', type=str,
help='pklz file to display')

if len(sys.argv) == 1:
parser.print_help()
exit(0)

args = parser.parse_args()
pprint_pklz_file(args.pklzfile)
7 changes: 4 additions & 3 deletions build_docs.py
@@ -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
50 changes: 33 additions & 17 deletions circle.yml
Expand Up @@ -5,42 +5,58 @@ machine:
dependencies:
cache_directories:
- "~/docker"
- "~/examples"
- "~/.apt-cache"

pre:
- mkdir -p "~/scratch/nose"
# Let CircleCI cache the apt archive
- mkdir -p ~/.apt-cache/partial && sudo rm -rf /var/cache/apt/archives && sudo ln -s ~/.apt-cache /var/cache/apt/archives
- sudo apt-get -y update && sudo apt-get install -y wget bzip2

override:
- 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 --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 -t nipype/testbench:latest . :
- docker build -f docker/nipype_test/Dockerfile_py35 -t nipype/nipype_test:py35 . :
timeout: 1600
- mkdir -p ~/docker; docker save nipype/testbench:latest > ~/docker/image.tar :
- 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 -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch --entrypoint="/usr/bin/run_builddocs.sh" nipype/testbench
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench 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 -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench 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 -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_fsl_feeds Linear /root/examples/ l1pipeline
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench 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 -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench 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 -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_fsl_reuse Linear /root/examples/ level1_workflow
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_spm_nested Linear /root/examples/ level1
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_spm_nested Linear /root/examples/ l2pipeline
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch --entrypoint="/usr/bin/run_nosetests.sh" nipype/testbench :
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
- 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"
6 changes: 3 additions & 3 deletions doc/Makefile
Expand Up @@ -35,9 +35,9 @@ htmlonly:

api:
rm -rf api/generated
python ../tools/build_modref_templates.py
python -u ../tools/build_modref_templates.py
rm -rf interfaces/generated
python ../tools/build_interface_docs.py
python -u ../tools/build_interface_docs.py
@echo "Build API docs finished."

html: clean examples2rst api htmlonly
Expand Down Expand Up @@ -76,7 +76,7 @@ doctest:
"results in _build/doctest/output.txt."

gitwash-update:
python ../tools/gitwash_dumper.py devel nipype \
python -u ../tools/gitwash_dumper.py devel nipype \
--repo-name=nipype \
--github-user=nipy \
--project-url=http://nipy.org/nipype \
Expand Down
1 change: 1 addition & 0 deletions doc/devel/index.rst
Expand Up @@ -19,6 +19,7 @@ conventions documented in the `NIPY Developers Guide
architecture
provenance
software_using_nipype
testing_nipype


.. include:: ../links_names.txt

0 comments on commit 6a1e80b

Please sign in to comment.