Skip to content

Commit 026be4e

Browse files
committed
Merge remote-tracking branch 'nipy/master'
2 parents 0b292a1 + 48c2b6b commit 026be4e

File tree

854 files changed

+11955
-4240
lines changed

Some content is hidden

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

854 files changed

+11955
-4240
lines changed

.circle/tests.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ fi
1717
# They may need to be rebalanced in the future.
1818
case ${CIRCLE_NODE_INDEX} in
1919
0)
20-
docker run --rm=false -it -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_pytests.sh && \
21-
docker run --rm=false -it -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py27 /usr/bin/run_pytests.sh && \
20+
docker run --rm=false -it -e CI_SKIP_TEST=1 -e NIPYPE_RESOURCE_MONITOR=1 -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_pytests.sh && \
21+
docker run --rm=false -it -e CI_SKIP_TEST=1 -e NIPYPE_RESOURCE_MONITOR=1 -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py27 /usr/bin/run_pytests.sh && \
2222
docker run --rm=false -it -v $WORKDIR:/work -w /src/nipype/doc --entrypoint=/usr/bin/run_builddocs.sh nipype/nipype:py36 /usr/bin/run_builddocs.sh && \
2323
docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh test_spm Linear /data/examples/ workflow3d && \
2424
docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh test_spm Linear /data/examples/ workflow4d
@@ -30,8 +30,8 @@ case ${CIRCLE_NODE_INDEX} in
3030
exitcode=$?
3131
;;
3232
2)
33-
docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py27 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ level1 && \
34-
docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ l2pipeline
33+
docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ level1 && \
34+
docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -e NIPYPE_RESOURCE_MONITOR=1 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py27 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ l2pipeline
3535
exitcode=$?
3636
;;
3737
3)

.travis.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ python:
88
- 3.5
99
- 3.6
1010
env:
11-
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler"
12-
- INSTALL_DEB_DEPENDECIES=false NIPYPE_EXTRAS="doc,tests,fmri,profiler"
13-
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,duecredit"
11+
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler" CI_SKIP_TEST=1
12+
- INSTALL_DEB_DEPENDECIES=false NIPYPE_EXTRAS="doc,tests,fmri,profiler" CI_SKIP_TEST=1
13+
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,duecredit" CI_SKIP_TEST=1
14+
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler" PIP_FLAGS="--pre" CI_SKIP_TEST=1
1415
before_install:
1516
- function apt_inst {
1617
if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; fi &&
@@ -33,15 +34,20 @@ before_install:
3334
hash -r &&
3435
conda config --set always_yes yes --set changeps1 no &&
3536
conda update -q conda &&
36-
conda install python=${TRAVIS_PYTHON_VERSION} &&
3737
conda config --add channels conda-forge &&
38-
conda install -y nipype icu &&
39-
rm -r ${CONDA_HOME}/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype*; }
38+
conda install python=${TRAVIS_PYTHON_VERSION} &&
39+
conda install -y icu &&
40+
pip install -r requirements.txt &&
41+
pushd $HOME;
42+
git clone https://github.com/INCF/pybids.git;
43+
cd pybids;
44+
pip install -e .;
45+
popd; }
4046
# Add install of vtk and mayavi to test mesh (disabled): conda install -y vtk mayavi
4147
- travis_retry apt_inst
4248
- travis_retry conda_inst
4349
install:
44-
- travis_retry pip install -e .[$NIPYPE_EXTRAS]
50+
- travis_retry pip install $PIP_FLAGS -e .[$NIPYPE_EXTRAS]
4551
script:
4652
- py.test -v --doctest-modules nipype
4753
deploy:

.zenodo.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,21 @@
518518
"affiliation": "MIT, HMS",
519519
"name": "Ghosh, Satrajit",
520520
"orcid": "0000-0002-5312-6729"
521+
},
522+
{
523+
"affiliation": "University of Amsterdam",
524+
"name": "Lukas Snoek",
525+
"orcid": "0000-0001-8972-204X"
526+
},
527+
{
528+
"affiliation": "Vrije Universiteit, Amsterdam",
529+
"name": "Gilles de Hollander",
530+
"orcid": "0000-0003-1988-5091"
531+
},
532+
{
533+
"affiliation": "University of Texas at Austin",
534+
"name": "De La Vega, Alejandro",
535+
"orcid": "0000-0001-9062-3778"
521536
}
522537
],
523538
"keywords": [

CHANGES

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,47 @@
1-
Upcoming release
1+
Upcoming release (0.14.0)
22
================
33

4+
* FIX: Testing maintainance and improvements (https://github.com/nipy/nipype/pull/2252)
5+
* ENH: Add elapsed_time and final metric_value to ants.Registration (https://github.com/nipy/nipype/pull/1985)
6+
* ENH: Improve terminal_output feature (https://github.com/nipy/nipype/pull/2209)
7+
* ENH: Simple interface to FSL std2imgcoords (https://github.com/nipy/nipype/pull/2209, prev #1398)
8+
* ENH: Centralize virtual/physical $DISPLAYs (https://github.com/nipy/nipype/pull/2203, https://github.com/nipy/nipype/pull/2211)
9+
* ENH: New ResourceMonitor - replaces resource profiler (https://github.com/nipy/nipype/pull/2200)
10+
* ENH: Quickshear interface (https://github.com/nipy/nipype/pull/2047)
11+
* MAINT: updated deprecated HasTraits method (https://github.com/nipy/nipype/pull/2048)
12+
* ENH: CLI versioning (https://github.com/nipy/nipype/pull/2054)
13+
* ENH: Dual Regression interface (https://github.com/nipy/nipype/pull/2057)
14+
* ENH: Additional args to ANTs registration (https://github.com/nipy/nipype/pull/2062, https://github.com/nipy/nipype/pull/2078)
15+
* FIX: Mp2rage interfaces updated for new parameter names in cbstools 3 (https://github.com/nipy/nipype/pull/2065)
16+
* MAINT: Removed automatic nipype folder creation in HOME (https://github.com/nipy/nipype/pull/2076)
17+
* MAINT: Additional Windows support (https://github.com/nipy/nipype/pull/2085)
18+
* ENH: Output realignment matrices from TOPUP (https://github.com/nipy/nipype/pull/2084)
19+
* ENH: Additional AFNI interfaces: 3dZcat, 3dZeropad, 3dedge3, 3dDeconvolve, 3dQwarp, 1dCat, 3dNwarpApply, 3daxialize,
20+
3dREMLfit, 3dUndump, 3dCM, 3dSynthesize + more (https://github.com/nipy/nipype/pull/2087, https://github.com/nipy/nipype/pull/2090,
21+
https://github.com/nipy/nipype/pull/2095, https://github.com/nipy/nipype/pull/2099, https://github.com/nipy/nipype/pull/2103,
22+
https://github.com/nipy/nipype/pull/2114, https://github.com/nipy/nipype/pull/2135, https://github.com/nipy/nipype/pull/2186,
23+
https://github.com/nipy/nipype/pull/2201, https://github.com/nipy/nipype/pull/2210)
24+
* MAINT: cleanup and update AFNI's Allineate (https://github.com/nipy/nipype/pull/2098)
25+
* ENH: Add cosine-basis high-pass-filter to CompCor, allow skip of initial volumes (https://github.com/nipy/nipype/pull/2107, https://github.com/nipy/nipype/pull/#2122)
26+
* FIX: Catch more dcm2niix DTI conversions (https://github.com/nipy/nipype/pull/2110)
27+
* FIX: Retrieve aseg + wmparc stats properly (https://github.com/nipy/nipype/pull/2117)
28+
* ENH: ANTs MeasureImageSimilarity Inteface (https://github.com/nipy/nipype/pull/2128)
29+
* FIX: CompCor filter_basis of correct size, pre-filter column headers (https://github.com/nipy/nipype/pull/2136, https://github.com/nipy/nipype/pull/2138)
30+
* ENH: FreeSurfer lta_convert and mri_coreg interfaces (https://github.com/nipy/nipype/pull/2140, https://github.com/nipy/nipype/pull/2172)
31+
* ENH: Speed up S3DataGrabber (https://github.com/nipy/nipype/pull/2143)
32+
* FIX: Allow S3DataGrabber to grab single file (https://github.com/nipy/nipype/pull/2147)
33+
* FIX: Allow 4D images as inputs to buildtemplateparallel.sh and N4BiasFieldCorrection (https://github.com/nipy/nipype/pull/2151)
34+
* MAINT: Detect and warn unconnected duplicate nodes (https://github.com/nipy/nipype/pull/2163)
35+
* ENH: Calcmedian Interface (https://github.com/nipy/nipype/pull/2167)
36+
* FIX: probtrackx2 outputs (https://github.com/nipy/nipype/pull/2169)
37+
* ENH: Improve FreeSurfer registration (https://github.com/nipy/nipype/pull/2172)
38+
* ENH: BIDSDataGrabber interface (https://github.com/nipy/nipype/pull/2174)
39+
* MAINT: Set minimum numpy version to 1.9.0 (https://github.com/nipy/nipype/pull/2182)
40+
* ENH: Support for multiple intial-moving-transforms (https://github.com/nipy/nipype/pull/2187)
41+
* MAINT: Fixes for networkx and afni (https://github.com/nipy/nipype/pull/2196, https://github.com/nipy/nipype/pull/2171)
42+
* TST: Update C3D version in Docker build (https://github.com/nipy/nipype/pull/2199)
43+
* ENH: SimpleInterface interface (https://github.com/nipy/nipype/pull/2220)
44+
* ENH: Add LTA to Tkregister2 (https://github.com/nipy/nipype/pull/2217)
445

546
0.13.1 (May 20, 2017)
647
=====================

CODE_OF_CONDUCT.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting project leaders Satrajit Ghosh <<satra@mit.edu>> or Chris Gorgolewski <<krzysztof.gorgolewski@gmail.com>>. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project leaders is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
**Are you new to open source and GitHub?** If so reading the "[How to submit a contribution](https://opensource.guide/how-to-contribute/#how-to-submit-a-contribution)" guide will provide a great introduction to contributing to Nipype and other Open Source projects. All the Nipype specific contributing instructions listed below will make much more sense after reading this guide.
2+
13
## Contributing pull-requests (PRs)
24

35
* All work is submitted via Pull Requests.
@@ -20,7 +22,7 @@
2022
* adding more information about what may have caused the error.
2123
Raise a new exception using ``raise_from(NewException("message"), oldException)`` from ``future``.
2224
Do not log this, as it creates redundant/confusing logs.
23-
* If you are new to the project don't forget to add your name and affiliation to the `.zenodo.json` file.
25+
* **If you are new to the project don't forget to add your name and affiliation to the `.zenodo.json` file.**
2426

2527
## Contributing issues
2628

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ COPY requirements.txt requirements.txt
8787
RUN pip install -r requirements.txt && \
8888
rm -rf ~/.cache/pip
8989

90+
RUN git clone https://github.com/INCF/pybids.git && \
91+
cd pybids && python setup.py develop
92+
9093
# Installing nipype
9194
COPY . /src/nipype
9295
RUN cd /src/nipype && \

README.rst

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -90,33 +90,8 @@ To participate in the Nipype development related discussions please use the foll
9090

9191
Please add *[nipype]* to the subject line when posting on the mailing list.
9292

93+
Contributing to the project
94+
---------------------------
9395

94-
Nipype structure
95-
----------------
96-
97-
Currently Nipype consists of the following files and directories:
98-
99-
INSTALL
100-
NIPYPE prerequisites, installation, development, testing, and
101-
troubleshooting.
102-
103-
README
104-
This document.
105-
106-
THANKS
107-
NIPYPE developers and contributors. Please keep it up to date!!
108-
109-
LICENSE
110-
NIPYPE license terms.
111-
112-
doc/
113-
Sphinx/reST documentation
114-
115-
examples/
116-
117-
nipype/
118-
Contains the source code.
119-
120-
setup.py
121-
Script for building and installing NIPYPE.
96+
If you'd like to contribute to the project please read our `guidelines <https://github.com/nipy/nipype/blob/master/CONTRIBUTING.md>`_. Please also read through our `code of conduct <https://github.com/nipy/nipype/blob/master/CODE_OF_CONDUCT.md>`_.
12297

conftest.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import pytest
2+
import numpy, os
3+
4+
@pytest.fixture(autouse=True)
5+
def add_np(doctest_namespace):
6+
doctest_namespace['np'] = numpy
7+
doctest_namespace['os'] = os
8+
9+
10+
filepath = os.path.dirname(os.path.realpath(__file__))
11+
datadir = os.path.realpath(os.path.join(filepath, 'nipype/testing/data'))
12+
doctest_namespace["datadir"] = datadir

doc/devel/gitwash/known_projects.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
.. _`PROJECTNAME mailing list`: http://projects.scipy.org/mailman/listinfo/nipy-devel
77

88
.. numpy
9-
.. _numpy: hhttp://numpy.scipy.org
9+
.. _numpy: http://numpy.scipy.org
1010
.. _`numpy github`: http://github.com/numpy/numpy
1111
.. _`numpy mailing list`: http://mail.scipy.org/mailman/listinfo/numpy-discussion
1212

doc/devel/interface_specs.rst

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,70 @@ generated depending on inputs, by the tool. OutputSpecs inherit from
159159
``interfaces.base.TraitedSpec`` directly.
160160

161161

162+
Controlling outputs to terminal
163+
-------------------------------
164+
165+
It is very likely that the software wrapped within the interface writes
166+
to the standard output or the standard error of the terminal.
167+
Interfaces provide a means to access and retrieve these outputs, by
168+
using the ``terminal_output`` attribute: ::
169+
170+
import nipype.interfaces.fsl as fsl
171+
mybet = fsl.BET(from_file='bet-settings.json')
172+
mybet.terminal_output = 'file_split'
173+
174+
In the example, the ``terminal_output = 'file_split'`` will redirect the
175+
standard output and the standard error to split files (called
176+
``stdout.nipype`` and ``stderr.nipype`` respectively).
177+
The possible values for ``terminal_output`` are:
178+
179+
*file*
180+
Redirects both standard output and standard error to the same file
181+
called ``output.nipype``.
182+
Messages from both streams will be overlapped as they arrive to
183+
the file.
184+
185+
*file_split*
186+
Redirects the output streams separately, to ``stdout.nipype``
187+
and ``stderr.nipype`` respectively, as described in the example.
188+
189+
*file_stdout*
190+
Only the standard output will be redirected to ``stdout.nipype``
191+
and the standard error will be discarded.
192+
193+
*file_stderr*
194+
Only the standard error will be redirected to ``stderr.nipype``
195+
and the standard output will be discarded.
196+
197+
*stream*
198+
Both output streams are redirected to the current logger printing
199+
their messages interleaved and immediately to the terminal.
200+
201+
*allatonce*
202+
Both output streams will be forwarded to a buffer and stored
203+
separately in the `runtime` object that the `run()` method returns.
204+
No files are written nor streams printed out to terminal.
205+
206+
*none*
207+
Both outputs are discarded
208+
209+
In all cases, except for the ``'none'`` setting of ``terminal_output``,
210+
the ``run()`` method will return a "runtime" object that will contain
211+
the streams in the corresponding properties (``runtime.stdout``
212+
for the standard output, ``runtime.stderr`` for the standard error, and
213+
``runtime.merged`` for both when streams are mixed, eg. when using the
214+
*file* option). ::
215+
216+
import nipype.interfaces.fsl as fsl
217+
mybet = fsl.BET(from_file='bet-settings.json')
218+
mybet.terminal_output = 'file_split'
219+
...
220+
result = mybet.run()
221+
result.runtime.stdout
222+
' ... captured standard output ...'
223+
224+
225+
162226
Traited Attributes
163227
------------------
164228

0 commit comments

Comments
 (0)