Skip to content

MNT: Test on Python 3.10 #3438

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 3 commits into from
Mar 21, 2022
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
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-18.04']
python-version: [3.6, 3.7, 3.8, 3.9]
os: ['ubuntu-latest']
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
check: ['test']
pip-flags: ['']
depends: ['REQUIREMENTS']
Expand Down
3 changes: 2 additions & 1 deletion nipype/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def get_nipype_gitversion():
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering",
]
PYTHON_REQUIRES = ">= 3.6"
Expand Down Expand Up @@ -169,7 +171,6 @@ def get_nipype_gitversion():
"sphinx-argparse",
"sphinx>=2.1.2",
"sphinxcontrib-apidoc",
"sphinxcontrib-napoleon",
],
"duecredit": ["duecredit"],
"nipy": ["nitime", "nilearn", "dipy", "nipy", "matplotlib"],
Expand Down
2 changes: 1 addition & 1 deletion nipype/sphinxext/apidoc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Settings for sphinxext.interfaces and connection to sphinx-apidoc."""
import re
from sphinxcontrib.napoleon import (
from sphinx.ext.napoleon import (
Config as NapoleonConfig,
_patch_python_domain,
_skip_member as _napoleon_skip_member,
Expand Down
6 changes: 3 additions & 3 deletions nipype/sphinxext/apidoc/docstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Reformat interface docstrings."""
import re
from sphinxcontrib.napoleon._upstream import _
from sphinxcontrib.napoleon.docstring import NumpyDocstring
from sphinx.locale import _
from sphinx.ext.napoleon.docstring import NumpyDocstring


class NipypeDocstring(NumpyDocstring):
Expand Down Expand Up @@ -34,7 +34,7 @@ class InterfaceDocstring(NipypeDocstring):
docstring : :obj:`str` or :obj:`list` of :obj:`str`
The docstring to parse, given either as a string or split into
individual lines.
config: :obj:`sphinxcontrib.napoleon.Config` or :obj:`sphinx.config.Config`
config: :obj:`sphinx.ext.napoleon.Config` or :obj:`sphinx.config.Config`
The configuration settings to use. If not given, defaults to the
config object on `app`; or if `app` is not given defaults to the
a new :class:`nipype.sphinxext.apidoc.Config` object.
Expand Down
8 changes: 6 additions & 2 deletions nipype/utils/tests/test_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,21 @@ def test_main_returns_0_on_help(self):
assert exit_exception.code == 0

assert stderr.getvalue() == ""
if sys.version_info >= (3, 10):
options = "options"
else:
options = "optional arguments"
assert (
stdout.getvalue()
== """usage: nipype_cmd [-h] module interface
== f"""usage: nipype_cmd [-h] module interface

Nipype interface runner

positional arguments:
module Module name
interface Interface name

optional arguments:
{options}:
-h, --help show this help message and exit
"""
)
Expand Down