diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 804ad23ab..046d35636 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -323,7 +323,8 @@ repos: stages: [pre-commit] - id: linkcheck name: linkcheck - entry: make -C docs/ linkcheck SPHINXOPTS=-W + entry: uv run --extra=dev sphinx-build -M linkcheck docs/source docs/build + -W language: python types_or: [rst] stages: [manual] @@ -332,7 +333,8 @@ repos: - id: spelling name: spelling - entry: make -C docs/ spelling SPHINXOPTS=-W + entry: uv run --extra=dev sphinx-build -M spelling docs/source docs/build + -W language: python types_or: [rst] stages: [manual] @@ -341,7 +343,7 @@ repos: - id: docs name: Build Documentation - entry: make docs + entry: uv run --extra=dev sphinx-build -M html docs/source docs/build -W language: python stages: [manual] pass_filenames: false diff --git a/Makefile b/Makefile index e7c51da19..e6ee537af 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,4 @@ SHELL := /bin/bash -euxo pipefail - -# Treat Sphinx warnings as errors -SPHINXOPTS := -W - .PHONY: update-secrets update-secrets: # After updating secrets, commit the new secrets.tar.gpg file. @@ -11,7 +7,7 @@ update-secrets: .PHONY: docs docs: - make -C docs clean html SPHINXOPTS=$(SPHINXOPTS) + uv run --extra=dev sphinx-build -M html docs/source docs/build -W .PHONY: open-docs open-docs: diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 7aba47eda..000000000 --- a/docs/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -SOURCEDIR = source -BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". -help: - @uv run --extra=dev $(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @uv run --extra=dev $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)