From 92415c16ba668d021b704cc697738ffe32839ce3 Mon Sep 17 00:00:00 2001 From: David Lobato Date: Tue, 25 Jun 2024 09:59:07 +0100 Subject: [PATCH] Add rtd config --- .readthedocs.yml | 31 +++++++++++++++++++++++++++++++ docs/conf.py | 4 +--- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 .readthedocs.yml diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..2421d02 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,31 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.12" + jobs: + pre_build: + - cd docs && make actionlinks + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: docs/conf.py + +# Optionally build your docs in additional formats such as PDF and ePub +# formats: +# - pdf +# - epub + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: docs/requirements.txt diff --git a/docs/conf.py b/docs/conf.py index f4aaa4d..2d0ec7d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -34,7 +34,6 @@ sys.path.insert(0, os.path.join("client")) sys.path.insert(0, os.path.abspath("..")) - # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -82,7 +81,7 @@ release = open("../VERSION").read().split()[0].strip() # Assume PEP 440 version strings -p = re.compile("(\d+!)?((\d+)(.\d+)*(.\d+)*)(.?[a|b|rc]\d*)?(.post\d*)?(.dev\d*)?", re.IGNORECASE) +p = re.compile(r"(\d+!)?((\d+)(.\d+)*(.\d+)*)(.?(a|b|rc)\d*)?(.post\d*)?(.dev\d*)?", re.IGNORECASE) vers = p.search(release) version = vers.group(2) @@ -207,7 +206,6 @@ # Output file base name for HTML help builder. htmlhelp_basename = "ZTPServerdoc" - # -- Options for LaTeX output -------------------------------------------------- latex_elements = {