Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.

Commit e22be80

Browse files
authored
Declare 3.13 support (#48)
* Declare 3.13 support Signed-off-by: Bernát Gábor <[email protected]> * Cache tarpaulin install Signed-off-by: Bernát Gábor <[email protected]> --------- Signed-off-by: Bernát Gábor <[email protected]>
1 parent c6e5bee commit e22be80

File tree

7 files changed

+60
-53
lines changed

7 files changed

+60
-53
lines changed

.github/SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Supported Versions
44

55
| Version | Supported |
6-
|---------|--------------------|
6+
| ------- | ------------------ |
77
| 1.0 + | :white_check_mark: |
88
| < 1.0 | :x: |
99

.github/workflows/check.yml

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Check
22
on:
33
workflow_dispatch:
44
push:
5-
branches: [ "main" ]
6-
tags: [ "*" ]
5+
branches: ["main"]
6+
tags: ["*"]
77
pull_request:
88
concurrency:
99
group: check-${{ github.ref }}
@@ -16,6 +16,7 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
py:
19+
- "3.13"
1920
- "3.12"
2021
- "3.11"
2122
- "3.10"
@@ -32,27 +33,21 @@ jobs:
3233
python-version: "3.12"
3334
- name: install tox-uv
3435
run: python -m pip install tox-uv
35-
- uses: actions/checkout@v4
36-
- run: rustup toolchain install stable --profile minimal
37-
- uses: Swatinem/rust-cache@v2
38-
- name: install tarpaulin
39-
run: cargo install cargo-tarpaulin
36+
- uses: moonrepo/setup-rust@v1
37+
with:
38+
cache-base: main
39+
bins: cargo-tarpaulin
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4042
- name: setup python for test ${{ matrix.py }}
4143
uses: actions/setup-python@v5
4244
with:
4345
python-version: ${{ matrix.py }}
44-
- name: Pick environment to run
45-
run: |
46-
import codecs; import os; import sys
47-
env = "TOXENV=py{}{}\n".format(*sys.version_info[0:2])
48-
print("Picked:\n{}for{}".format(env, sys.version))
49-
with codecs.open(os.environ["GITHUB_ENV"], "a", "utf-8") as file_handler:
50-
file_handler.write(env)
51-
shell: python
46+
allow-prereleases: true
5247
- name: setup test suite
53-
run: tox -vv --notest
48+
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.py }}
5449
- name: run test suite
55-
run: tox --skip-pkg-install
50+
run: tox run --skip-pkg-install -e ${{ matrix.py }}
5651

5752
check:
5853
name: tox env ${{ matrix.tox_env }}
@@ -72,9 +67,10 @@ jobs:
7267
python-version: "3.12"
7368
- name: install tox-uv
7469
run: python -m pip install tox-uv
75-
- run: rustup toolchain install stable --profile minimal
76-
- uses: Swatinem/rust-cache@v2
77-
- name: run check for ${{ matrix.tox_env }}
78-
run: python -m tox -e ${{ matrix.tox_env }}
79-
env:
80-
UPGRADE_ADVISORY: "yes"
70+
- uses: moonrepo/setup-rust@v1
71+
with:
72+
cache-base: main
73+
- name: Setup test suite
74+
run: tox -vv --notest --skip-missing-interpreters false -e ${{ matrix.tox_env }}
75+
- name: Run test suite
76+
run: tox --skip-pkg-install -e ${{ matrix.tox_env }}

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Build
22
on:
33
workflow_dispatch:
44
push:
5-
branches: [ "main" ]
6-
tags: [ "*" ]
5+
branches: ["main"]
6+
tags: ["*"]
77
pull_request:
88
schedule:
99
- cron: "0 8 * * *"
@@ -47,7 +47,7 @@ jobs:
4747
with:
4848
target: ${{ matrix.platform.target }}
4949
args: --release --out dist --interpreter ${{ matrix.platform.interpreter || '3.8' }}
50-
sccache: 'true'
50+
sccache: "true"
5151
manylinux: ${{ matrix.platform.manylinux || 'auto' }}
5252
- name: Upload wheels
5353
uses: actions/upload-artifact@v4
@@ -71,7 +71,7 @@ jobs:
7171
with:
7272
target: ${{ matrix.platform.target }}
7373
args: --release --out dist --interpreter ${{ matrix.platform.interpreter || '3.8' }}
74-
sccache: 'true'
74+
sccache: "true"
7575
- name: Upload wheels
7676
uses: actions/upload-artifact@v4
7777
with:
@@ -94,7 +94,7 @@ jobs:
9494
with:
9595
target: ${{ matrix.platform.target }}
9696
args: --release --out dist --interpreter "3.8 pypy3.8 pypy3.9 pypy3.10"
97-
sccache: 'true'
97+
sccache: "true"
9898
- name: Upload wheels
9999
uses: actions/upload-artifact@v4
100100
with:
@@ -125,7 +125,7 @@ jobs:
125125
permissions:
126126
id-token: write
127127
if: "startsWith(github.ref, 'refs/tags/')"
128-
needs: [ linux, windows, macos, sdist ]
128+
needs: [linux, windows, macos, sdist]
129129
steps:
130130
- uses: actions/download-artifact@v4
131131
- name: Publish to PyPI

.pre-commit-config.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,34 @@ repos:
88
rev: 0.29.2
99
hooks:
1010
- id: check-github-workflows
11-
args: [ "--verbose" ]
11+
args: ["--verbose"]
1212
- repo: https://github.com/codespell-project/codespell
1313
rev: v2.3.0
1414
hooks:
1515
- id: codespell
16-
args: [ "--write-changes" ]
16+
additional_dependencies: ["tomli>=2.0.1"]
1717
- repo: https://github.com/tox-dev/tox-ini-fmt
18-
rev: "1.3.1"
18+
rev: "1.3.2"
1919
hooks:
2020
- id: tox-ini-fmt
21-
args: [ "-p", "fix" ]
21+
args: ["-p", "fix"]
2222
- repo: https://github.com/tox-dev/pyproject-fmt
2323
rev: "2.2.1"
2424
hooks:
2525
- id: pyproject-fmt
2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: "v0.6.3"
27+
rev: "v0.6.4"
2828
hooks:
2929
- id: ruff-format
3030
- id: ruff
31-
args: [ "--fix", "--unsafe-fixes", "--exit-non-zero-on-fix" ]
31+
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
32+
- repo: https://github.com/rbubley/mirrors-prettier
33+
rev: "v3.3.3"
34+
hooks:
35+
- id: prettier
36+
additional_dependencies:
37+
38+
- "@prettier/[email protected]"
3239
- repo: meta
3340
hooks:
3441
- id: check-hooks-apply

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ To work on the project:
1717
cargo test
1818
```
1919

20-
2120
## License
21+
2222
By contributing to pyproject-rust-format, you agree that your contributions
2323
will be licensed under the [MIT License](LICENSE).
2424

@@ -38,5 +38,6 @@ with a different PATH. To fix it, put the following in `.cargo/config.toml`:
3838
[env]
3939
PYO3_PYTHON = "./.venv/bin/python"
4040
```
41+
4142
And make sure you have a `.venv` folder with Python in it. This will ensure all
4243
runs use the same Python and don't reconfigure.

pyproject.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build-system]
22
build-backend = "maturin"
33
requires = [
4-
"maturin>=1.5.1",
4+
"maturin>=1.7.1",
55
]
66

77
[project]
@@ -27,6 +27,7 @@ classifiers = [
2727
"Programming Language :: Python :: 3.10",
2828
"Programming Language :: Python :: 3.11",
2929
"Programming Language :: Python :: 3.12",
30+
"Programming Language :: Python :: 3.13",
3031
]
3132
dynamic = [
3233
"version",
@@ -35,7 +36,7 @@ dependencies = [
3536
]
3637
optional-dependencies.test = [
3738
"covdefaults>=2.3",
38-
"pytest>=8.2",
39+
"pytest>=8.3.2",
3940
"pytest-cov>=5",
4041
]
4142
urls."Bug Tracker" = "https://github.com/tox-dev/pyproject-fmt-rust/issues"
@@ -100,6 +101,9 @@ lint.preview = true
100101
builtin = "clear,usage,en-GB_to_en-US"
101102
count = true
102103

104+
[tool.pyproject-fmt]
105+
max_supported_python = "3.13"
106+
103107
[tool.pytest]
104108
ini_options.testpaths = [
105109
"tests",

tox.ini

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
[tox]
22
requires =
33
tox>=4.2
4+
tox-uv>=1.11.3
45
env_list =
56
fix
6-
py312
7-
py311
8-
py310
9-
py39
10-
py38
117
type
128
readme
139
docs
10+
3.13
11+
3.12
12+
3.11
13+
3.10
14+
3.9
15+
3.8
1416
skip_missing_interpreters = true
1517

1618
[testenv]
@@ -37,16 +39,14 @@ allowlist_externals =
3739
description = run static analysis and style check using flake8
3840
skip_install = true
3941
deps =
40-
pre-commit>=3.7
42+
pre-commit-uv>=4.1
4143
commands =
4244
pre-commit run --all-files --show-diff-on-failure
4345

4446
[testenv:type]
4547
description = run type check on code base
4648
deps =
47-
mypy==1.10
48-
set_env =
49-
{tty:MYPY_FORCE_COLOR = 1}
49+
mypy==1.11.2
5050
commands =
5151
mypy src
5252
mypy tests
@@ -55,10 +55,10 @@ commands =
5555
description = check that the long description is valid
5656
skip_install = true
5757
deps =
58-
build[virtualenv]>=1.2.1
59-
twine>=5
58+
build[uv]>=1.2.2
59+
twine>=5.1.1
6060
commands =
61-
python -m build --sdist --wheel -o {envtmpdir} .
61+
pyproject-build --installer uv --sdist --wheel -o {envtmpdir} .
6262
twine check {envtmpdir}/*
6363

6464
[testenv:docs]
@@ -76,6 +76,5 @@ extras =
7676
docs
7777
test
7878
commands =
79-
python -m pip list --format=columns
79+
uv pip tree
8080
python -c 'import sys; print(sys.executable)'
81-
uv_seed = true

0 commit comments

Comments
 (0)