Skip to content

CI: Test Python 3.8 #3154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ language: python
python:
- 3.6
- 3.7
- 3.8

env:
global:
Expand Down
7 changes: 3 additions & 4 deletions nipype/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -109,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"

Expand Down Expand Up @@ -143,17 +145,14 @@ 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,
"filelock>=3.0.0",
"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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions nipype/pipeline/plugins/tests/test_multiproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""
Test the resource management of MultiProc
"""
import sys
import os
import pytest
from nipype.pipeline import engine as pe
Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -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()

Expand Down
5 changes: 3 additions & 2 deletions nipype/pipeline/plugins/tests/test_oar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 2 additions & 1 deletion nipype/pipeline/plugins/tests/test_pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 2 additions & 0 deletions nipype/utils/tests/test_provenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@


@needs_rdflib5
@pytest.mark.timeout(60)
def test_provenance(tmpdir):
from nipype.interfaces.base import CommandLine

Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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