You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/contributing.md
+7-21Lines changed: 7 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,31 +4,18 @@
4
4
5
5
The GitHub repository for this project is [simonw/shot-scraper](https://github.com/simonw/shot-scraper).
6
6
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:
8
8
```bash
9
9
cd shot-scraper
10
-
python -m venv venv
11
-
source venv/bin/activate
10
+
uv run pytest
12
11
```
13
-
Or if you are using `pipenv`:
12
+
You'll need to install the Playwright browsers too:
14
13
```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
28
15
```
29
16
Some of the tests exercise the CLI utility directly. Run those like so:
30
17
```bash
31
-
tests/run_examples.sh
18
+
uv run tests/run_examples.sh
32
19
```
33
20
## Documentation
34
21
@@ -37,14 +24,13 @@ Documentation for this project uses [MyST](https://myst-parser.readthedocs.io/)
37
24
To build the documentation locally, run the following:
38
25
```bash
39
26
cd docs
40
-
pip install -r requirements.txt
41
-
make livehtml
27
+
uv run --with-requirements requirements.txt make livehtml
42
28
```
43
29
This will start a live preview server, using [sphinx-autobuild](https://pypi.org/project/sphinx-autobuild/).
44
30
45
31
The CLI `--help` examples in the documentation are managed using [Cog](https://github.com/nedbat/cog). Update those files like this:
0 commit comments