-
-
Notifications
You must be signed in to change notification settings - Fork 205
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
FWIW, it's nice to run the same automation @ RTD, CI, and locally. I like using tox for this (some people go for nox).
You can make RTD call tox as follows:
$ cat .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
---
version: 2
build:
os: ubuntu-24.04
tools:
python: >- # has to be parsed as a YAML string
3.11
commands:
- >-
PYTHONWARNINGS=error
python3 -Im venv "${READTHEDOCS_VIRTUALENV_PATH}"
- >-
PYTHONWARNINGS=error
"${READTHEDOCS_VIRTUALENV_PATH}"/bin/python -Im
pip install tox
- >-
PYTHONWARNINGS=error
"${READTHEDOCS_VIRTUALENV_PATH}"/bin/python -Im
tox -e build-docs --notest -vvvvv
- >-
PYTHONWARNINGS=error
"${READTHEDOCS_VIRTUALENV_PATH}"/bin/python -Im
tox -e build-docs --skip-pkg-install -q
--
"${READTHEDOCS_OUTPUT}"/html -b dirhtml
...
Another example: pytest-dev/pytest-asyncio#920
This would allow wiring such a self-install into tox that could be run locally and in any other envs the same way.
Originally posted by @webknjaz in #1165 (comment)
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation