From 04fc7b0df0f6358b13bf24df3f299fbd3db775f0 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 15 Jan 2020 11:54:31 -0500 Subject: [PATCH 1/5] CI: Test Python 3.8 --- .travis.yml | 1 + nipype/info.py | 1 + 2 files changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 64641b0f14..568c350085 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ language: python python: - 3.6 - 3.7 +- 3.8 env: global: diff --git a/nipype/info.py b/nipype/info.py index 099b53b735..c8cccff9c6 100644 --- a/nipype/info.py +++ b/nipype/info.py @@ -56,6 +56,7 @@ def get_nipype_gitversion(): "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "Topic :: Scientific/Engineering", ] PYTHON_REQUIRES = ">= 3.6" From 7ebe6ec8bf2519272fd0dd228e65ead6f9d4ee54 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Mon, 23 Mar 2020 15:58:09 -0400 Subject: [PATCH 2/5] CI: Skip some multiproc tests in Py38 --- .../pipeline/plugins/tests/test_legacymultiproc_nondaemon.py | 2 ++ nipype/pipeline/plugins/tests/test_multiproc.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/nipype/pipeline/plugins/tests/test_legacymultiproc_nondaemon.py b/nipype/pipeline/plugins/tests/test_legacymultiproc_nondaemon.py index f490729485..2e814bbf3e 100644 --- a/nipype/pipeline/plugins/tests/test_legacymultiproc_nondaemon.py +++ b/nipype/pipeline/plugins/tests/test_legacymultiproc_nondaemon.py @@ -134,6 +134,7 @@ def run_multiproc_nondaemon_with_flag(nondaemon_flag): return result +@pytest.mark.skipif(sys.version_info >= (3, 8), reason="multiprocessing issues in Python 3.8") def test_run_multiproc_nondaemon_false(): """ This is the entry point for the test. Two times a pipe of several @@ -152,6 +153,7 @@ def test_run_multiproc_nondaemon_false(): assert shouldHaveFailed +@pytest.mark.skipif(sys.version_info >= (3, 8), reason="multiprocessing issues in Python 3.8") def test_run_multiproc_nondaemon_true(): # with nondaemon_flag = True, the execution should succeed result = run_multiproc_nondaemon_with_flag(True) diff --git a/nipype/pipeline/plugins/tests/test_multiproc.py b/nipype/pipeline/plugins/tests/test_multiproc.py index 2e8967cfbe..9916785e3d 100644 --- a/nipype/pipeline/plugins/tests/test_multiproc.py +++ b/nipype/pipeline/plugins/tests/test_multiproc.py @@ -4,6 +4,7 @@ """ Test the resource management of MultiProc """ +import sys import os import pytest from nipype.pipeline import engine as pe @@ -33,6 +34,7 @@ def _list_outputs(self): return outputs +@pytest.mark.skipif(sys.version_info >= (3, 8), reason="multiprocessing issues in Python 3.8") def test_run_multiproc(tmpdir): tmpdir.chdir() @@ -114,6 +116,7 @@ def test_no_more_threads_than_specified(tmpdir): pipe.run(plugin="MultiProc", plugin_args={"n_procs": max_threads}) +@pytest.mark.skipif(sys.version_info >= (3, 8), reason="multiprocessing issues in Python 3.8") def test_hold_job_until_procs_available(tmpdir): tmpdir.chdir() From 828cd92b123a59627714ca3bc2446b2b0aa70060 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 1 Apr 2020 12:55:46 -0400 Subject: [PATCH 3/5] TEST: Timeout provenance tests after 1min --- nipype/utils/tests/test_provenance.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nipype/utils/tests/test_provenance.py b/nipype/utils/tests/test_provenance.py index 159a59ba7a..8137c083f7 100644 --- a/nipype/utils/tests/test_provenance.py +++ b/nipype/utils/tests/test_provenance.py @@ -15,6 +15,7 @@ @needs_rdflib5 +@pytest.mark.timeout(60) def test_provenance(tmpdir): from nipype.interfaces.base import CommandLine @@ -27,6 +28,7 @@ def test_provenance(tmpdir): @needs_rdflib5 +@pytest.mark.timeout(60) def test_provenance_exists(tmpdir): tmpdir.chdir() from nipype import config From 58dde80feccadad54e8d7a08a97518afffa4f004 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 1 Apr 2020 10:46:59 -0400 Subject: [PATCH 4/5] MNT: Pin rdflib >=5 --- nipype/info.py | 6 ++---- requirements.txt | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/nipype/info.py b/nipype/info.py index c8cccff9c6..1cedaa94f4 100644 --- a/nipype/info.py +++ b/nipype/info.py @@ -110,6 +110,7 @@ def get_nipype_gitversion(): FUTURE_MIN_VERSION = "0.16.0" SIMPLEJSON_MIN_VERSION = "3.8.0" PROV_VERSION = "1.5.2" +RDFLIB_MIN_VERSION = "5.0.0" CLICK_MIN_VERSION = "6.6.0" PYDOT_MIN_VERSION = "1.2.3" @@ -144,6 +145,7 @@ def get_nipype_gitversion(): "pydot>=%s" % PYDOT_MIN_VERSION, "pydotplus", "python-dateutil>=%s" % DATEUTIL_MIN_VERSION, + "rdflib>=%s" % RDFLIB_MIN_VERSION, "scipy>=%s" % SCIPY_MIN_VERSION, "simplejson>=%s" % SIMPLEJSON_MIN_VERSION, "traits>=%s,!=5.0" % TRAITS_MIN_VERSION, @@ -151,10 +153,6 @@ def get_nipype_gitversion(): "etelemetry>=0.2.0", ] -# neurdflib has to come after prov -# https://github.com/nipy/nipype/pull/2961#issuecomment-512035484 -REQUIRES += ["neurdflib"] - TESTS_REQUIRES = [ "codecov", "coverage<5", diff --git a/requirements.txt b/requirements.txt index 8f16c7873c..6cb09abdee 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,16 +2,16 @@ click>=6.6.0 networkx>=1.9 nibabel>=2.1.0 -numpy>=1.12 ; python_version < "3.7" +numpy>=1.13 ; python_version < "3.7" numpy>=1.15.3 ; python_version >= "3.7" packaging prov>=1.5.2 pydot>=1.2.3 pydotplus python-dateutil>=2.2 +rdflib>=5.0.0 scipy>=0.14 simplejson>=3.8.0 traits>=4.6,!=5.0 filelock>=3.0.0 -etelemetry -neurdflib +etelemetry>=0.2.0 From ab4298a7e267ff8ce35d6f69996f52b6c670c16b Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Sat, 18 Apr 2020 09:55:30 -0400 Subject: [PATCH 5/5] TEST: Set timeouts for PBS and OAR tests --- nipype/pipeline/plugins/tests/test_oar.py | 5 +++-- nipype/pipeline/plugins/tests/test_pbs.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/nipype/pipeline/plugins/tests/test_oar.py b/nipype/pipeline/plugins/tests/test_oar.py index cd3bf9606b..75cfddaa05 100644 --- a/nipype/pipeline/plugins/tests/test_oar.py +++ b/nipype/pipeline/plugins/tests/test_oar.py @@ -29,8 +29,9 @@ def _list_outputs(self): return outputs -@pytest.mark.skipif(which('oarsub') is None, reason="OAR not installed") -def test_run_pbsgraph(tmp_path): +@pytest.mark.skipif(which("oarsub") is None, reason="OAR not installed") +@pytest.mark.timeout(60) +def test_run_oargraph(tmp_path): pipe = pe.Workflow(name="pipe", base_dir=str(tmp_path)) mod1 = pe.Node(interface=OarTestInterface(), name="mod1") mod2 = pe.MapNode(interface=OarTestInterface(), iterfield=["input1"], name="mod2") diff --git a/nipype/pipeline/plugins/tests/test_pbs.py b/nipype/pipeline/plugins/tests/test_pbs.py index 64d0d77b5d..65662fd867 100644 --- a/nipype/pipeline/plugins/tests/test_pbs.py +++ b/nipype/pipeline/plugins/tests/test_pbs.py @@ -29,7 +29,8 @@ def _list_outputs(self): return outputs -@pytest.mark.skipif(which('qsub') is None, reason="PBS not installed") +@pytest.mark.skipif(which("qsub") is None, reason="PBS not installed") +@pytest.mark.timeout(60) def test_run_pbsgraph(tmp_path): pipe = pe.Workflow(name="pipe", base_dir=str(tmp_path)) mod1 = pe.Node(interface=PbsTestInterface(), name="mod1")