Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
36 changes: 16 additions & 20 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,26 @@

---

# Required
# RTD API version
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: dirhtml
configuration: docs/conf.py
fail_on_warning: true

formats: []

submodules:
include: all # []
exclude: []
recursive: true

build:
os: ubuntu-22.04
tools:
python: "3.10"
python: >-
3.10
commands:
- python -Im venv "${READTHEDOCS_VIRTUALENV_PATH}"
- >-
"${READTHEDOCS_VIRTUALENV_PATH}"/bin/python -Im
pip install tox
- >-
"${READTHEDOCS_VIRTUALENV_PATH}"/bin/python -Im
tox -e build-docs --notest -vvvvv
- >-
SPHINX_BUILDER=dirhtml
SPHINX_BUILD_OUTPUT_DIRECTORY="${READTHEDOCS_OUTPUT}"/html
"${READTHEDOCS_VIRTUALENV_PATH}"/bin/python -Im
tox -e build-docs --skip-pkg-install -q

# Optionally set the version of Python and requirements required
# to build docs
python:
install:
- requirements: docs/requirements.txt
...
12 changes: 8 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -325,16 +325,18 @@ commands =
-git fetch --tags

# Build the html docs with Sphinx:
{envpython} -m sphinx \
{envpython} -Im sphinx \
{posargs:\
-j auto \
-b html \
-b {env:SPHINX_BUILDER:html} \
{tty:--color} \
-a \
-n \
-W --keep-going \
-d "{temp_dir}/.doctrees" \
. \
"{envdir}/docs_out"
{env:SPHINX_BUILD_OUTPUT_DIRECTORY:"{envdir}/docs_out"} \
}

# Print out the output docs dir and a way to serve html:
-{envpython} -c\
Expand All @@ -344,12 +346,14 @@ commands =
print("\n" + "=" * 120 +\
f"\n\nDocumentation available under:\n\n\
\tfile://\{index_file\}\n\nTo serve docs, use\n\n\
\t$ python3 -m http.server --directory \
\t$ python3 -Im http.server --directory \
\N\{QUOTATION MARK\}\{docs_dir\}\N\{QUOTATION MARK\} 0\n\n" +\
"=" * 120)'
changedir = {toxinidir}/docs
isolated_build = true
passenv =
SPHINX_BUILDER
SPHINX_BUILD_OUTPUT_DIRECTORY
SSH_AUTH_SOCK
skip_install = true

Expand Down