Skip to content

Commit 1985e28

Browse files
committed
build: docs dependencies as group instead of extra
1 parent 68f394b commit 1985e28

File tree

3 files changed

+21
-26
lines changed

3 files changed

+21
-26
lines changed

Contributing.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
Tests use pytests with (optional) coverage plugin. Install the locally cloned repo in editable mode with:
66

7-
```bash
8-
pip install -e .[test]
7+
```sh
8+
uv sync
99
```
1010

1111
**Tests make api calls that reduce your quota!**
@@ -32,16 +32,16 @@ TEST_PASSWORD=your_password
3232
- A coverage report can be created using the optional arguments --cov-report and --cov (see pytest documentation)
3333
- A subset of tests can be selected by pointing to the module within tests
3434

35-
```bash
35+
```sh
3636
# run all tests, output coverage report of aleph_alpha_client module in terminal
37-
pytest --cov-report term --cov=aleph_alpha_client tests
38-
pytest tests -v # start verbose
37+
uv run pytest --cov-report term --cov=aleph_alpha_client tests
38+
uv run pytest tests -v # start verbose
3939
```
4040

4141
If an html coverage report has been created a simple http server can be run to serve static files.
4242

43-
```bash
44-
python -m http.server --directory htmlcov 8000
43+
```sh
44+
uv run python -m http.server --directory htmlcov 8000
4545
```
4646

4747
## Releasing a new version
@@ -55,17 +55,17 @@ python -m http.server --directory htmlcov 8000
5555
## Working on our documentation
5656

5757
We use [Sphinx](https://www.sphinx-doc.org/en/master/index.html) for our documentation and publish it on [Read the Docs](https://aleph-alpha-client.readthedocs.io/en/latest/).
58-
To work on the documentation, you need to install the project editable and with the `docs` extra.
58+
To work on the documentation, you need to install the project with the `docs` dependency group.
5959

60-
```bash
61-
pip install -e .[docs]
60+
```sh
61+
uv sync --group docs
6262
```
6363

6464
The documentation can be generated with:
6565

66-
```bash
66+
```sh
6767
cd docs
68-
make html
68+
uv run make html
6969
```
7070

7171
Make sure that the documentation can be generated without Sphinx warnings or errors.

pyproject.toml

+1-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ dependencies = [
2020
"packaging>=23.2",
2121
]
2222

23-
[project.optional-dependencies]
24-
docs = [
25-
"sphinx>=6.1.3",
26-
"sphinx-rtd-theme>=1.2.1",
27-
]
28-
2923
[project.urls]
3024
Homepage = "https://github.com/Aleph-Alpha/aleph-alpha-client"
3125

@@ -45,6 +39,7 @@ dev = [
4539
"nbconvert>=7.16.6,<8",
4640
"ipykernel>=6.29.5,<7",
4741
]
42+
docs = ["sphinx>=6.1.3", "sphinx-rtd-theme>=1.2.1"]
4843

4944
[tool.hatch.build.targets.sdist]
5045
include = ["aleph_alpha_client"]

uv.lock

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)