Skip to content

Commit 5dd3807

Browse files
committed
resolving a conflict
2 parents 86ecf33 + 88dbce1 commit 5dd3807

Some content is hidden

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

104 files changed

+262
-740
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ python:
1212
env:
1313
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler" CI_SKIP_TEST=1
1414
- INSTALL_DEB_DEPENDECIES=false NIPYPE_EXTRAS="doc,tests,fmri,profiler" CI_SKIP_TEST=1
15-
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,duecredit" CI_SKIP_TEST=1
15+
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,duecredit,ssh" CI_SKIP_TEST=1
1616
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler" PIP_FLAGS="--pre" CI_SKIP_TEST=1
1717

1818
addons:
@@ -40,7 +40,7 @@ before_install:
4040
fi;
4141

4242
# handle python operations separately to reduce timeouts
43-
- wget https://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-4.3.31-Linux-x86_64.sh
43+
- wget https://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-latest-Linux-x86_64.sh
4444
-O /home/travis/.cache/conda.sh
4545
- bash ${HOME}/.cache/conda.sh -b -p ${HOME}/conda
4646
- export PATH=${HOME}/conda/bin:$PATH

CONTRIBUTING.md

+9
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ The current list of issue labels are [here][link_labels] and include:
3838
Please try to make sure that your requested enhancement is distinct from any others that have already been requested or implemented.
3939
If you find one that's similar but there are subtle differences, please reference the other request in your issue.
4040

41+
* [![Orphaned](https://img.shields.io/badge/-orphaned-9baddd.svg)][link_orphaned] *These pull requests have been closed for inactivity.*
42+
43+
Before proposing a new pull request, browse through the "orphaned" pull requests.
44+
You may find that someone has already made significant progress toward your goal, and you can re-use their
45+
unfinished work.
46+
An adopted PR should be updated to merge or rebase the current master, and a new PR should be created (see
47+
below) that references the original PR.
48+
4149
## Making a change
4250

4351
We appreciate all contributions to Nipype, but those accepted fastest will follow a workflow similar to the following:
@@ -147,6 +155,7 @@ You're awesome. :wave::smiley:
147155
[link_helpwanted]: https://github.com/nipy/nipype/labels/help-wanted
148156
[link_good_first_issue]: https://github.com/nipy/nipype/issues?q=is%3Aopen+is%3Aissue+label%3Agood-first-issue
149157
[link_enhancement]: https://github.com/nipy/nipype/labels/enhancement
158+
[link_orphaned]: https://github.com/nipy/nipype/pulls?q=is%3Apr+label%3Aorphaned+is%3Aclosed
150159

151160
[link_pullrequest]: https://help.github.com/articles/creating-a-pull-request-from-a-fork/
152161
[link_fork]: https://help.github.com/articles/fork-a-repo/

docker/generate_dockerfiles.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ done
5454

5555

5656
# neurodocker version 0.3.1-22-gb0ee069
57-
NEURODOCKER_IMAGE="kaczmarj/neurodocker@sha256:c670ec2e0666a63d4e017a73780f66554283e294f3b12250928ee74b8a48bc59"
57+
NEURODOCKER_IMAGE="kaczmarj/neurodocker@sha256:f15ca90803f4b89acfca55cd1c7269bf2ec2dfd95b3de1118b08afa34b87d9d1"
5858

5959
# neurodebian:stretch-non-free pulled on November 3, 2017
6060
BASE_IMAGE="neurodebian@sha256:7590552afd0e7a481a33314724ae27f76ccedd05ffd7ac06ec38638872427b9b"
@@ -88,7 +88,6 @@ function generate_main_dockerfile() {
8888
--user neuro \
8989
--miniconda env_name=neuro \
9090
activate=true \
91-
miniconda_version=4.3.31 \
9291
--copy docker/files/run_builddocs.sh docker/files/run_examples.sh \
9392
docker/files/run_pytests.sh nipype/external/fsl_imglob.py /usr/bin/ \
9493
--copy . /src/nipype \
@@ -103,7 +102,7 @@ function generate_main_dockerfile() {
103102
--arg PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=6 BUILD_DATE VCS_REF VERSION \
104103
--miniconda env_name=neuro \
105104
conda_install='python=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
106-
icu=58.1 libxml2 libxslt matplotlib mkl numpy
105+
icu=58.1 libxml2 libxslt matplotlib mkl numpy paramiko
107106
pandas psutil scikit-learn scipy traits=4.6.0' \
108107
pip_opts="-e" \
109108
pip_install="/src/nipype[all]" \

nipype/__init__.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@
2525

2626

2727
class NipypeTester(object):
28-
def __call__(self, doctests=True):
28+
def __call__(self, doctests=True, parallel=True):
2929
try:
3030
import pytest
3131
except:
3232
raise RuntimeError(
3333
'py.test not installed, run: pip install pytest')
34-
params = {'args': []}
35-
if doctests:
36-
params['args'].append('--doctest-modules')
37-
nipype_path = os.path.dirname(__file__)
38-
params['args'].extend(
39-
['-x', '--ignore={}/external'.format(nipype_path), nipype_path])
40-
pytest.main(**params)
34+
args = []
35+
if not doctests:
36+
args.extend(['-p', 'no:doctest'])
37+
if not parallel:
38+
args.append('-n0')
39+
args.append(os.path.dirname(__file__))
40+
pytest.main(args=args)
4141

4242

4343
test = NipypeTester()

nipype/algorithms/confounds.py

-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@
33
# vi: set ft=python sts=4 ts=4 sw=4 et:
44
'''
55
Algorithms to compute confounds in :abbr:`fMRI (functional MRI)`
6-
7-
Change directory to provide relative paths for doctests
8-
>>> import os
9-
>>> filepath = os.path.dirname(os.path.realpath(__file__))
10-
>>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data'))
11-
>>> os.chdir(datadir)
12-
136
'''
147
from __future__ import (print_function, division, unicode_literals,
158
absolute_import)

nipype/algorithms/mesh.py

-8
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@
33
# vi: set ft=python sts=4 ts=4 sw=4 et:
44
"""
55
Miscellaneous algorithms for 2D contours and 3D triangularized meshes handling
6-
7-
.. testsetup::
8-
# Change directory to provide relative paths for doctests
9-
>>> import os
10-
>>> filepath = os.path.dirname(os.path.realpath( __file__ ))
11-
>>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data'))
12-
>>> os.chdir(datadir)
13-
146
"""
157
from __future__ import (print_function, division, unicode_literals,
168
absolute_import)

nipype/algorithms/metrics.py

-7
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44
'''
55
Image assessment algorithms. Typical overlap and error computation
66
measures to evaluate results from other processing units.
7-
8-
Change directory to provide relative paths for doctests
9-
>>> import os
10-
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
11-
>>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data'))
12-
>>> os.chdir(datadir)
13-
147
'''
158
from __future__ import (print_function, division, unicode_literals,
169
absolute_import)

nipype/algorithms/misc.py

-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@
33
# vi: set ft=python sts=4 ts=4 sw=4 et:
44
'''
55
Miscellaneous algorithms
6-
7-
Change directory to provide relative paths for doctests
8-
>>> import os
9-
>>> filepath = os.path.dirname(os.path.realpath(__file__))
10-
>>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data'))
11-
>>> os.chdir(datadir)
12-
136
'''
147
from __future__ import (print_function, division, unicode_literals,
158
absolute_import)

nipype/algorithms/modelgen.py

-7
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@
1010
These functions include:
1111
1212
* SpecifyModel: allows specification of sparse and non-sparse models
13-
14-
Change directory to provide relative paths for doctests
15-
>>> import os
16-
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
17-
>>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data'))
18-
>>> os.chdir(datadir)
19-
2013
"""
2114
from __future__ import (print_function, division, unicode_literals,
2215
absolute_import)

nipype/algorithms/rapidart.py

-6
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111
1212
* StimulusCorrelation: determines correlation between stimuli
1313
schedule and movement/intensity parameters
14-
15-
Change directory to provide relative paths for doctests
16-
>>> import os
17-
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
18-
>>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data'))
19-
>>> os.chdir(datadir)
2014
"""
2115
from __future__ import (print_function, division, unicode_literals,
2216
absolute_import)

nipype/caching/memory.py

-6
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
"""
33
Using nipype with persistence and lazy recomputation but without explicit
44
name-steps pipeline: getting back scope in command-line based programming.
5-
6-
Change directory to provide relative paths for doctests
7-
>>> import os
8-
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
9-
>>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data'))
10-
>>> os.chdir(datadir)
115
"""
126
from __future__ import (print_function, division, unicode_literals,
137
absolute_import)

nipype/conftest.py

+11-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,20 @@
22
import numpy
33
import os
44

5+
DATADIR = os.path.realpath(
6+
os.path.join(os.path.dirname(__file__), 'testing/data'))
7+
58

69
@pytest.fixture(autouse=True)
710
def add_np(doctest_namespace):
811
doctest_namespace['np'] = numpy
912
doctest_namespace['os'] = os
1013

11-
filepath = os.path.dirname(os.path.realpath(__file__))
12-
datadir = os.path.realpath(os.path.join(filepath, 'testing/data'))
13-
doctest_namespace["datadir"] = datadir
14+
doctest_namespace["datadir"] = DATADIR
15+
16+
17+
@pytest.fixture(autouse=True)
18+
def in_testing(request):
19+
# This seems to be a reliable way to distinguish tests from doctests
20+
if request.function is None:
21+
os.chdir(DATADIR)

nipype/info.py

+12-3
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def get_nipype_gitversion():
153153
if sys.version_info <= (3, 4):
154154
REQUIRES.append('configparser')
155155

156-
TESTS_REQUIRES = ['pytest-cov', 'codecov']
156+
TESTS_REQUIRES = ['pytest-cov', 'codecov', 'pytest-xdist', 'pytest-env']
157157

158158
EXTRA_REQUIRES = {
159159
'doc': ['Sphinx>=1.4', 'numpydoc', 'matplotlib', 'pydotplus', 'pydot>=1.2.3'],
@@ -163,11 +163,20 @@ def get_nipype_gitversion():
163163
'profiler': ['psutil>=5.0'],
164164
'duecredit': ['duecredit'],
165165
'xvfbwrapper': ['xvfbwrapper'],
166-
'pybids': ['pybids']
166+
'pybids': ['pybids'],
167+
'ssh': ['paramiko'],
167168
# 'mesh': ['mayavi'] # Enable when it works
168169
}
169170

171+
172+
def _list_union(iterable):
173+
return list(set(sum(iterable, [])))
174+
175+
170176
# Enable a handle to install all extra dependencies at once
171-
EXTRA_REQUIRES['all'] = [val for _, val in list(EXTRA_REQUIRES.items())]
177+
EXTRA_REQUIRES['all'] = _list_union(EXTRA_REQUIRES.values())
178+
# dev = doc + tests + specs
179+
EXTRA_REQUIRES['dev'] = _list_union(val for key, val in EXTRA_REQUIRES.items()
180+
if key in ('doc', 'tests', 'specs'))
172181

173182
STATUS = 'stable'

nipype/interfaces/afni/model.py

-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
Examples
77
--------
88
See the docstrings of the individual classes for examples.
9-
.. testsetup::
10-
# Change directory to provide relative paths for doctests
11-
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
12-
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
13-
>>> os.chdir(datadir)
149
"""
1510
from __future__ import (print_function, division, unicode_literals,
1611
absolute_import)

nipype/interfaces/afni/preprocess.py

-6
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
33
# vi: set ft=python sts=4 ts=4 sw=4 et:
44
"""AFNI preprocessing interfaces
5-
6-
Change directory to provide relative paths for doctests
7-
>>> import os
8-
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
9-
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
10-
>>> os.chdir(datadir)
115
"""
126
from __future__ import (print_function, division, unicode_literals,
137
absolute_import)

nipype/interfaces/afni/svm.py

-6
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
33
# vi: set ft = python sts = 4 ts = 4 sw = 4 et:
44
"""Afni svm interfaces
5-
6-
Change directory to provide relative paths for doctests
7-
>>> import os
8-
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
9-
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
10-
>>> os.chdir(datadir)
115
"""
126
from __future__ import (print_function, division, unicode_literals,
137
absolute_import)

nipype/interfaces/afni/utils.py

-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
Examples
77
--------
88
See the docstrings of the individual classes for examples.
9-
.. testsetup::
10-
# Change directory to provide relative paths for doctests
11-
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
12-
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
13-
>>> os.chdir(datadir)
149
"""
1510
from __future__ import (print_function, division, unicode_literals,
1611
absolute_import)

nipype/interfaces/ants/legacy.py

-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
# of the antsApplyTransform program. This implementation is here
55
# for backwards compatibility.
66
"""ANTS Apply Transforms interface
7-
8-
Change directory to provide relative paths for doctests
9-
>>> import os
10-
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
11-
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
12-
>>> os.chdir(datadir)
137
"""
148

159
from builtins import range

nipype/interfaces/ants/registration.py

-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
# -*- coding: utf-8 -*-
22
"""The ants module provides basic functions for interfacing with ants
33
functions.
4-
5-
Change directory to provide relative paths for doctests
6-
>>> import os
7-
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
8-
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
9-
>>> os.chdir(datadir)
104
"""
115
from __future__ import (print_function, division, unicode_literals,
126
absolute_import)

nipype/interfaces/ants/resampling.py

-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
# -*- coding: utf-8 -*-
22
"""ANTS Apply Transforms interface
3-
4-
Change directory to provide relative paths for doctests
5-
>>> import os
6-
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
7-
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
8-
>>> os.chdir(datadir)
93
"""
104
from __future__ import (print_function, division, unicode_literals,
115
absolute_import)

nipype/interfaces/ants/segmentation.py

-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
# -*- coding: utf-8 -*-
22
"""The ants module provides basic functions for interfacing with ants functions.
3-
4-
Change directory to provide relative paths for doctests
5-
>>> import os
6-
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
7-
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
8-
>>> os.chdir(datadir)
9-
103
"""
114
from __future__ import (print_function, division, unicode_literals,
125
absolute_import)

nipype/interfaces/ants/utils.py

-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
# -*- coding: utf-8 -*-
22
"""ANTS Apply Transforms interface
3-
4-
Change directory to provide relative paths for doctests
5-
>>> import os
6-
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
7-
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
8-
>>> os.chdir(datadir)
93
"""
104
from __future__ import (print_function, division, unicode_literals,
115
absolute_import)

nipype/interfaces/ants/visualization.py

-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# -*- coding: utf-8 -*-
22
"""The ants visualisation module provides basic functions based on ITK.
3-
Change directory to provide relative paths for doctests
4-
>>> import os
5-
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
6-
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
7-
>>> os.chdir(datadir)
83
"""
94
from __future__ import (print_function, division, unicode_literals,
105
absolute_import)

nipype/interfaces/bru2nii.py

-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
# -*- coding: utf-8 -*-
22
"""The bru2nii module provides basic functions for dicom conversion
3-
4-
Change directory to provide relative paths for doctests
5-
>>> import os
6-
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
7-
>>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data'))
8-
>>> os.chdir(datadir)
93
"""
104
from __future__ import (print_function, division, unicode_literals,
115
absolute_import)

nipype/interfaces/c3.py

-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
# -*- coding: utf-8 -*-
22
"""The ants module provides basic functions for interfacing with ants
33
functions.
4-
5-
Change directory to provide relative paths for doctests
6-
>>> import os
7-
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
8-
>>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data'))
9-
>>> os.chdir(datadir)
104
"""
115
from __future__ import (print_function, division, unicode_literals,
126
absolute_import)

0 commit comments

Comments
 (0)