Skip to content

Commit 9733d3f

Browse files
committed
Merge branch 'master' into doc/Install4Developers
2 parents b4db09c + 6d8efd7 commit 9733d3f

Some content is hidden

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

58 files changed

+713
-172
lines changed

.travis.yml

+2-3
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

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
Release 0.12.0-rc1 (April 20, 2016)
2-
============
3-
1+
Release 0.12.0 (July 12, 2016)
2+
==============================
3+
4+
* ENH: New interface for Bruker to Nifti converter (https://github.com/nipy/nipype/pull/1523)
5+
* FIX: output file naming for FIRST outputs (https://github.com/nipy/nipype/pull/1524)
6+
* ENH: Adds `fslmaths -Tstd` to maths interfaces (https://github.com/nipy/nipype/pull/1518)
7+
* FIX: Selecting "gamma" in FSL Level1Design now does what the name says (https://github.com/nipy/nipype/pull/1500)
8+
* ENH: Added grad_dev input to fsl.dti.bedpostx5 interface(https://github.com/nipy/nipype/pull/1493)
49
* ENH: ResourceMultiProc plugin to support resource allocation (https://github.com/nipy/nipype/pull/1372)
510
* ENH: Added dcm2niix interface (https://github.com/nipy/nipype/pull/1435)
611
* ENH: Add nipype_crash_search command (https://github.com/nipy/nipype/pull/1422)
@@ -36,7 +41,7 @@ Release 0.12.0-rc1 (April 20, 2016)
3641
(https://github.com/nipy/nipype/pull/1460)
3742

3843
Release 0.11.0 (September 15, 2015)
39-
============
44+
===================================
4045

4146
* API: Change how hash values are computed (https://github.com/nipy/nipype/pull/1174)
4247
* ENH: New algorithm: mesh.WarpPoints applies displacements fields to point sets
@@ -122,7 +127,7 @@ Release 0.11.0 (September 15, 2015)
122127
(https://github.com/nipy/nipype/pull/1142)
123128

124129
Release 0.10.0 (October 10, 2014)
125-
============
130+
=================================
126131

127132
* ENH: New miscelaneous interfaces: SplitROIs (mapper), MergeROIs (reducer)
128133
to enable parallel processing of very large images.
@@ -166,19 +171,19 @@ Release 0.10.0 (October 10, 2014)
166171
* FIX: Update for FSL 5.0.7 which deprecated Contrast Manager
167172

168173
Release 0.9.2 (January 31, 2014)
169-
============
174+
================================
170175

171176
* FIX: DataFinder was broken due to a typo
172177
* FIX: Order of DataFinder outputs was not guaranteed, it's human sorted now
173178
* ENH: New interfaces: Vnifti2Image, VtoMat
174179

175180
Release 0.9.1 (December 25, 2013)
176-
============
181+
=================================
177182

178183
* FIX: installation issues
179184

180185
Release 0.9.0 (December 20, 2013)
181-
============
186+
=================================
182187

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

CONTRIBUTING.md

+10-4
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

doc/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
# The short X.Y version.
8383
version = nipype.__version__
8484
# The full version, including alpha/beta/rc tags.
85-
release = "0.11.0"
85+
release = "0.12.0"
8686

8787
# The language for content autogenerated by Sphinx. Refer to documentation
8888
# for a list of supported languages.

doc/links_names.txt

+2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@
9595
.. _Camino: http://web4.cs.ucl.ac.uk/research/medic/camino/pmwiki/pmwiki.php
9696
.. _Camino2Trackvis: http://camino-trackvis.sourceforge.net/
9797
.. _MRtrix: http://www.brain.org.au/software/mrtrix/index.html
98+
.. _MRtrix3: http://www.mrtrix.org/
9899
.. _MNE: https://martinos.org/mne/index.html
100+
.. _ANTS: http://stnava.github.io/ANTs/
99101

100102
.. General software
101103
.. _gcc: http://gcc.gnu.org

doc/users/grabbing_and_sinking.rst

+5
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ DataGrabber stores its outputs in a field called outfiles.
5858
datasource1 = nio.DataGrabber()
5959
datasource1.inputs.base_directory = os.getcwd()
6060
datasource1.inputs.template = 'data/s1/f3.nii'
61+
datasource1.inputs.sort_filelist = True
6162
results = datasource1.run()
6263

6364
Or you can get at all uncompressed NIfTI files starting with the letter 'f' in
@@ -67,6 +68,7 @@ all directories starting with the letter 's'.
6768

6869
datasource2.inputs.base_directory = '/mass'
6970
datasource2.inputs.template = 'data/s*/f*.nii'
71+
datasource1.inputs.sort_filelist = True
7072

7173
Two special inputs were used in these previous cases. The input `base_directory`
7274
indicates in which directory to search, while the input `template` indicates the
@@ -89,6 +91,7 @@ then used to set the template (see %d in the template).
8991
datasource3 = nio.DataGrabber(infields=['run'])
9092
datasource3.inputs.base_directory = os.getcwd()
9193
datasource3.inputs.template = 'data/s1/f%d.nii'
94+
datasource1.inputs.sort_filelist = True
9295
datasource3.inputs.run = [3, 7]
9396

9497
This will return files `basedir/data/s1/f3.nii` and `basedir/data/s1/f7.nii`. We
@@ -98,6 +101,7 @@ can take this a step further and pair subjects with runs.
98101

99102
datasource4 = nio.DataGrabber(infields=['subject_id', 'run'])
100103
datasource4.inputs.template = 'data/%s/f%d.nii'
104+
datasource1.inputs.sort_filelist = True
101105
datasource4.inputs.run = [3, 7]
102106
datasource4.inputs.subject_id = ['s1', 's3']
103107

@@ -115,6 +119,7 @@ wish to retrieve all the functional runs and the structural image for the subjec
115119
datasource = nio.DataGrabber(infields=['subject_id'], outfields=['func', 'struct'])
116120
datasource.inputs.base_directory = 'data'
117121
datasource.inputs.template = '*'
122+
datasource1.inputs.sort_filelist = True
118123
datasource.inputs.field_template = dict(func='%s/f%d.nii',
119124
struct='%s/struct.nii')
120125
datasource.inputs.template_args = dict(func=[['subject_id', [3,5,7,10]]],

doc/users/install.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,14 @@ Nipy_
176176
Nitime_
177177
(optional)
178178

179+
ANTS_
180+
181+
MRtrix_ and MRtrix3_
182+
179183
Camino_
180184

181185
Camino2Trackvis_
182186

183187
ConnectomeViewer_
184188

185-
.. include:: ../links_names.txt
189+
.. include:: ../links_names.txt

doc/users/resource_sched_profiler.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,17 @@ The pandas_ Python package is required to use this feature.
144144
from nipype.pipeline.plugins.callback_log import log_nodes_cb
145145
args_dict = {'n_procs' : 8, 'memory_gb' : 10, 'status_callback' : log_nodes_cb}
146146
workflow.run(plugin='MultiProc', plugin_args=args_dict)
147-
147+
148148
# ...workflow finishes and writes callback log to '/home/user/run_stats.log'
149-
149+
150150
from nipype.utils.draw_gantt_chart import generate_gantt_chart
151151
generate_gantt_chart('/home/user/run_stats.log', cores=8)
152152
# ...creates gantt chart in '/home/user/run_stats.log.html'
153153

154154
The ``generate_gantt_chart`` function will create an html file that can be viewed
155155
in a browser. Below is an example of the gantt chart displayed in a web browser.
156156
Note that when the cursor is hovered over any particular node bubble or resource
157-
bubble, some additional information is shown in a pop-up.
157+
bubble, some additional information is shown in a pop-up.
158158

159159
* - .. image:: images/gantt_chart.png
160160
:width: 100 %

nipype/__init__.py

-16
Original file line numberDiff line numberDiff line change
@@ -55,26 +55,10 @@ def test(self, label='fast', verbose=1, extra_argv=['--exe'],
5555
test = _NoseTester().test
5656
del nosetester
5757

58-
59-
def _test_local_install():
60-
""" Warn the user that running with nipy being
61-
imported locally is a bad idea.
62-
"""
63-
if os.getcwd() == os.sep.join(
64-
os.path.abspath(__file__).split(os.sep)[:-2]):
65-
import warnings
66-
warnings.warn('Running the tests from the install directory may '
67-
'trigger some failures')
68-
69-
_test_local_install()
70-
7158
# Set up package information function
7259
from .pkg_info import get_pkg_info as _get_pkg_info
7360
get_info = lambda: _get_pkg_info(os.path.dirname(__file__))
7461

75-
# Cleanup namespace
76-
del _test_local_install
77-
7862
# If this file is exec after being imported, the following lines will
7963
# fail
8064
try:

nipype/algorithms/misc.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from __future__ import division
1616
from builtins import zip
1717
from builtins import range
18+
from future.utils import raise_from
1819

1920
import os
2021
import os.path as op
@@ -857,9 +858,9 @@ def __init__(self, infields=None, force_run=True, **kwargs):
857858
def _run_interface(self, runtime):
858859
try:
859860
import pandas as pd
860-
except ImportError:
861-
raise ImportError(('This interface requires pandas '
862-
'(http://pandas.pydata.org/) to run.'))
861+
except ImportError as e:
862+
raise_from(ImportError('This interface requires pandas '
863+
'(http://pandas.pydata.org/) to run.'), e)
863864

864865
try:
865866
import lockfile as pl

0 commit comments

Comments
 (0)