Skip to content

Commit

Permalink
Declare 3.13 support (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat authored Sep 8, 2024
1 parent 781e8c4 commit 427c579
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 40 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
fail-fast: false
matrix:
py:
- "3.13"
- "3.12"
- "3.11"
- "3.10"
Expand All @@ -39,18 +40,11 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
- name: Pick environment to run
run: |
import codecs; import os; import sys
env = "TOXENV=py{}{}\n".format(*sys.version_info[0:2])
print("Picked:\n{}for{}".format(env, sys.version))
with codecs.open(os.environ["GITHUB_ENV"], "a", "utf-8") as file_handler:
file_handler.write(env)
shell: python
allow-prereleases: true
- name: setup test suite
run: tox -vv --notest
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.py }}
- name: run test suite
run: tox --skip-pkg-install
run: tox run --skip-pkg-install -e ${{ matrix.py }}

check:
name: tox env ${{ matrix.tox_env }}
Expand All @@ -72,7 +66,7 @@ jobs:
python-version: "3.12"
- name: install tox
run: uv pip install tox tox-uv --system
- name: run check for ${{ matrix.tox_env }}
run: python -m tox -e ${{ matrix.tox_env }}
env:
UPGRADE_ADVISORY: "yes"
- name: Setup test suite
run: tox -vv --notest --skip-missing-interpreters false -e ${{ matrix.tox_env }}
- name: Run test suite
run: tox --skip-pkg-install -e ${{ matrix.tox_env }}
15 changes: 11 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ repos:
rev: 0.29.2
hooks:
- id: check-github-workflows
args: [ "--verbose" ]
args: ["--verbose"]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: ["--write-changes"]
additional_dependencies: ["tomli>=2.0.1"]
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "1.3.1"
rev: "1.3.2"
hooks:
- id: tox-ini-fmt
args: ["-p", "fix"]
Expand All @@ -24,11 +24,18 @@ repos:
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.6.3"
rev: "v0.6.4"
hooks:
- id: ruff-format
- id: ruff
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
- repo: https://github.com/rbubley/mirrors-prettier
rev: "v3.3.3"
hooks:
- id: prettier
additional_dependencies:
- [email protected]
- "@prettier/[email protected]"
- repo: meta
hooks:
- id: check-hooks-apply
Expand Down
6 changes: 3 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ build:
tools:
python: "3.12"
commands:
- pip install tox-uv
- tox r -e docs -vv --notest
- tox r -e docs --skip-pkg-install -- "${READTHEDOCS_OUTPUT}"/html
- pip install tox-uv
- tox r -e docs -vv --notest
- tox r -e docs --skip-pkg-install -- "${READTHEDOCS_OUTPUT}"/html
15 changes: 8 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ dependencies = [
"tomli>=2.0.1; python_version<'3.11'",
]
optional-dependencies.docs = [
"furo>=2024.7.18",
"sphinx>=7.4.4",
"sphinx-argparse-cli>=1.16",
"sphinx-autodoc-typehints>=2.2.3",
"furo>=2024.8.6",
"sphinx>=8.0.2",
"sphinx-argparse-cli>=1.17",
"sphinx-autodoc-typehints>=2.4",
"sphinx-copybutton>=0.5.2",
]
optional-dependencies.test = [
Expand Down Expand Up @@ -83,19 +83,20 @@ lint.ignore = [
"CPY", # No copyright statements
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
"DOC", # not supported
"DOC501", # not working with Sphinx
"ISC001", # Conflict with formatter
"S104", # Possible binding to all interfaces
]
lint.per-file-ignores."tests/**/*.py" = [
"D", # don"t care about documentation in tests
"FBT", # don"t care about booleans as positional arguments in tests
"D", # don't care about documentation in tests
"FBT", # don't care about booleans as positional arguments in tests
"INP001", # no implicit namespace
"PLC2701", # private import
"PLR0913", # any number of arguments in tests
"PLR0917", # any number of arguments in tests
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
"S101", # asserts allowed in tests...
"S101", # asserts allowed in tests
"S603", # `subprocess` call: check for execution of untrusted input
]
lint.isort = { known-first-party = [
Expand Down
25 changes: 13 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ requires =
tox>=4.2
env_list =
fix
py312
py311
py310
py39
py38
type
readme
docs
3.13
3.12
3.11
3.10
3.9
3.8
skip_missing_interpreters = true

[testenv]
Expand Down Expand Up @@ -43,9 +44,7 @@ commands =
[testenv:type]
description = run type check on code base
deps =
mypy==1.11.1
set_env =
{tty:MYPY_FORCE_COLOR = 1}
mypy==1.11.2
commands =
mypy src
mypy tests
Expand All @@ -54,10 +53,10 @@ commands =
description = check that the long description is valid
skip_install = true
deps =
build[virtualenv]>=1.2.1
build[uv]>=1.2.2
twine>=5.1.1
commands =
python -m build --sdist --wheel -o {envtmpdir} .
pyproject-build --installer uv --sdist --wheel -o {envtmpdir} .
twine check {envtmpdir}/*

[testenv:docs]
Expand All @@ -77,6 +76,8 @@ extras =
docs
test
commands =
python -m pip list --format=columns
uv pip tree
python -c 'import sys; print(sys.executable)'
uv_seed = true

[tool.pyproject-fmt]
max_supported_python = "3.13"

0 comments on commit 427c579

Please sign in to comment.