From 8d856e5acc4d4bd5efe11811cb18762c831931c9 Mon Sep 17 00:00:00 2001 From: Eleftherios Zisis Date: Fri, 15 Sep 2023 09:37:55 +0200 Subject: [PATCH] Remove py37, add py311, and fix Rectangle kwarg error (#1082) --------- Co-authored-by: Adrien Berchet --- .github/workflows/run-tox.yml | 6 +++--- doc/source/developer.rst | 8 ++++---- neurom/view/matplotlib_impl.py | 2 +- setup.py | 4 ++-- tox.ini | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/run-tox.yml b/.github/workflows/run-tox.yml index ee7782ff..9128e131 100644 --- a/.github/workflows/run-tox.yml +++ b/.github/workflows/run-tox.yml @@ -12,12 +12,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.8', '3.9', '3.10', '3.11'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/doc/source/developer.rst b/doc/source/developer.rst index 4cc0a21b..8ebcbbff 100644 --- a/doc/source/developer.rst +++ b/doc/source/developer.rst @@ -59,9 +59,9 @@ individually: .. code-block:: bash - $ tox -e py36-lint # runs only pylint - $ tox -e py36-docs # run only documentation check - $ tox -e py36 # run only the tests + $ tox -e py38-lint # runs only pylint + $ tox -e py38-docs # run only documentation check + $ tox -e py38 # run only the tests You can also run tests manually via `pylint` but you need to make sure that you have installed all required dependencies in your virtual environment: @@ -81,4 +81,4 @@ Then, run the tests manually. For example, Python compatibility -------------------- -We test the code against Python 3.6 and 3.7. +We test the code against Python 3.8, 3.9, 3.10, and 3.11. diff --git a/neurom/view/matplotlib_impl.py b/neurom/view/matplotlib_impl.py index c113f4bc..b3dcbc24 100644 --- a/neurom/view/matplotlib_impl.py +++ b/neurom/view/matplotlib_impl.py @@ -146,7 +146,7 @@ def _get_rectangle(x, y, linewidth): return Rectangle(x - linewidth / 2. * np.array([-np.sin(angle), np.cos(angle)]), np.linalg.norm(diff), linewidth, - np.rad2deg(angle)) + angle=np.rad2deg(angle)) segs = [_get_rectangle((seg[0][plane0], seg[0][plane1]), (seg[1][plane0], seg[1][plane1]), diff --git a/setup.py b/setup.py index e9ffd927..56c35f95 100644 --- a/setup.py +++ b/setup.py @@ -60,16 +60,16 @@ ], }, include_package_data=True, - python_requires='>=3.7', + python_requires='>=3.8', classifiers=[ 'Development Status :: 6 - Mature', 'Intended Audience :: Education', 'Intended Audience :: Science/Research', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'Topic :: Scientific/Engineering :: Bio-Informatics', ], use_scm_version={"local_scheme": "no-local-version"}, diff --git a/tox.ini b/tox.ini index 23d711cb..1a0cded1 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,7 @@ testdeps = [tox] envlist = - py{37,38,39,310} + py{38,39,310,311} py38-lint py38-coverage py38-docs @@ -58,7 +58,7 @@ convention = google [gh-actions] python = - 3.7: py37 3.8: py38 3.9: py39 3.10: py310 + 3.11: py311