Skip to content
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

Declare 3.13 support #252

Merged
merged 1 commit into from
Sep 8, 2024
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
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"
Loading