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

Commit f17a579

Browse files
pre-commit-ci[bot]gaborbernat
authored andcommitted
[pre-commit.ci] pre-commit autoupdate (#50)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: Bernát Gábor <[email protected]>
1 parent 63c291a commit f17a579

File tree

4 files changed

+45
-52
lines changed

4 files changed

+45
-52
lines changed

.github/workflows/check.yml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,50 +27,55 @@ jobs:
2727
- windows-latest
2828
- macos-latest
2929
steps:
30-
- name: setup python for tox
31-
uses: actions/setup-python@v5
30+
- uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
33+
- name: Install the latest version of uv
34+
uses: astral-sh/setup-uv@v3
3235
with:
33-
python-version: "3.12"
34-
- name: install tox-uv
35-
run: python -m pip install tox-uv
36+
enable-cache: true
37+
cache-dependency-glob: "pyproject.toml"
38+
github-token: ${{ secrets.GITHUB_TOKEN }}
39+
- name: Install tox
40+
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
3641
- uses: moonrepo/setup-rust@v1
3742
with:
3843
cache-base: main
3944
bins: cargo-tarpaulin
4045
env:
4146
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42-
- name: setup python for test ${{ matrix.py }}
43-
uses: actions/setup-python@v5
44-
with:
45-
python-version: ${{ matrix.py }}
46-
allow-prereleases: true
4747
- name: setup test suite
4848
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.py }}
4949
- name: run test suite
5050
run: tox run --skip-pkg-install -e ${{ matrix.py }}
51+
env:
52+
PYTEST_ADDOPTS: "-vv --durations=20"
5153

5254
check:
5355
name: tox env ${{ matrix.tox_env }}
5456
runs-on: ubuntu-latest
5557
strategy:
5658
fail-fast: false
5759
matrix:
58-
tox_env:
60+
env:
5961
- type
6062
- dev
61-
- readme
63+
- pkg_meta
6264
steps:
6365
- uses: actions/checkout@v4
64-
- name: setup Python 3.12
65-
uses: actions/setup-python@v5
6666
with:
67-
python-version: "3.12"
68-
- name: install tox-uv
69-
run: python -m pip install tox-uv
70-
- uses: moonrepo/setup-rust@v1
67+
fetch-depth: 0
68+
- name: Install the latest version of uv
69+
uses: astral-sh/setup-uv@v3
7170
with:
72-
cache-base: main
71+
enable-cache: true
72+
cache-dependency-glob: "pyproject.toml"
73+
github-token: ${{ secrets.GITHUB_TOKEN }}
74+
- name: Install tox
75+
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
7376
- name: Setup test suite
74-
run: tox -vv --notest --skip-missing-interpreters false -e ${{ matrix.tox_env }}
77+
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.env }}
7578
- name: Run test suite
76-
run: tox --skip-pkg-install -e ${{ matrix.tox_env }}
79+
run: tox run --skip-pkg-install -e ${{ matrix.env }}
80+
env:
81+
PYTEST_ADDOPTS: "-vv --durations=20"

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
runs-on: ubuntu-latest
122122
environment:
123123
name: release
124-
url: https://pypi.org/project/pyproject-fmt-rust
124+
url: https://pypi.org/project/pyproject-fmt-rust/${{ github.ref_name }}
125125
permissions:
126126
id-token: write
127127
if: "startsWith(github.ref, 'refs/tags/')"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyproject-fmt-rust?style=flat-square)](https://pypi.org/project/pyproject-fmt-rust)
66
[![Downloads](https://static.pepy.tech/badge/pyproject-fmt-rust/month)](https://pepy.tech/project/pyproject-fmt-rust)
77
[![PyPI - License](https://img.shields.io/pypi/l/pyproject-fmt-rust?style=flat-square)](https://opensource.org/licenses/MIT)
8-
[![check](https://github.com/tox-dev/pyproject-fmt-rust/actions/workflows/check.yml/badge.svg)](https://github.com/tox-dev/pyproject-fmt-rust/actions/workflows/check.yml)
8+
[![check](https://github.com/tox-dev/pyproject-fmt-rust/actions/workflows/check.yaml/badge.svg)](https://github.com/tox-dev/pyproject-fmt-rust/actions/workflows/check.yaml)

tox.ini

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,29 @@ env_list =
1111
3.9
1212
3.8
1313
type
14-
readme
15-
docs
16-
skip_missing_interpreters = true
14+
pkg_meta
1715

1816
[testenv]
19-
description = run the unit tests with pytest under {basepython}
17+
description = run the unit tests with pytest under {base_python}
2018
package = wheel
19+
wheel_build_env = .pkg
2120
extras =
21+
graphviz
2222
test
23+
pass_env =
24+
PYTEST_*
2325
set_env =
24-
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
25-
COVERAGE_PROCESS_START = {toxinidir}/setup.cfg
26-
_COVERAGE_SRC = {envsitepackagesdir}/sphinx_argparse_cli
26+
COVERAGE_FILE = {work_dir}/.coverage.{env_name}
2727
commands =
28-
cargo tarpaulin --no-default-features --out Html --output-dir {env_dir}
2928
python -m pytest {tty:--color=yes} {posargs: \
30-
--junitxml {toxworkdir}{/}junit.{envname}.xml --cov {envsitepackagesdir}{/}pyproject_fmt_rust \
31-
--cov {toxinidir}{/}tests --cov-fail-under=100 \
29+
--cov {env_site_packages_dir}{/}pyproject_fmt_rust --cov {tox_root}{/}tests \
3230
--cov-config=pyproject.toml --no-cov-on-fail --cov-report term-missing:skip-covered --cov-context=test \
33-
--cov-report html:{envtmpdir}{/}htmlcov --cov-report xml:{toxworkdir}{/}coverage.{envname}.xml \
31+
--cov-report html:{env_tmp_dir}{/}htmlcov --cov-report xml:{work_dir}{/}coverage.{env_name}.xml \
32+
--junitxml {work_dir}{/}junit.{env_name}.xml \
3433
tests}
35-
allowlist_externals =
36-
cargo
3734

3835
[testenv:fix]
39-
description = run static analysis and style check using flake8
36+
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
4037
skip_install = true
4138
deps =
4239
pre-commit-uv>=4.1
@@ -51,30 +48,21 @@ commands =
5148
mypy src
5249
mypy tests
5350

54-
[testenv:readme]
51+
[testenv:pkg_meta]
5552
description = check that the long description is valid
5653
skip_install = true
5754
deps =
58-
build[uv]>=1.2.2
55+
check-wheel-contents>=0.6
5956
twine>=5.1.1
57+
uv>=0.4.10
6058
commands =
61-
pyproject-build --installer uv --sdist --wheel -o {envtmpdir} .
62-
twine check {envtmpdir}/*
63-
64-
[testenv:docs]
65-
description = build documentation
66-
extras =
67-
docs
68-
commands =
69-
sphinx-build -d "{envtmpdir}{/}doctree" docs "{toxworkdir}{/}docs_out" --color -b html {posargs}
70-
python -c 'print(r"documentation available under file://{toxworkdir}{/}docs_out{/}index.html")'
59+
uv build --sdist --wheel --out-dir {env_tmp_dir} .
60+
twine check {env_tmp_dir}{/}*
61+
check-wheel-contents --no-config {env_tmp_dir}
7162

7263
[testenv:dev]
7364
description = generate a DEV environment
7465
package = editable
75-
extras =
76-
docs
77-
test
7866
commands =
7967
uv pip tree
8068
python -c 'import sys; print(sys.executable)'

0 commit comments

Comments
 (0)