Skip to content

Commit

Permalink
Drop Python 3.8 support, add Python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Dec 27, 2024
1 parent e5925a1 commit 4cf2871
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 116 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
tox:
name: CI tests via Tox

runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

strategy:
matrix:
py-ver-major: [3]
py-ver-minor: [8, 9, 10, 11]
py-ver-minor: [9, 10, 11, 12, 13]
step: [lint, unit, mypy]

env:
Expand Down Expand Up @@ -63,15 +63,15 @@ jobs:
tox-style:
name: CI linters via Tox

runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

strategy:
matrix:
step: [pydocstyle]

env:
py-semver: 3.9
TOXENV: ${{ format('py39-{0}', matrix.step) }}
py-semver: 3.12
TOXENV: ${{ format('py312-{0}', matrix.step) }}

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
cwltests:
name: Run functional tests

runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand All @@ -114,7 +114,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.13"

- name: Cache for pip and cwltool intermediate files
uses: actions/cache@v4
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ PACKAGE=wdl2cwl
PYSOURCES=$(wildcard ${MODULE}/**.py ${MODULE}/avro/*.py ${MODULE}/tests/*.py)
DEVPKGS=diff_cover black pylint pep257 pydocstyle flake8 tox tox-pyenv \
isort wheel autoflake flake8-bugbear pyupgrade bandit pip \
setuptools build
setuptools build auto-walrus
COVBASE=coverage run --append

VERSION=v$(shell echo $$(tail -n 1 wdl2cwl/__init__.py | awk '{print $$3}'))
Expand Down Expand Up @@ -176,7 +176,8 @@ mypy: $(filter-out wdl2cwl/WdlV1_1%,$(PYSOURCES))
mypy $^

pyupgrade: $(filter-out wdl2cwl/WdlV1_1%,$(PYSOURCES))
pyupgrade --exit-zero-even-if-changed --py37-plus $^
pyupgrade --exit-zero-even-if-changed --py39-plus $^
auto-walrus $^

release-test: FORCE
git diff-index --quiet HEAD -- || ( echo You have uncommitted changes, please commit them and try again; false )
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ classifiers = [
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
]
requires-python = ">=3.8"
requires-python = ">=3.9"
dependencies = [
"cwl-utils >= 0.36",
"miniwdl",
Expand Down
48 changes: 24 additions & 24 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[tox]
envlist =
py{38,39,310,311,312}-lint,
py{38,39,310,311,312}-unit,
py{38,39,310,311,312}-bandit,
py{39,310,311,312,313}-lint,
py{39,310,311,312,313}-unit,
py{39,310,311,312,313}-bandit,
py312-pydocstyle
py{38,39,310,311,312}-mypy,
py{39,310,311,312,313}-mypy,

skipsdist = True
skip_missing_interpreters = True
Expand All @@ -14,46 +14,46 @@ addopts=-n auto --pyargs wdl2cwl

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313

[testenv]
description =
py{38,39,310,311,312}-unit: Run the unit tests
py{38,39,310,311,312}-lint: Lint the Python code
py{38,39,310,311,312}-bandit: Search for common security issues
py{38,39,310,311,312}-mypy: Check for type safety
py{39,310,311,312,313}-unit: Run the unit tests
py{39,310,311,312,313}-lint: Lint the Python code
py{39,310,311,312,313}-bandit: Search for common security issues
py{39,310,311,312,313}-mypy: Check for type safety
py312-pydocstyle: docstring style checker

passenv =
CI
GITHUB_*
deps =
py{38,39,310,311,312}-lint: flake8-bugbear
py{38,39,310,311,312}-lint: black
py{38,39,310,311,312}-bandit: bandit
py{39,310,311,312,313}-lint: flake8-bugbear
py{39,310,311,312,313}-lint: black
py{39,310,311,312,313}-bandit: bandit
py312-pydocstyle: pydocstyle
py312-pydocstyle: diff-cover

setenv =
py{38,39,310,311,312}-unit: LC_ALL = C.UTF-8
py{39,310,311,312,313}-unit: LC_ALL = C.UTF-8

commands =
py{38,39,310,311,312}-{unit,mypy}: python -m pip install -U pip setuptools wheel
py{38,39,310,311,312}-{lint,mypy,unit}: python -m pip install .[all]
py{38,39,310,311,312}-unit: make coverage-report coverage.xml PYTEST_EXTRA="{posargs}"
py{38,39,310,311,312}-bandit: make bandit
py{38,39,310,311,312}-lint: make flake8
py{38,39,310,311,312}-lint: make format-check
py{38,39,310,311,312}-lint: make validate-cwl
py{38,39,310,311,312}-mypy: make mypy
py{39,310,311,312,313}-{unit,mypy}: python -m pip install -U pip setuptools wheel
py{39,310,311,312,313}-{lint,mypy,unit}: python -m pip install .[all]
py{39,310,311,312,313}-unit: make coverage-report coverage.xml PYTEST_EXTRA="{posargs}"
py{39,310,311,312,313}-bandit: make bandit
py{39,310,311,312,313}-lint: make flake8
py{39,310,311,312,313}-lint: make format-check
py{39,310,311,312,313}-lint: make validate-cwl
py{39,310,311,312,313}-mypy: make mypy
py312-pydocstyle: make diff_pydocstyle_report

allowlist_externals =
py{38,39,310,311,312}-lint: flake8
py{38,39,310,311,312}-lint: black
py{38,39,310,311,312}-{bandit,mypy,shellcheck,lint,unit}: make
py{39,310,311,312,313}-lint: flake8
py{39,310,311,312,313}-lint: black
py{39,310,311,312,313}-{bandit,mypy,shellcheck,lint,unit}: make
py312-pydocstyle: make
2 changes: 1 addition & 1 deletion wdl2cwl/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __enter__(self) -> "WDLSourceLine":

def __exit__(
self,
exc_type: Optional[Type[BaseException]],
exc_type: Optional[type[BaseException]],
exc_value: Optional[BaseException],
exc_tb: Optional[TracebackType],
) -> None:
Expand Down
Loading

0 comments on commit 4cf2871

Please sign in to comment.