diff --git a/.readthedocs.yaml b/.readthedocs.yaml index af33c564d..f2d25e607 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -14,6 +14,6 @@ build: build: html: - pixi run -e docs python ci/scripts/download-all-tutorial-datasets.py - - pixi run -e docs sphinx-build -T -b html docs $READTHEDOCS_OUTPUT/html + - SPHINXOPTS='-T' BUILDDIR=$READTHEDOCS_OUTPUT/html pixi run docs-clean sphinx: configuration: docs/conf.py diff --git a/docs/Makefile b/docs/Makefile index 3bc6174db..f27a45506 100755 --- a/docs/Makefile +++ b/docs/Makefile @@ -4,6 +4,7 @@ # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build +SPHINXATUOBUILD = sphinx-autobuild PAPER = BUILDDIR = _build @@ -24,6 +25,7 @@ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" + @echo " livehtml to make HTML files and serve with rebuilding on a server" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @@ -51,6 +53,7 @@ help: clean: rm -rf $(BUILDDIR)/* rm -rf .jupyter_cache + find . -name "*.parquet" -delete html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @@ -191,3 +194,7 @@ pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." + +livehtml: + @echo "$(SPHINXATUOBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html" + $(SPHINXATUOBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html diff --git a/pixi.toml b/pixi.toml index a9ecfe973..097721e61 100644 --- a/pixi.toml +++ b/pixi.toml @@ -128,9 +128,14 @@ sphinx-design = "*" sphinx-autoapi = "*" [feature.docs.tasks] -docs = { cmd = "sphinx-build docs docs/_build", description = "Build the documentation." } -docs-watch = { cmd = "sphinx-autobuild docs docs/_build", description = "Build and auto-rebuild the documentation on changes." } -docs-linkcheck = { cmd = "sphinx-build -b linkcheck docs/ docs/_build/linkcheck", description = "Verify all links in documentation don't 404." } +docs-only-clean = { cmd = "make clean", cwd = "docs", description = "Cleans the documentation folder of build artifacts." } +docs = { cmd = "make html", cwd = "docs", description = "Build the documentation." } +docs-clean = { depends-on = [ + { task = "docs-only-clean" }, + { task = "docs" }, +], description = "Build the documentation from a clean docs folder." } +docs-watch = { cmd = "make livehtml", cwd = "docs", description = "Build and auto-rebuild the documentation on changes." } +docs-linkcheck = { cmd = "make linkcheck", cwd = "docs", description = "Verify all links in documentation don't 404." } [feature.pre-commit.dependencies] pre_commit = "*"