From 5fe55ef159ca81347ac56b95d1dc731660c9c864 Mon Sep 17 00:00:00 2001 From: Richard Giliam Date: Wed, 21 May 2025 14:39:20 -0700 Subject: [PATCH 1/3] Add configuration for readthedocs, and update sphinx config to point to our python module --- .readthedocs.yaml | 35 +++++++++++++++++++++++++++++++++++ docs/conf.py | 4 ++-- 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 000000000..31dbf0d70 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,35 @@ +# Read the Docs configuration file for Sphinx projects +# 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" + # You can also specify other tool versions: + # nodejs: "20" + # rust: "1.70" + # golang: "1.20" + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: docs/conf.py + # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs + # builder: "dirhtml" + # Fail on all warnings to avoid broken references + # fail_on_warning: true + +# 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 70c3c603d..d5daa046f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,7 +14,7 @@ # import os import sys -sys.path.insert(0, os.path.abspath('../')) +sys.path.insert(0, os.path.abspath('../src-python')) # -- Project information ----------------------------------------------------- @@ -166,4 +166,4 @@ # -- Options for todo extension ---------------------------------------------- # If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = True \ No newline at end of file +todo_include_todos = True From 8c2e4032d5398484ecd51b016065bbad27e36ad2 Mon Sep 17 00:00:00 2001 From: Richard Giliam Date: Wed, 21 May 2025 14:40:35 -0700 Subject: [PATCH 2/3] Add requirements for doc build --- docs/requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/requirements.txt diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 000000000..6c5d5d44e --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1 @@ +sphinx-rtd-theme From dad460f63ff6efc6f900eea331306a60deda75ef Mon Sep 17 00:00:00 2001 From: Richard Giliam Date: Wed, 21 May 2025 14:49:19 -0700 Subject: [PATCH 3/3] Pull doc versions from python module --- docs/conf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index d5daa046f..0faff916c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,6 +16,8 @@ import sys sys.path.insert(0, os.path.abspath('../src-python')) +from amazon.ion import __version__ + # -- Project information ----------------------------------------------------- @@ -24,9 +26,9 @@ author = 'Amazon Ion Team' # The short X.Y version -version = '' +version = __version__ # The full version, including alpha/beta/rc tags -release = '0.3.2' +release = version # -- General configuration ---------------------------------------------------