Skip to content

Commit 262f71d

Browse files
committed
Merge branch 'master' into fix/TVTKPolyDataWriter
Conflicts: CHANGES nipype/algorithms/mesh.py nipype/interfaces/fsl/utils.py
2 parents 2d963db + 175a6de commit 262f71d

File tree

971 files changed

+17182
-14227
lines changed

Some content is hidden

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

971 files changed

+17182
-14227
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/nipype/build
66
/nipype/nipype.egg-info
77
/doc/_build
8+
/doc/preproc
89
/doc/users/examples
910
/doc/api/generated
1011
*.pyc
@@ -17,3 +18,6 @@
1718
.DS_Store
1819
nipype/testing/data/von-ray_errmap.nii.gz
1920
nipype/testing/data/von_errmap.nii.gz
21+
crash*.pklz
22+
.coverage
23+
htmlcov/

.travis.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ cache:
33
language: python
44
python:
55
- 2.7
6+
- 3.4
67
env:
78
- INSTALL_DEB_DEPENDECIES=true
89
- INSTALL_DEB_DEPENDECIES=false
910
before_install:
10-
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
11-
-O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-3.6.0-Linux-x86_64.sh
11+
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
12+
-O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
1213
-O miniconda.sh; fi
1314
- chmod +x miniconda.sh
1415
- "./miniconda.sh -b"
15-
- export PATH=/home/travis/miniconda/bin:$PATH
16+
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then export PATH=/home/travis/miniconda2/bin:$PATH; else export PATH=/home/travis/miniconda3/bin:$PATH; fi
1617
- if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; fi
1718
- if $INSTALL_DEB_DEPENDECIES; then sudo ln -s /run/shm /dev/shm; fi
1819
- if $INSTALL_DEB_DEPENDECIES; then bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh);
@@ -27,15 +28,16 @@ install:
2728
- conda create -n testenv --yes pip python=$TRAVIS_PYTHON_VERSION
2829
- source activate testenv
2930
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then pip install ordereddict; fi
30-
- conda install --yes numpy scipy nose traits networkx dateutil
31-
- pip install nibabel
31+
- conda install --yes numpy scipy nose networkx dateutil
32+
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then conda install --yes traits; else pip install traits; fi
3233
- pip install python-coveralls
3334
- pip install nose-cov
35+
- pip install -r requirements.txt # finish remaining requirements
3436
- pip install https://github.com/RDFLib/rdflib/archive/master.zip
3537
- pip install https://github.com/trungdong/prov/archive/rdf.zip
3638
- python setup.py install
3739
script:
38-
- nosetests --with-doctest --with-cov --cov nipype --cov-config .coveragerc --logging-level=INFO
40+
- python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest --with-cov --cover-package nipype --cov-config .coveragerc --logging-level=INFO
3941
after_success:
4042
- coveralls --config_file .coveragerc
4143
deploy:

CHANGES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ Next release
22
============
33

44
* FIX: VTK version check missing when using tvtk (https://github.com/nipy/nipype/pull/1219)
5+
* ENH: Added an OAR scheduler plugin (https://github.com/nipy/nipype/pull/1259)
6+
* ENH: New ANTs interface: antsBrainExtraction (https://github.com/nipy/nipype/pull/1231)
7+
* API: Default model level for the bedpostx workflow has been set to "2" following FSL 5.0.9 lead
8+
* ENH: New interfaces for interacting with AWS S3: S3DataSink and S3DataGrabber (https://github.com/nipy/nipype/pull/1201)
59

610

711
Release 0.11.0 (September 15, 2015)

THANKS.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ Contributors to Nipype include but are not limited to:
1010
* Aimi Watanabe
1111
* Alexander Schaefer
1212
* Alexandre Gramfort
13+
* Alexandre Savio
1314
* Anisha Keshavan
1415
* Ariel Rokem
1516
* Ben Acland
17+
* Ben Cipollini
1618
* Basile Pinsard
1719
* Brendan Moloney
1820
* Brian Cheung

build_docs.py

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
python setup.py build_sphinx
99
"""
1010

11+
from __future__ import print_function
12+
1113
# Standard library imports
1214
import sys
1315
import os
@@ -27,23 +29,25 @@
2729

2830
################################################################################
2931
# Distutils Command class for installing nipype to a temporary location.
32+
33+
3034
class TempInstall(Command):
3135
temp_install_dir = os.path.join('build', 'install')
3236

3337
def run(self):
3438
""" build and install nipype in a temporary location. """
3539
install = self.distribution.get_command_obj('install')
3640
install.install_scripts = self.temp_install_dir
37-
install.install_base = self.temp_install_dir
41+
install.install_base = self.temp_install_dir
3842
install.install_platlib = self.temp_install_dir
3943
install.install_purelib = self.temp_install_dir
40-
install.install_data = self.temp_install_dir
41-
install.install_lib = self.temp_install_dir
44+
install.install_data = self.temp_install_dir
45+
install.install_lib = self.temp_install_dir
4246
install.install_headers = self.temp_install_dir
4347
install.run()
4448

4549
# Horrible trick to reload nipype with our temporary instal
46-
for key in sys.modules.keys():
50+
for key in list(sys.modules.keys()):
4751
if key.startswith('nipype'):
4852
sys.modules.pop(key, None)
4953
sys.path.append(os.path.abspath(self.temp_install_dir))
@@ -62,12 +66,11 @@ def finalize_options(self):
6266
# Distutils Command class for API generation
6367
class APIDocs(TempInstall):
6468
description = \
65-
"""generate API docs """
69+
"""generate API docs """
6670

6771
user_options = [
6872
('None', None, 'this command has no options'),
69-
]
70-
73+
]
7174

7275
def run(self):
7376
# First build the project and install it to a temporary location.
@@ -131,30 +134,29 @@ def run(self):
131134

132135
def zip_docs(self):
133136
if not os.path.exists(DOC_BUILD_DIR):
134-
raise OSError, 'Doc directory does not exist.'
137+
raise OSError('Doc directory does not exist.')
135138
target_file = os.path.join('doc', 'documentation.zip')
136139
# ZIP_DEFLATED actually compresses the archive. However, there
137140
# will be a RuntimeError if zlib is not installed, so we check
138141
# for it. ZIP_STORED produces an uncompressed zip, but does not
139142
# require zlib.
140143
try:
141144
zf = zipfile.ZipFile(target_file, 'w',
142-
compression=zipfile.ZIP_DEFLATED)
145+
compression=zipfile.ZIP_DEFLATED)
143146
except RuntimeError:
144147
warnings.warn('zlib not installed, storing the docs '
145-
'without compression')
148+
'without compression')
146149
zf = zipfile.ZipFile(target_file, 'w',
147-
compression=zipfile.ZIP_STORED)
150+
compression=zipfile.ZIP_STORED)
148151

149152
for root, dirs, files in os.walk(DOC_BUILD_DIR):
150153
relative = relative_path(root)
151154
if not relative.startswith('.doctrees'):
152155
for f in files:
153156
zf.write(os.path.join(root, f),
154-
os.path.join(relative, 'html_docs', f))
157+
os.path.join(relative, 'html_docs', f))
155158
zf.close()
156159

157-
158160
def finalize_options(self):
159161
""" Override the default for the documentation build
160162
directory.
@@ -164,23 +166,25 @@ def finalize_options(self):
164166

165167
################################################################################
166168
# Distutils Command class to clean
169+
170+
167171
class Clean(clean):
168172

169173
def run(self):
170174
clean.run(self)
171175
api_path = os.path.join('doc', 'api', 'generated')
172176
if os.path.exists(api_path):
173-
print "Removing %s" % api_path
177+
print("Removing %s" % api_path)
174178
shutil.rmtree(api_path)
175179
interface_path = os.path.join('doc', 'interfaces', 'generated')
176180
if os.path.exists(interface_path):
177-
print "Removing %s" % interface_path
181+
print("Removing %s" % interface_path)
178182
shutil.rmtree(interface_path)
179183
if os.path.exists(DOC_BUILD_DIR):
180-
print "Removing %s" % DOC_BUILD_DIR
184+
print("Removing %s" % DOC_BUILD_DIR)
181185
shutil.rmtree(DOC_BUILD_DIR)
182186
if os.path.exists(DOC_DOCTREES_DIR):
183-
print "Removing %s" % DOC_DOCTREES_DIR
187+
print("Removing %s" % DOC_DOCTREES_DIR)
184188
shutil.rmtree(DOC_DOCTREES_DIR)
185189

186190

@@ -189,5 +193,3 @@ def run(self):
189193
'api_docs': APIDocs,
190194
'clean': Clean,
191195
}
192-
193-

circle.yml

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,51 +5,77 @@ dependencies:
55
- "~/examples/feeds"
66
- "~/mcr"
77
- "~/spm12"
8+
- "~/fsl"
89
- "~/examples/fsl_course_data"
910
override:
1011
- pip install --upgrade pip
1112
- pip install -e .
12-
- pip install matplotlib sphinx ipython
13+
- pip install matplotlib sphinx ipython boto
14+
- gem install fakes3
15+
- if [[ ! -d ~/fsl ]]; then wget "http://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-5.0.9-centos6_64.tar.gz"; tar zxvf fsl-5.0.9-centos6_64.tar.gz; mv fsl ~/fsl; fi
1316
- if [[ ! -d ~/examples/data ]]; then wget "http://tcpdiag.dl.sourceforge.net/project/nipy/nipype/nipype-0.2/nipype-tutorial.tar.bz2"; tar jxvf nipype-tutorial.tar.bz2; mkdir ~/examples; mv nipype-tutorial/* ~/examples/; fi
1417
# we download this manually because CircleCI does not cache apt
15-
- if [[ ! -d ~/examples/feeds ]]; then wget "http://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-5.0.8-feeds.tar.gz"; tar zxvf fsl-5.0.8-feeds.tar.gz; mv feeds ~/examples/; fi
18+
- if [[ ! -d ~/examples/feeds ]]; then wget "http://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-5.0.9-feeds.tar.gz"; tar zxvf fsl-5.0.8-feeds.tar.gz; mv feeds ~/examples/; fi
1619
- 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
17-
- wget -O- http://neuro.debian.net/lists/trusty.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
18-
- sudo apt-key adv --recv-keys --keyserver hkp://pgp.mit.edu:80 0xA5D32F012649A5A9
19-
- sudo apt-get update -y; sudo apt-get install -y fsl-core fsl-atlases
2020
- bash ~/nipype/tools/install_spm_mcr.sh
2121
- 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
2222
test:
2323
override:
24-
- . /usr/share/fsl/5.0/etc/fslconf/fsl.sh && nosetests --with-doctest --logging-level=DEBUG --verbosity=3:
24+
- nosetests --with-doctest --logging-level=DEBUG --verbosity=3:
2525
environment:
2626
SPMMCRCMD: "$HOME/spm12/run_spm12.sh $HOME/mcr/v85/ script"
2727
FORCE_SPMMCR: 1
2828
FSL_COURSE_DATA: "$HOME/examples/fsl_course_data"
29+
FSLDIR: "$HOME/fsl/"
30+
PATH: "$HOME/fsl/bin:$PATH"
31+
LD_LIBRARY_PATH: "$HOME/fsl/lib"
32+
FSLOUTPUTTYPE: "NIFTI_GZ"
2933
timeout: 2600
3034
- set -o pipefail && cd doc && make html 2>&1 | tee ~/log.txt
3135
- cat ~/log.txt && if grep -q "ERROR" ~/log.txt; then false; else true; fi
32-
- . /usr/share/fsl/5.0/etc/fslconf/fsl.sh && python ~/nipype/tools/run_examples.py test_spm Linear workflow3d workflow4d:
36+
- python ~/nipype/tools/run_examples.py test_spm Linear workflow3d workflow4d:
3337
pwd: ../examples
3438
environment:
3539
SPMMCRCMD: "$HOME/spm12/run_spm12.sh $HOME/mcr/v85/ script"
3640
FORCE_SPMMCR: 1
41+
FSLDIR: "$HOME/fsl/"
42+
PATH: "$HOME/fsl/bin:$PATH"
43+
LD_LIBRARY_PATH: "$HOME/fsl/lib"
44+
FSLOUTPUTTYPE: "NIFTI_GZ"
3745
timeout: 1600
38-
- . /usr/share/fsl/5.0/etc/fslconf/fsl.sh && python ~/nipype/tools/run_examples.py fmri_fsl_feeds Linear l1pipeline:
46+
- python ~/nipype/tools/run_examples.py fmri_fsl_feeds Linear l1pipeline:
3947
pwd: ../examples
40-
- . /usr/share/fsl/5.0/etc/fslconf/fsl.sh && python ~/nipype/tools/run_examples.py fmri_spm_dartel Linear level1 l2pipeline:
48+
environment:
49+
FSLDIR: "$HOME/fsl/"
50+
PATH: "$HOME/fsl/bin:$PATH"
51+
LD_LIBRARY_PATH: "$HOME/fsl/lib"
52+
FSLOUTPUTTYPE: "NIFTI_GZ"
53+
- python ~/nipype/tools/run_examples.py fmri_spm_dartel Linear level1 l2pipeline:
4154
pwd: ../examples
4255
environment:
4356
SPMMCRCMD: "$HOME/spm12/run_spm12.sh $HOME/mcr/v85/ script"
4457
FORCE_SPMMCR: 1
58+
FSLDIR: "$HOME/fsl/"
59+
PATH: "$HOME/fsl/bin:$PATH"
60+
LD_LIBRARY_PATH: "$HOME/fsl/lib"
61+
FSLOUTPUTTYPE: "NIFTI_GZ"
4562
timeout: 1600
46-
- . /usr/share/fsl/5.0/etc/fslconf/fsl.sh && python ~/nipype/tools/run_examples.py fmri_fsl_reuse Linear level1_workflow:
63+
- python ~/nipype/tools/run_examples.py fmri_fsl_reuse Linear level1_workflow:
4764
pwd: ../examples
48-
- . /usr/share/fsl/5.0/etc/fslconf/fsl.sh && python ~/nipype/tools/run_examples.py fmri_spm_nested Linear level1 l2pipeline:
65+
environment:
66+
FSLDIR: "$HOME/fsl/"
67+
PATH: "$HOME/fsl/bin:$PATH"
68+
LD_LIBRARY_PATH: "$HOME/fsl/lib"
69+
FSLOUTPUTTYPE: "NIFTI_GZ"
70+
- python ~/nipype/tools/run_examples.py fmri_spm_nested Linear level1 l2pipeline:
4971
pwd: ../examples
5072
environment:
5173
SPMMCRCMD: "$HOME/spm12/run_spm12.sh $HOME/mcr/v85/ script"
5274
FORCE_SPMMCR: 1
75+
FSLDIR: "$HOME/fsl/"
76+
PATH: "$HOME/fsl/bin:$PATH"
77+
LD_LIBRARY_PATH: "$HOME/fsl/lib"
78+
FSLOUTPUTTYPE: "NIFTI_GZ"
5379

5480
general:
5581
artifacts:

doc/conf.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15-
import sys, os
15+
import sys
16+
import os
1617

1718
nipypepath = os.path.abspath('..')
18-
sys.path.insert(1,nipypepath)
19+
sys.path.insert(1, nipypepath)
1920

2021
import nipype
2122

@@ -168,9 +169,9 @@
168169
#html_use_smartypants = True
169170

170171
# Custom sidebar templates, maps document names to template names.
171-
html_sidebars = {'**': ['gse.html','localtoc.html', 'sidebar_versions.html', 'indexsidebar.html'],
172-
'searchresults' : ['sidebar_versions.html', 'indexsidebar.html'],
173-
'version' : []}
172+
html_sidebars = {'**': ['gse.html', 'localtoc.html', 'sidebar_versions.html', 'indexsidebar.html'],
173+
'searchresults': ['sidebar_versions.html', 'indexsidebar.html'],
174+
'version': []}
174175

175176
# Additional templates that should be rendered to pages, maps page names to
176177
# template names.
@@ -211,8 +212,8 @@
211212
# Grouping the document tree into LaTeX files. List of tuples
212213
# (source start file, target name, title, author, documentclass [howto/manual]).
213214
latex_documents = [
214-
('documentation', 'nipype.tex', u'nipype Documentation',
215-
u'Neuroimaging in Python team', 'manual'),
215+
('documentation', 'nipype.tex', u'nipype Documentation',
216+
u'Neuroimaging in Python team', 'manual'),
216217
]
217218

218219
# The name of an image file (relative to this directory) to place at the top of

doc/devel/matlab_interface_devel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ By subclassing **MatlabCommand** for your main class, and **MatlabInputSpec** fo
9393
>>> hello = HelloWorld()
9494
>>> hello.inputs.name = 'hello_world'
9595
>>> out = hello.run()
96-
>>> print out.outputs.matlab_output
96+
>>> print(out.outputs.matlab_output)
9797
"""
9898
input_spec = HelloWorldInputSpec
9999
output_spec = HelloWorldOutputSpec

doc/devel/python_interface_devel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ do is to define inputs, outputs, _run_interface() (not run()), and _list_outputs
4141
thresholded_map = np.zeros(data.shape)
4242
thresholded_map[active_map] = data[active_map]
4343

44-
new_img = nb.Nifti1Image(thresholded_map, img.get_affine(), img.get_header())
44+
new_img = nb.Nifti1Image(thresholded_map, img.affine, img.header)
4545
_, base, _ = split_filename(fname)
4646
nb.save(new_img, base + '_thresholded.nii')
4747

0 commit comments

Comments
 (0)