Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/source/contribute/developer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,6 @@ You can clean the build directory by running::

.. Note::

Use ``tox -e doc-preview`` to build the documentation and open it in your
Use ``tox -e doc-serve`` to build the documentation and open it in your
default browser. This command will also watch for changes in the source
files and rebuild the documentation automatically.
21 changes: 6 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ commands =
vale sync --config="{toxinidir}/doc/.vale.ini"
vale --config="{toxinidir}/doc/.vale.ini" "{toxinidir}/doc"

[testenv:doc-{clean,links,html,pdf}]
[testenv:doc-{clean,links,html,pdf,serve}]
description = Checks documentation links and pages generates properly
deps=
serve: sphinx-theme-builder[cli] @ https://github.com/pradyunsg/sphinx-theme-builder/archive/d9f620b1a73839728c95b596343595d3952ec8bf.zip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not required. The build system is already installing the STB tool.

allowlist_externals =
pdflatex
pdf: pdflatex
serve: stb
extras = doc
setenv =
SOURCE_DIR = doc/source
Expand All @@ -52,6 +55,7 @@ setenv =
commands =
links,html,pdf: sphinx-build -d "{toxworkdir}/doc_doctree" {env:SOURCE_DIR} "{toxinidir}/{env:BUILD_DIR}/{env:BUILDER}" {env:BUILDER_OPTS} -b {env:BUILDER}
clean: python -c "import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)" "{toxinidir}/{env:BUILD_DIR}"
serve: stb serve "{toxinidir}/{env:SOURCE_DIR}" --open-browser

[testenv:dist]
description = Checks project distribution
Expand All @@ -60,16 +64,3 @@ deps =
build
commands =
python -m build {toxinidir}

[testenv:doc-preview]
description = Build and serve documentation locally
allowlist_externals =
stb
extras = doc
deps =
sphinx-theme-builder[cli] @ https://github.com/pradyunsg/sphinx-theme-builder/archive/d9f620b1a73839728c95b596343595d3952ec8bf.zip
setenv =
SOURCE_DIR = doc/source
BUILD_DIR = doc/_build
commands =
stb serve "{toxinidir}/{env:SOURCE_DIR}" --open-browser
Loading