Skip to content

Commit

Permalink
Bump tools and dependencies and support 3.13
Browse files Browse the repository at this point in the history
Signed-off-by: Bernát Gábor <[email protected]>
  • Loading branch information
gaborbernat committed Sep 7, 2024
1 parent 880f318 commit e95bd81
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 28 deletions.
13 changes: 7 additions & 6 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 Down Expand Up @@ -50,10 +51,10 @@ jobs:
with codecs.open(os.environ["GITHUB_ENV"], "a", "utf-8") as file_handler:
file_handler.write(env)
shell: python
- name: Setup test suite
run: tox -vv --notest
- name: Run test suite
run: tox --skip-pkg-install
- name: setup test suite
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.py }}
- name: run test suite
run: tox run --skip-pkg-install -e ${{ matrix.py }}
env:
CI_RUN: "yes"

Expand All @@ -78,8 +79,8 @@ jobs:
with:
python-version: "3.12"
- name: Install tox
run: python -m pip install tox
run: python -m pip install tox-uv
- name: Setup test suite
run: tox -vv --notest -e ${{ matrix.tox_env }}
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 }}
14 changes: 10 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,34 @@ 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
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"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.2.1"
hooks:
- id: pyproject-fmt
additional_dependencies: ["tox>=4.13"]
- 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
12 changes: 8 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
build-backend = "hatchling.build"
requires = [
"hatch-vcs>=0.4",
"hatchling>=1.21.1",
"hatchling>=1.25",
]

[project]
Expand Down Expand Up @@ -30,20 +30,21 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dynamic = [
"version",
]
dependencies = [
"pytest>=8.0.1",
"pytest>=8.3.2",
"tomli>=2.0.1; python_version<'3.11'",
]
optional-dependencies.test = [
"covdefaults>=2.3",
"coverage>=7.4.2",
"pytest-mock>=3.12",
"coverage>=7.6.1",
"pytest-mock>=3.14",
]
urls.Homepage = "https://github.com/pytest-dev/pytest-env"
urls.Source = "https://github.com/pytest-dev/pytest-env"
Expand Down Expand Up @@ -93,6 +94,9 @@ builtin = "clear,usage,en-GB_to_en-US"
write-changes = true
count = true

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

[tool.coverage]
run.source = [
"pytest_env",
Expand Down
26 changes: 12 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
[tox]
requires =
tox>=4.2
tox-uv>=1.11.3
env_list =
fix
py312
py311
py310
py39
py38
type
readme
3.13
3.12
3.11
3.10
3.9
skip_missing_interpreters = true

[testenv]
Expand All @@ -33,7 +34,7 @@ commands =
description = run static analysis and style check using flake8
skip_install = true
deps =
pre-commit>=3.2.
pre-commit-uv>=4.1
pass_env =
HOMEPATH
PROGRAMDATA
Expand All @@ -43,9 +44,7 @@ commands =
[testenv:type]
description = run type check on code base
deps =
mypy==1.8
set_env =
{tty:MYPY_FORCE_COLOR = 1}
mypy==1.11.2
commands =
mypy --strict src
mypy --strict tests
Expand All @@ -54,11 +53,11 @@ commands =
description = check that the long description is valid
skip_install = true
deps =
build[virtualenv]>=1.0.3
twine>=5
build[uv]>=1.2.2
twine>=5.1.1
change_dir = {toxinidir}
commands =
python -m build -o {envtmpdir} .
pyproject-build --installer uv -o {envtmpdir} .
twine check {envtmpdir}/*

[testenv:dev]
Expand All @@ -67,6 +66,5 @@ package = editable
extras =
test
commands =
python -m pip list --format=columns
uv pip tree
python -c 'import sys; print(sys.executable)'
uv_seed = true

0 comments on commit e95bd81

Please sign in to comment.