Documentation from a PR for testing
It seems that for some reason the new addons are not being shown on PR: https://github.com/readthedocs/readthedocs.org/issues/10706
Read the Docs configuration file used to build this docs:
1version: 2
2
3build:
4 os: ubuntu-22.04
5 tools:
6 python: "3"
7 commands:
8 # Run all the commands manually to avoid installing pre-defined packages
9 # Make explicit what are the dependencies we are installing
10 - pip install sphinx sphinx-autorun sphinx-rtd-theme
11 - sphinx-build -b html docs/ $READTHEDOCS_OUTPUT/html
Sphinx configuration file used to build this docs (see full file),
1import os
2
3# Default settings
4project = 'Test Builds'
5extensions = [
6 'sphinx_autorun',
7]
8
9# Include all your settings here
10html_theme = 'sphinx_rtd_theme'
11
12template_path = [
13 "templates",
14]
15
16# We need to tell to our builder that we are building on Read the Docs
17# Ideally, the theme should get this automatically from the environment
18# instead of forcing us to define it on its context
19#
20# Note that Read the Docs is passing a lot of context here:
21# https://github.com/readthedocs/readthedocs.org/blob/e18b40f6fe7c2c058bbf681063c1c577b5e8e9d3/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl#L99-L149
22# We would need to audit all of it, remove the ones that are not required,
23# and adapt our Sphinx theme to use environment variables --which will be the
24# official way to communicate with all the builders
25#
26# For now, I'm only defining the variables I need to build the `versions.html` from the theme
27# https://github.com/readthedocs/sphinx_rtd_theme/blob/9d88b9e4e1e17896c6231358a89da4612ff7bc90/sphinx_rtd_theme/versions.html#L1
28# Note that everything from inside "rst-other-versions" is gonna be replaced by the `/footer_html/` response,
29# so they are not needed to be defined.
30# if "READTHEDOCS" in os.environ:
31# html_context = {
32# "READTHEDOCS": True,
33# "current_version": os.environ.get('READTHEDOCS_VERSION'),
34# }
>>> # Build at
>>> import datetime
>>> datetime.datetime.utcnow() # UTC
datetime.datetime(2023, 9, 5, 12, 54, 36, 610324)