Skip to content

Commit d489f7f

Browse files
committed
🧪 Migrate RTD to invoke tox
1 parent 124dd73 commit d489f7f

2 files changed

Lines changed: 23 additions & 37 deletions

File tree

.readthedocs.yaml

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,31 @@
1-
---
2-
3-
# .readthedocs.yml
41
# Read the Docs configuration file
5-
# See https://docs.readthedocs.io/en/stable/config-file/v2.html
6-
# for details
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
---
74

8-
# Required
95
version: 2
106

11-
# Build documentation in the docs/ directory with Sphinx
12-
sphinx:
13-
builder: dirhtml
14-
configuration: docs/conf.py
15-
fail_on_warning: true
16-
17-
# Build documentation with MkDocs
18-
# mkdocs:
19-
# configuration: mkdocs.yml
20-
# fail_on_warning: true
21-
22-
# Optionally build your docs in additional formats
23-
# such as PDF and ePub
24-
formats: []
25-
26-
submodules:
27-
include: all # []
28-
exclude: []
29-
recursive: true
30-
317
build:
32-
os: ubuntu-20.04
8+
os: ubuntu-24.04
339
tools:
34-
python: >- # PyYAML parses it as float but RTD demands an explicit string
10+
python: >- # has to be parsed as a YAML string
3511
3.11
36-
37-
# Optionally set the version of Python and requirements required
38-
# to build docs
39-
python:
40-
install:
41-
- method: pip
42-
path: .
43-
- requirements: dependencies/tox-build-docs-cp311-linux-x86_64.txt
12+
commands:
13+
- >-
14+
PYTHONWARNINGS=error
15+
python3 -Im venv "${READTHEDOCS_VIRTUALENV_PATH}"
16+
- >-
17+
PYTHONWARNINGS=error
18+
"${READTHEDOCS_VIRTUALENV_PATH}"/bin/python -Im
19+
pip install tox
20+
- >-
21+
PYTHONWARNINGS=error
22+
"${READTHEDOCS_VIRTUALENV_PATH}"/bin/python -Im
23+
tox -e build-docs --notest -vvvvv
24+
- >-
25+
PYTHONWARNINGS=error
26+
"${READTHEDOCS_VIRTUALENV_PATH}"/bin/python -Im
27+
tox -e build-docs --skip-pkg-install -q
28+
--
29+
"${READTHEDOCS_OUTPUT}"/html -b dirhtml
4430
4531
...

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ commands =
161161
-W --keep-going \
162162
-d "{temp_dir}{/}.doctrees" \
163163
. \
164-
"{env_dir}{/}docs_out"
164+
{posargs:"{env_dir}{/}docs_out"}
165165

166166
# Print out the output docs dir and a way to serve html:
167167
-{envpython} \

0 commit comments

Comments
 (0)