Skip to content

Commit 001b166

Browse files
authored
Update CONTRIBUTING.md for uv (#769)
* Update CONTRIBUTING.md for uv * pin python version for uv * update CI jobs to use correct python version
1 parent 485d9fa commit 001b166

File tree

5 files changed

+21
-24
lines changed

5 files changed

+21
-24
lines changed

.github/python-version.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/main.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ jobs:
1818
lint:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: mhils/workflows/checkout@v11
22-
- uses: mhils/workflows/setup-python@v11
23-
- uses: mhils/workflows/setup-uv@v11
21+
- uses: mhils/workflows/checkout@v16
22+
- uses: mhils/workflows/setup-python@v16
23+
- uses: mhils/workflows/setup-uv@v16
2424
- run: uv run tox -e lint
2525

2626
old-dependencies:
2727
runs-on: ubuntu-latest
2828
steps:
29-
- uses: mhils/workflows/checkout@v11
30-
- uses: mhils/workflows/setup-python@v11
31-
- uses: mhils/workflows/setup-uv@v11
29+
- uses: mhils/workflows/checkout@v16
30+
- uses: mhils/workflows/setup-python@v16
31+
- uses: mhils/workflows/setup-uv@v16
3232
- run: uv run tox -e old-dependencies
3333

3434
test:
@@ -55,15 +55,12 @@ jobs:
5555
py: 3.9.18
5656
runs-on: ${{ matrix.os }}
5757
steps:
58-
- uses: mhils/workflows/checkout@v11
59-
- uses: mhils/workflows/setup-python@v11
60-
with:
61-
python-version: ${{ matrix.py }}
62-
- uses: mhils/workflows/setup-uv@main
63-
- run: uv run tox -e py -- -vvv ${{ matrix.args }}
58+
- uses: mhils/workflows/checkout@v16
59+
- uses: mhils/workflows/setup-uv@v16
60+
- run: uv run --python ${{ matrix.py }} tox -e py -- -vvv ${{ matrix.args }}
6461

6562
build:
66-
uses: mhils/workflows/.github/workflows/python-build.yml@v11
63+
uses: mhils/workflows/.github/workflows/python-build.yml@v16
6764
permissions:
6865
contents: read
6966
id-token: write
@@ -93,13 +90,13 @@ jobs:
9390
- test
9491
- build
9592
- attest
96-
uses: mhils/workflows/.github/workflows/alls-green.yml@v11
93+
uses: mhils/workflows/.github/workflows/alls-green.yml@v16
9794
with:
9895
jobs: ${{ toJSON(needs) }}
9996
allowed-skips: '["attest"]'
10097

10198
deploy:
102-
uses: mhils/workflows/.github/workflows/python-deploy.yml@v11
99+
uses: mhils/workflows/.github/workflows/python-deploy.yml@v16
103100
with:
104101
artifact-name: wheels
105102
needs: check

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13.1

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ please consider contributing in the following areas:
1212

1313
## Development Setup
1414

15-
To get started hacking on pdoc, please install a recent version of Python (we recommend at least Python 3.9). Then, do
16-
the following:
15+
To get started hacking on pdoc, please install [uv](https://docs.astral.sh/uv/). Then, do the following:
1716

1817
```shell
1918
git clone https://github.com/mitmproxy/pdoc.git
2019
cd pdoc
21-
pip3 install -e .[dev]
20+
uv run pdoc --help
2221
```
2322

2423
## Testing
@@ -27,7 +26,7 @@ If you've followed the procedure above, you already have all the development req
2726
basic test suite with [tox](https://tox.readthedocs.io/):
2827

2928
```shell
30-
tox
29+
uv run tox
3130
```
3231

3332
Please ensure that all patches are accompanied by matching changes in the test suite. The project strictly maintains
@@ -36,12 +35,13 @@ Please ensure that all patches are accompanied by matching changes in the test s
3635
### Fixing Snapshot Tests
3736

3837
pdoc makes heavy use of snapshot tests, which compare the rendered output with a stored copy in the [test/testdata](test/testdata) directory.
39-
These tests are very useful to catch regressions, but also have a tendency to break quickly. If you encounter failing snapshot tests, run
38+
These tests are very useful to catch regressions, but also have a tendency to break quickly. You can overwrite failing snapshots tests by running
4039

4140
```shell
42-
python3 ./test/test_snapshot.py
41+
uv run test/test_snapshot.py
4342
```
44-
to overwrite the stored snapshots with the new rendered output. This will fix the tests.
43+
44+
Alternatively, CI will automatically update all snapshots.
4545

4646
## Documentation
4747

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)