Skip to content

Commit 90dabf8

Browse files
authored
Update contributor docs to uv
1 parent c45b16c commit 90dabf8

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

docs/contributing.md

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,18 @@
44

55
The GitHub repository for this project is [simonw/shot-scraper](https://github.com/simonw/shot-scraper).
66

7-
To contribute to this tool, first checkout the code. Then create a new virtual environment:
7+
To contribute to this tool, first checkout the code. You can use [uv](https://github.com/astral-sh/uv) to run the tests like this:
88
```bash
99
cd shot-scraper
10-
python -m venv venv
11-
source venv/bin/activate
10+
uv run pytest
1211
```
13-
Or if you are using `pipenv`:
12+
You'll need to install the Playwright browsers too:
1413
```bash
15-
pipenv shell
16-
```
17-
Now install the dependencies and test dependencies:
18-
```bash
19-
pip install -e '.[test]'
20-
```
21-
Then you'll need to install the Playwright browsers too:
22-
```bash
23-
shot-scraper install
24-
```
25-
To run the tests:
26-
```bash
27-
pytest
14+
uv run shot-scraper install
2815
```
2916
Some of the tests exercise the CLI utility directly. Run those like so:
3017
```bash
31-
tests/run_examples.sh
18+
uv run tests/run_examples.sh
3219
```
3320
## Documentation
3421

@@ -37,14 +24,13 @@ Documentation for this project uses [MyST](https://myst-parser.readthedocs.io/)
3724
To build the documentation locally, run the following:
3825
```bash
3926
cd docs
40-
pip install -r requirements.txt
41-
make livehtml
27+
uv run --with-requirements requirements.txt make livehtml
4228
```
4329
This will start a live preview server, using [sphinx-autobuild](https://pypi.org/project/sphinx-autobuild/).
4430

4531
The CLI `--help` examples in the documentation are managed using [Cog](https://github.com/nedbat/cog). Update those files like this:
4632
```bash
47-
cog -r docs/*.md
33+
uv run cog -r docs/*.md
4834
```
4935
## Publishing the release notes
5036

0 commit comments

Comments
 (0)