Skip to content

Commit

Permalink
docs: use dependency groups for deps
Browse files Browse the repository at this point in the history
- This makes it consistent with other dev deps.
- Uses partial jobs override introduced in
  readthedocs/readthedocs.org#11710
  • Loading branch information
nijel committed Nov 26, 2024
1 parent 2ba76da commit ecb8cc7
Show file tree
Hide file tree
Showing 5 changed files with 544 additions and 17 deletions.
15 changes: 10 additions & 5 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@ build:
apt_packages:
# Graphviz is needed for sphinx.ext.graphviz
- graphviz

# Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
jobs:
create_environment:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
install:
- uv sync --no-sources --only-group docs --frozen
build:
html:
- .venv/bin/sphinx-build -T -b html -d docs/_build/doctrees -D language=$READTHEDOCS_LANGUAGE docs $READTHEDOCS_OUTPUT/html

# Avoid cloning submodules
submodules:
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# You can set these variables from the command-line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SPHINXBUILD ?= uv run --only-group doc sphinx-build
SOURCEDIR = .
BUILDDIR = _build

Expand Down
11 changes: 0 additions & 11 deletions docs/requirements.txt

This file was deleted.

14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,24 @@ dev = [
"reuse==5.0.2",
"scour==0.38.2",
"tinyunicodeblock==1.3",
{include-group = "docs"},
{include-group = "lint"},
{include-group = "test"},
{include-group = "types"}
]
docs = [
"furo==2024.8.6",
"jinja2>=3.1.4",
"matplotlib==3.9.2",
"pillow>=10.3.0",
"pygments==2.18.0",
"requests>=2.32.0",
"Sphinx==8.1.3",
"sphinx-copybutton==0.5.2",
"sphinx-jsonschema==1.19.1",
"sphinxcontrib-httpdomain==1.8.1",
"sphinxext-opengraph==0.9.1"
]
lint = [
{include-group = "pylint"},
{include-group = "pre-commit"}
Expand Down
Loading

0 comments on commit ecb8cc7

Please sign in to comment.