Skip to content

Commit f9fd701

Browse files
committed
Merge branch 'master' into enh/FSLb0calc
2 parents 9d115ca + e0d54f9 commit f9fd701

File tree

101 files changed

+2607
-590
lines changed

Some content is hidden

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

101 files changed

+2607
-590
lines changed

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.git/
2+
*.pyc
3+
*.egg-info
4+
__pycache__
5+

.noserc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
[nosetests]
22
verbosity=3
33

4+
logging-level=DEBUG
5+
with-doctest=1
6+
with-xunit=1
47
with-coverage=1
58
cover-branches=1
69
cover-xml=1
7-
cover-xml-file=./coverage.xml
810
cover-min-percentage=50
9-
10-
11-
with-xunit=1

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ install:
5555
pip install https://github.com/dmsurti/mayavi/archive/4d4aaf315a29d6a86707dd95149e27d9ed2225bf.zip;
5656
pip install -e git+https://github.com/enthought/ets.git#egg=ets;
5757
fi
58-
- pip install -r requirements.txt # finish remaining requirements
59-
- python setup.py install
58+
- pip install -e .
6059
script:
6160
- python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest --with-cov --cover-package nipype --cov-config .coveragerc --logging-level=DEBUG --verbosity=3
6261
after_success:
@@ -70,4 +69,4 @@ deploy:
7069
tags: true
7170
repo: nipy/nipype
7271
branch: master
73-
distributions: "sdist bdist_wheel"
72+
distributions: "sdist"

CHANGES

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
1-
Release 0.12.0-rc1 (April 20, 2016)
2-
============
1+
Upcoming release 0.13
2+
=====================
33

44
* ENH: New interface to b0calc of FSL-POSSUM (https://github.com/nipy/nipype/pull/1399)
5+
* TST: reduce the size of docker images & use tags for images (https://github.com/nipy/nipype/pull/1564)
6+
* ENH: Implement missing inputs/outputs in FSL AvScale (https://github.com/nipy/nipype/pull/1563)
7+
8+
9+
Release 0.12.1 (August 3, 2016)
10+
===============================
11+
12+
* FIX: runtime profiling is optional and off by default (https://github.com/nipy/nipype/pull/1561)
13+
* TST: circle CI tests run with docker (https://github.com/nipy/nipype/pull/1541)
14+
* FIX: workflow export functions without import error (https://github.com/nipy/nipype/pull/1552)
15+
16+
17+
Release 0.12.0 (July 12, 2016)
18+
==============================
19+
20+
* ENH: New interface for Bruker to Nifti converter (https://github.com/nipy/nipype/pull/1523)
21+
* FIX: output file naming for FIRST outputs (https://github.com/nipy/nipype/pull/1524)
22+
* ENH: Adds `fslmaths -Tstd` to maths interfaces (https://github.com/nipy/nipype/pull/1518)
23+
* FIX: Selecting "gamma" in FSL Level1Design now does what the name says (https://github.com/nipy/nipype/pull/1500)
24+
* ENH: Added grad_dev input to fsl.dti.bedpostx5 interface(https://github.com/nipy/nipype/pull/1493)
525
* ENH: ResourceMultiProc plugin to support resource allocation (https://github.com/nipy/nipype/pull/1372)
626
* ENH: Added dcm2niix interface (https://github.com/nipy/nipype/pull/1435)
727
* ENH: Add nipype_crash_search command (https://github.com/nipy/nipype/pull/1422)
@@ -33,9 +53,11 @@ Release 0.12.0-rc1 (April 20, 2016)
3353
* ENH: Nipype workflow and interfaces for FreeSurfer's recon-all (https://github.com/nipy/nipype/pull/1326)
3454
* FIX: Permit relative path for concatenated_file input to Concatenate() (https://github.com/nipy/nipype/pull/1411)
3555
* ENH: Makes ReconAll workflow backwards compatible with FreeSurfer 5.3.0 (https://github.com/nipy/nipype/pull/1434)
56+
* ENH: Added interfaces for AFNI 3dDegreeCentrality, 3dECM, 3dLFCD, 3dClipLevel, 3dmask_tool, and 3dSeg
57+
(https://github.com/nipy/nipype/pull/1460)
3658

3759
Release 0.11.0 (September 15, 2015)
38-
============
60+
===================================
3961

4062
* API: Change how hash values are computed (https://github.com/nipy/nipype/pull/1174)
4163
* ENH: New algorithm: mesh.WarpPoints applies displacements fields to point sets
@@ -121,7 +143,7 @@ Release 0.11.0 (September 15, 2015)
121143
(https://github.com/nipy/nipype/pull/1142)
122144

123145
Release 0.10.0 (October 10, 2014)
124-
============
146+
=================================
125147

126148
* ENH: New miscelaneous interfaces: SplitROIs (mapper), MergeROIs (reducer)
127149
to enable parallel processing of very large images.
@@ -165,19 +187,19 @@ Release 0.10.0 (October 10, 2014)
165187
* FIX: Update for FSL 5.0.7 which deprecated Contrast Manager
166188

167189
Release 0.9.2 (January 31, 2014)
168-
============
190+
================================
169191

170192
* FIX: DataFinder was broken due to a typo
171193
* FIX: Order of DataFinder outputs was not guaranteed, it's human sorted now
172194
* ENH: New interfaces: Vnifti2Image, VtoMat
173195

174196
Release 0.9.1 (December 25, 2013)
175-
============
197+
=================================
176198

177199
* FIX: installation issues
178200

179201
Release 0.9.0 (December 20, 2013)
180-
============
202+
=================================
181203

182204
* ENH: SelectFiles: a streamlined version of DataGrabber
183205
* ENH: new tools for defining workflows: JoinNode, synchronize and itersource

CONTRIBUTING.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,16 @@
1010
* Pull Requests should be tested, if feasible:
1111
- bugfixes should include regression tests
1212
- new behavior should at least get minimal exercise
13-
* Use a descriptive prefix for your PR: ENH, FIX, TST, DOC, STY, REF (refactor), WIP (Work in progress)
14-
* After submiting the PR, include an update to the CHANGES file: prefix: description (URL of pull request)
15-
* `make specs`
16-
* do: `make check-before-commit` before submitting the PR. This will require you to either install or be in developer mode with: `python setup.py install/develop`.
13+
* Use a descriptive prefix for your PR: ENH (enhancement), FIX, TST, DOC, STY, REF (refactor), WIP (Work in progress)
14+
* The person who accepts/merges your PR will include an update to the CHANGES file: prefix: description (URL of pull request)
15+
* Run `make check-before-commit` before submitting the PR.
16+
This will require you to either install or be in developer mode with: `python setup.py install/develop`.
17+
* In general, do not catch exceptions without good reason.
18+
* catching non-fatal exceptions.
19+
Log the exception as a warning.
20+
* adding more information about what may have caused the error.
21+
Raise a new exception using ``raise_from(NewException("message"), oldException)`` from ``future``.
22+
Do not log this, as it creates redundant/confusing logs.
1723

1824
## Contributing issues
1925

Dockerfile

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Copyright (c) 2016, The developers of the Stanford CRN
2+
# All rights reserved.
3+
#
4+
# Redistribution and use in source and binary forms, with or without
5+
# modification, are permitted provided that the following conditions are met:
6+
#
7+
# * Redistributions of source code must retain the above copyright notice, this
8+
# list of conditions and the following disclaimer.
9+
#
10+
# * Redistributions in binary form must reproduce the above copyright notice,
11+
# this list of conditions and the following disclaimer in the documentation
12+
# and/or other materials provided with the distribution.
13+
#
14+
# * Neither the name of crn_base nor the names of its
15+
# contributors may be used to endorse or promote products derived from
16+
# this software without specific prior written permission.
17+
#
18+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
29+
FROM nipype/testnipypedata:latest
30+
MAINTAINER Stanford Center for Reproducible Neuroscience <[email protected]>
31+
32+
# Preparations
33+
RUN ln -snf /bin/bash /bin/sh
34+
35+
# Install this branch's code
36+
WORKDIR /root/src
37+
38+
# Install matplotlib, sphinx and coverage to build documentation
39+
# and run tests with coverage
40+
RUN source activate nipypetests-2.7 && \
41+
pip install matplotlib sphinx coverage && \
42+
source activate nipypetests-3.4 && \
43+
pip install matplotlib sphinx coverage && \
44+
source activate nipypetests-3.5 && \
45+
pip install matplotlib sphinx coverage
46+
47+
ADD . nipype/
48+
49+
# Install the checked out version of nipype, check that requirements are
50+
# installed and install it for each of the three environments.
51+
RUN cd nipype/ && \
52+
source activate nipypetests-2.7 && \
53+
pip install -r requirements.txt && \
54+
pip install -e .
55+
56+
RUN cd nipype/ && \
57+
source activate nipypetests-3.4 && \
58+
pip install -r requirements.txt && \
59+
pip install -e .
60+
61+
RUN cd nipype/ && \
62+
source activate nipypetests-3.5 && \
63+
pip install -r requirements.txt && \
64+
pip install -e .
65+
66+
WORKDIR /scratch
67+
68+
# Install entrypoints
69+
ADD docker/circleci/run_* /usr/bin/
70+
RUN chmod +x /usr/bin/run_*
71+
72+
# RUN echo 'source /etc/profile.d/nipype_tests.sh' >> /etc/bash.bashrc
73+
ENTRYPOINT ["/usr/bin/run_examples.sh"]
74+

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ sdist: zipdoc
1515
python setup.py sdist
1616
@echo "Done building source distribution."
1717
# XXX copy documentation.zip to dist directory.
18-
# XXX Somewhere the doc/_build directory is removed and causes
19-
# this script to fail.
2018

2119
egg: zipdoc
2220
@echo "Building egg..."
@@ -45,7 +43,10 @@ clean-build:
4543
clean-ctags:
4644
rm -f tags
4745

48-
clean: clean-build clean-pyc clean-so clean-ctags
46+
clean-doc:
47+
rm -rf doc/_build
48+
49+
clean: clean-build clean-pyc clean-so clean-ctags clean-doc
4950

5051
in: inplace # just a shortcut
5152
inplace:

README.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ NIPYPE: Neuroimaging in Python: Pipelines and Interfaces
1818
:target: https://pypi.python.org/pypi/nipype/
1919
:alt: Latest Version
2020

21-
.. image:: https://img.shields.io/pypi/dm/nipype.svg
22-
:target: https://pypi.python.org/pypi/nipype/
23-
:alt: Downloads
24-
2521
.. image:: https://img.shields.io/pypi/pyversions/nipype.svg
2622
:target: https://pypi.python.org/pypi/nipype/
2723
:alt: Supported Python versions

circle.yml

Lines changed: 40 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,54 @@
1+
machine:
2+
services:
3+
- docker
4+
15
dependencies:
26
cache_directories:
7+
- "~/docker"
8+
- "~/examples"
39
- "~/.apt-cache"
4-
- "~/examples/data"
5-
- "~/examples/fsdata"
6-
- "~/mcr"
7-
- "~/spm12"
8-
- "~/examples/fsl_course_data"
10+
911
pre:
12+
- mkdir -p "~/scratch/nose"
13+
- mkdir -p "~/examples"
1014
# Let CircleCI cache the apt archive
1115
- sudo rm -rf /var/cache/apt/archives && sudo ln -s ~/.apt-cache /var/cache/apt/archives && mkdir -p ~/.apt-cache/partial
12-
- bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh)
16+
- sudo apt-get -y update && sudo apt-get install -y wget bzip2
17+
1318
override:
14-
# Install apt packages
15-
- sudo apt-get install -y fsl-core fsl-atlases fsl-mni152-templates fsl-feeds afni swig python-vtk xvfb fusefat
16-
- echo 'source /etc/fsl/fsl.sh' >> $HOME/.profile
17-
- echo 'source /etc/afni/afni.sh' >> $HOME/.profile
18-
- mkdir -p ~/examples/ && ln -sf /usr/share/fsl-feeds/ ~/examples/feeds
19-
# Enable system-wide vtk
20-
- ln -sf /usr/lib/pymodules/python2.7/vtk ~/virtualenvs/venv-system/lib/python2.7/site-packages/
21-
# Set up python environment
22-
- pip install --upgrade pip
23-
- pip install -e .
24-
- pip install matplotlib sphinx ipython boto coverage dipy
25-
# Add tvtk
26-
- pip install http://effbot.org/downloads/Imaging-1.1.7.tar.gz
27-
- pip install -e git+https://github.com/enthought/etsdevtools.git#egg=etsdevtools
28-
- pip install -e git+https://github.com/enthought/blockcanvas.git#egg=blockcanvas
29-
- pip install -e git+https://github.com/enthought/etsproxy.git#egg=etsproxy
30-
- pip install -e git+https://github.com/enthought/ets.git#egg=ets
31-
- pip install https://github.com/rtfd/readthedocs-sphinx-ext/archive/master.zip
32-
- gem install fakes3
33-
- if [[ ! -d ~/examples/data ]]; then wget "https://dl.dropbox.com/s/jzgq2nupxyz36bp/nipype-tutorial.tar.bz2" && tar jxvf nipype-tutorial.tar.bz2 && mv nipype-tutorial/* ~/examples/; fi
34-
- if [[ ! -d ~/examples/fsl_course_data ]]; then wget -c "http://fsl.fmrib.ox.ac.uk/fslcourse/fdt1.tar.gz" && wget -c "http://fsl.fmrib.ox.ac.uk/fslcourse/fdt2.tar.gz" && wget -c "http://fsl.fmrib.ox.ac.uk/fslcourse/tbss.tar.gz" && mkdir ~/examples/fsl_course_data && tar zxvf fdt1.tar.gz -C ~/examples/fsl_course_data && tar zxvf fdt2.tar.gz -C ~/examples/fsl_course_data && tar zxvf tbss.tar.gz -C ~/examples/fsl_course_data; fi
35-
- bash ~/nipype/tools/install_spm_mcr.sh
36-
- mkdir -p ~/.nipype && echo '[logging]' > ~/.nipype/nipype.cfg && echo 'workflow_level = DEBUG' >> ~/.nipype/nipype.cfg && echo 'interface_level = DEBUG' >> ~/.nipype/nipype.cfg && echo 'filemanip_level = DEBUG' >> ~/.nipype/nipype.cfg
37-
machine:
38-
environment:
39-
FSLOUTPUTTYPE: NIFTI_GZ
19+
- 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 . :
21+
timeout: 1600
22+
- mkdir -p ~/docker; docker save nipype/nipype_test:py27 > ~/docker/image.tar :
23+
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
26+
4027
test:
4128
override:
42-
- mkdir -p ${CIRCLE_TEST_REPORTS}/nose
43-
- source $HOME/.profile; nosetests --with-doctest --xunit-file="${CIRCLE_TEST_REPORTS}/nose/${CIRCLE_PROJECT_REPONAME}.xml" -c ./.noserc --logging-level=DEBUG --verbosity=3:
44-
environment:
45-
SPMMCRCMD: "$HOME/spm12/run_spm12.sh $HOME/mcr/v85/ script"
46-
FORCE_SPMMCR: 1
47-
FSL_COURSE_DATA: "$HOME/examples/fsl_course_data"
48-
timeout: 2600
49-
- set -o pipefail && cd doc && make html 2>&1 | tee ~/log.txt
50-
- cat ~/log.txt && if grep -q "ERROR" ~/log.txt; then false; else true; fi
51-
- source $HOME/.profile; python ~/nipype/tools/run_examples.py test_spm Linear workflow3d workflow4d:
52-
pwd: ../examples
53-
environment:
54-
SPMMCRCMD: "$HOME/spm12/run_spm12.sh $HOME/mcr/v85/ script"
55-
FORCE_SPMMCR: 1
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 :
5631
timeout: 1600
57-
- source $HOME/.profile; python ~/nipype/tools/run_examples.py fmri_fsl_feeds Linear l1pipeline:
58-
pwd: ../examples
59-
- source $HOME/.profile; python ~/nipype/tools/run_examples.py fmri_spm_dartel Linear level1 l2pipeline:
60-
pwd: ../examples
61-
environment:
62-
SPMMCRCMD: "$HOME/spm12/run_spm12.sh $HOME/mcr/v85/ script"
63-
FORCE_SPMMCR: 1
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 :
6433
timeout: 1600
65-
- source $HOME/.profile; python ~/nipype/tools/run_examples.py fmri_fsl_reuse Linear level1_workflow:
66-
pwd: ../examples
67-
- source $HOME/.profile; python ~/nipype/tools/run_examples.py fmri_spm_nested Linear level1 l2pipeline:
68-
pwd: ../examples
69-
environment:
70-
SPMMCRCMD: "$HOME/spm12/run_spm12.sh $HOME/mcr/v85/ script"
71-
FORCE_SPMMCR: 1
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+
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 :
38+
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
44+
post:
45+
- bash docker/circleci/teardown.sh
7246

7347
general:
7448
artifacts:
75-
- "doc/_build/html"
76-
- "~/log.txt"
77-
- "nosetests.xml"
78-
- "coverage.xml"
49+
- "~/docs"
50+
- "~/logs"
51+
- "~/coverage.xml"
52+
- "~/nosetests.xml"
53+
- "~/builddocs.log"
54+
- "~/scratch"

doc/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ htmlonly:
3535

3636
api:
3737
rm -rf api/generated
38-
python ../tools/build_modref_templates.py
38+
python -u ../tools/build_modref_templates.py
3939
rm -rf interfaces/generated
40-
python ../tools/build_interface_docs.py
40+
python -u ../tools/build_interface_docs.py
4141
@echo "Build API docs finished."
4242

4343
html: clean examples2rst api htmlonly
@@ -76,7 +76,7 @@ doctest:
7676
"results in _build/doctest/output.txt."
7777

7878
gitwash-update:
79-
python ../tools/gitwash_dumper.py devel nipype \
79+
python -u ../tools/gitwash_dumper.py devel nipype \
8080
--repo-name=nipype \
8181
--github-user=nipy \
8282
--project-url=http://nipy.org/nipype \

0 commit comments

Comments
 (0)