File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,9 @@ You need to install ``tox`` (``pip3 install tox``) to run tests and lint checks
81
81
# build the documentation - the result will be generated in build/sphinx/html/:
82
82
tox -e docs
83
83
84
+ # build and serve the documentation site locally for validating changes
85
+ tox -e docs-serve
86
+
84
87
# List all available tox environments
85
88
tox list
86
89
Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ jinja2==3.1.5
4
4
myst-parser==4.0.0
5
5
sphinx==8.1.3
6
6
sphinxcontrib-autoprogram==0.1.9
7
+ sphinx-autobuild==2024.10.3
Original file line number Diff line number Diff line change @@ -26,7 +26,10 @@ passenv =
26
26
NO_COLOR
27
27
PWD
28
28
PY_COLORS
29
- setenv = VIRTUAL_ENV ={envdir}
29
+ setenv =
30
+ DOCS_SOURCE = docs
31
+ DOCS_BUILD = build/sphinx/html
32
+ VIRTUAL_ENV ={envdir}
30
33
whitelist_externals = true
31
34
usedevelop = True
32
35
install_command = pip install {opts} {packages} -e .
@@ -99,8 +102,17 @@ per-file-ignores =
99
102
gitlab/v4/objects/__init__.py:F401,F403
100
103
101
104
[testenv:docs]
105
+ description = Builds the docs site. Generated HTML files will be available in ' {env:DOCS_BUILD}' .
102
106
deps = -r{toxinidir}/requirements-docs.txt
103
- commands = sphinx-build -n -W --keep-going -b html docs build/sphinx/html
107
+ commands = sphinx-build -n -W --keep-going -b html {env:DOCS_SOURCE} {env:DOCS_BUILD}
108
+
109
+ [testenv:docs-serve]
110
+ description =
111
+ Builds and serves the HTML docs site locally. \
112
+ Use this for verifying updates to docs. \
113
+ Changes to docs files will be automatically rebuilt and served.
114
+ deps = -r{toxinidir}/requirements-docs.txt
115
+ commands = sphinx-autobuild {env:DOCS_SOURCE} {env:DOCS_BUILD} --open-browser --port 8000
104
116
105
117
[testenv:cover]
106
118
commands =
You can’t perform that action at this time.
0 commit comments