Skip to content

Commit d537043

Browse files
authored
docs: use dependency-groups in more places (#647)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent f6481ea commit d537043

File tree

1 file changed

+3
-33
lines changed

1 file changed

+3
-33
lines changed

docs/pages/guides/docs.md

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,10 @@ You can add the standard indices and tables at the end.
234234

235235
### pyproject.toml additions
236236

237-
Setting a `docs` extra looks like this:
237+
Setting a `docs` dependency group looks like this:
238238

239239
```toml
240-
[project.optional-dependencies]
240+
[dependency-groups]
241241
docs = [
242242
"furo",
243243
"myst_parser >=0.13",
@@ -247,19 +247,14 @@ docs = [
247247
]
248248
```
249249

250-
While there are other ways to specify docs, and you don't have to make the docs
251-
requirements an extra, this is a good idea as it forces docs building to always
252-
install the project, rather than being tempted to install only Sphinx and
253-
plugins and try to build against an uninstalled version of your project.
250+
You should use `--group=docs` when using uv or pip to install.
254251

255252
### .readthedocs.yaml
256253

257254
In order to use <https://readthedocs.org> to build, host, and preview your
258255
documentation, you must have a `.readthedocs.yaml` file {% rr RTD100 %} like
259256
this:
260257

261-
{% tabs %} {% tab uv-sphinx uv + Sphinx %}
262-
263258
<!-- [[[cog
264259
with code_fence("yaml"):
265260
print(readthedocs_yaml)
@@ -286,31 +281,6 @@ build:
286281
<!-- prettier-ignore-end -->
287282
<!-- [[[end]]] -->
288283
289-
{% endtab %} {% tab pip-sphinx pip + Sphinx %}
290-
291-
```yaml
292-
# Read the Docs configuration file
293-
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
294-
295-
version: 2
296-
297-
build:
298-
os: ubuntu-22.04
299-
tools:
300-
python: "3.12"
301-
sphinx:
302-
configuration: docs/conf.py
303-
304-
python:
305-
install:
306-
- method: pip
307-
path: .
308-
extra_requirements:
309-
- docs
310-
```
311-
312-
{% endtab %} {% endtabs %}
313-
314284
This sets the Read the Docs config version (2 is required) {% rr RTD101 %}.
315285
316286
The `build` table is the modern way to specify a runner. You need an `os` (a

0 commit comments

Comments
 (0)