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

Commit 6c8af13

Browse files
authored
Merge branch 'main' into henryiii/fix/27
2 parents 009d817 + e22be80 commit 6c8af13

File tree

15 files changed

+191
-175
lines changed

15 files changed

+191
-175
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.

0 commit comments

Comments
 (0)