Skip to content

Commit 2cfcd5a

Browse files
committed
Merge remote-tracking branch 'upstream/master' into dev/2.0
2 parents e990c69 + 4f2933e commit 2cfcd5a

File tree

7 files changed

+23
-10
lines changed

7 files changed

+23
-10
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ before_install:
8686

8787
- travis_retry pip install -r requirements.txt
8888
- travis_retry pip install grabbit==0.1.2
89-
- travis_retry git clone https://github.com/INCF/pybids.git ${HOME}/pybids &&
90-
pip install -e ${HOME}/pybids
89+
- travis_retry git clone -b 0.6.5 https://github.com/INCF/pybids.git ${HOME}/pybids && pip install -e ${HOME}/pybids
9190

9291
install:
9392
- travis_retry pip install $EXTRA_PIP_FLAGS -e .[$NIPYPE_EXTRAS]

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
'sphinx.ext.autosummary',
5151
'numpydoc',
5252
'matplotlib.sphinxext.plot_directive',
53-
'matplotlib.sphinxext.only_directives',
53+
#'matplotlib.sphinxext.only_directives',
5454
'nipype.sphinxext.plot_workflow',
5555
#'IPython.sphinxext.ipython_directive',
5656
#'IPython.sphinxext.ipython_console_highlighting'

nipype/info.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def get_nipype_gitversion():
150150
if sys.version_info <= (3, 4):
151151
REQUIRES.append('configparser')
152152

153-
TESTS_REQUIRES = ['pytest-cov', 'codecov', 'pytest-env']
153+
TESTS_REQUIRES = ['pytest-cov', 'codecov', 'pytest-env', 'coverage<5']
154154

155155
EXTRA_REQUIRES = {
156156
'doc': ['Sphinx>=1.4', 'numpydoc', 'matplotlib', 'pydotplus', 'pydot>=1.2.3'],
@@ -160,7 +160,7 @@ def get_nipype_gitversion():
160160
'profiler': ['psutil>=5.0'],
161161
'duecredit': ['duecredit'],
162162
'xvfbwrapper': ['xvfbwrapper'],
163-
'pybids': ['pybids'],
163+
'pybids': ['pybids==0.6.5'],
164164
'ssh': ['paramiko'],
165165
# 'mesh': ['mayavi'] # Enable when it works
166166
}

nipype/interfaces/base/tests/test_resource_monitor.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@
1616
from ... import utility as niu
1717

1818
# Try to enable the resource monitor
19-
config.enable_resource_monitor()
2019
run_profile = config.resource_monitor
2120

2221

22+
@pytest.fixture(scope="module")
23+
def use_resource_monitor():
24+
config.enable_resource_monitor()
25+
yield
26+
config.disable_resource_monitor()
27+
28+
2329
class UseResourcesInputSpec(CommandLineInputSpec):
2430
mem_gb = traits.Float(
2531
desc='Number of GB of RAM to use', argstr='-g %f', mandatory=True)
@@ -49,7 +55,7 @@ class UseResources(CommandLine):
4955
os.getenv('CI_SKIP_TEST', False), reason='disabled in CI tests')
5056
@pytest.mark.parametrize("mem_gb,n_procs", [(0.5, 3), (2.2, 8), (0.8, 4),
5157
(1.5, 1)])
52-
def test_cmdline_profiling(tmpdir, mem_gb, n_procs):
58+
def test_cmdline_profiling(tmpdir, mem_gb, n_procs, use_resource_monitor):
5359
"""
5460
Test runtime profiler correctly records workflow RAM/CPUs consumption
5561
of a CommandLine-derived interface
@@ -71,7 +77,7 @@ def test_cmdline_profiling(tmpdir, mem_gb, n_procs):
7177
True, reason='test disabled temporarily, until funcion profiling works')
7278
@pytest.mark.parametrize("mem_gb,n_procs", [(0.5, 3), (2.2, 8), (0.8, 4),
7379
(1.5, 1)])
74-
def test_function_profiling(tmpdir, mem_gb, n_procs):
80+
def test_function_profiling(tmpdir, mem_gb, n_procs, use_resource_monitor):
7581
"""
7682
Test runtime profiler correctly records workflow RAM/CPUs consumption
7783
of a Function interface

nipype/pipeline/engine/tests/test_engine.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,12 @@ def test_deep_nested_write_graph_runs(tmpdir):
479479
except OSError:
480480
pass
481481

482+
import networkx
483+
# Format of the graph has slightly changed
484+
graph_str = '""' if int(networkx.__version__.split('.')[0]) == 1 else ''
482485

483486
# examples of dot files used in the following test
484-
dotfile_orig = ['strict digraph {\n',
487+
dotfile_orig = ['strict digraph ' + graph_str + ' {\n',
485488
'"mod1 (engine)";\n',
486489
'"mod2 (engine)";\n',
487490
'"mod1 (engine)" -> "mod2 (engine)";\n',

nipype/pipeline/engine/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1465,7 +1465,8 @@ def clean_working_directory(outputs,
14651465
needed_files += [path for path, type in input_files if type == 'f']
14661466
for extra in [
14671467
'_0x*.json', 'provenance.*', 'pyscript*.m', 'pyjobs*.mat',
1468-
'command.txt', 'result*.pklz', '_inputs.pklz', '_node.pklz'
1468+
'command.txt', 'result*.pklz', '_inputs.pklz', '_node.pklz',
1469+
'.proc-*',
14691470
]:
14701471
needed_files.extend(glob(os.path.join(cwd, extra)))
14711472
if files2keep:

nipype/utils/config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@ def enable_resource_monitor(self):
285285
"""Sets the resource monitor on"""
286286
self.resource_monitor = True
287287

288+
def disable_resource_monitor(self):
289+
"""Sets the resource monitor off"""
290+
self.resource_monitor = False
291+
288292
def get_display(self):
289293
"""Returns the first display available"""
290294

0 commit comments

Comments
 (0)