From 64f7e249a07fb5e11933fb5aeb6a256472ff8ed3 Mon Sep 17 00:00:00 2001 From: Adam Mitchell Date: Wed, 28 May 2025 21:07:39 +0000 Subject: [PATCH 1/2] readthedocs boilerplate --- .readthedocs.yaml | 13 +++++++++++++ docs/Makefile | 20 ++++++++++++++++++++ docs/{ => legacy}/cli.md | 0 docs/{ => legacy}/index.md | 0 docs/{ => legacy}/python.md | 0 docs/{ => legacy}/request.md | 0 docs/{ => legacy}/response.md | 0 docs/{ => legacy}/status.md | 0 docs/{ => legacy}/thingset.md | 0 docs/{ => legacy}/value.md | 0 docs/make.bat | 35 +++++++++++++++++++++++++++++++++++ docs/requirements.txt | 2 ++ docs/source/conf.py | 35 +++++++++++++++++++++++++++++++++++ docs/source/index.rst | 4 ++++ 14 files changed, 109 insertions(+) create mode 100644 .readthedocs.yaml create mode 100644 docs/Makefile rename docs/{ => legacy}/cli.md (100%) rename docs/{ => legacy}/index.md (100%) rename docs/{ => legacy}/python.md (100%) rename docs/{ => legacy}/request.md (100%) rename docs/{ => legacy}/response.md (100%) rename docs/{ => legacy}/status.md (100%) rename docs/{ => legacy}/thingset.md (100%) rename docs/{ => legacy}/value.md (100%) create mode 100644 docs/make.bat create mode 100644 docs/requirements.txt create mode 100644 docs/source/conf.py create mode 100644 docs/source/index.rst diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..3a7e5af --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,13 @@ +version: "2" + +build: + os: "ubuntu-22.04" + tools: + python: "3.10" + +python: + install: + - requirements: docs/requirements.txt + +sphinx: + configuration: docs/source/conf.py \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/cli.md b/docs/legacy/cli.md similarity index 100% rename from docs/cli.md rename to docs/legacy/cli.md diff --git a/docs/index.md b/docs/legacy/index.md similarity index 100% rename from docs/index.md rename to docs/legacy/index.md diff --git a/docs/python.md b/docs/legacy/python.md similarity index 100% rename from docs/python.md rename to docs/legacy/python.md diff --git a/docs/request.md b/docs/legacy/request.md similarity index 100% rename from docs/request.md rename to docs/legacy/request.md diff --git a/docs/response.md b/docs/legacy/response.md similarity index 100% rename from docs/response.md rename to docs/legacy/response.md diff --git a/docs/status.md b/docs/legacy/status.md similarity index 100% rename from docs/status.md rename to docs/legacy/status.md diff --git a/docs/thingset.md b/docs/legacy/thingset.md similarity index 100% rename from docs/thingset.md rename to docs/legacy/thingset.md diff --git a/docs/value.md b/docs/legacy/value.md similarity index 100% rename from docs/value.md rename to docs/legacy/value.md diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..9534b01 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..53fc1f3 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +sphinx==7.1.2 +sphinx-rtd-theme==1.3.0rc1 diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..81ea2f6 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,35 @@ +# Configuration file for the Sphinx documentation builder. + +# -- Project information + +project = 'python_thingset' +copyright = '2025' +author = 'Adam Mitchell' + +release = '0.1' +version = '0.1.0' + +# -- General configuration + +extensions = [ + 'sphinx.ext.duration', + 'sphinx.ext.doctest', + 'sphinx.ext.autodoc', + 'sphinx.ext.autosummary', + 'sphinx.ext.intersphinx', +] + +intersphinx_mapping = { + 'python': ('https://docs.python.org/3/', None), + 'sphinx': ('https://www.sphinx-doc.org/en/master/', None), +} +intersphinx_disabled_domains = ['std'] + +templates_path = ['_templates'] + +# -- Options for HTML output + +html_theme = 'sphinx_rtd_theme' + +# -- Options for EPUB output +epub_show_urls = 'footnote' diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..a744f72 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,4 @@ +python_thingset +=============== + +Hello, world! From 6989d1c478d2bcd4eda2c1a8fec43beffcaaff53 Mon Sep 17 00:00:00 2001 From: Adam Mitchell Date: Fri, 30 May 2025 12:33:54 +0000 Subject: [PATCH 2/2] RTD updates --- .readthedocs.yaml | 2 +- docs/source/conf.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 3a7e5af..9138a7f 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,4 +10,4 @@ python: - requirements: docs/requirements.txt sphinx: - configuration: docs/source/conf.py \ No newline at end of file + configuration: docs/source/conf.py diff --git a/docs/source/conf.py b/docs/source/conf.py index 81ea2f6..2e10c5e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -7,7 +7,7 @@ author = 'Adam Mitchell' release = '0.1' -version = '0.1.0' +version = '0.2.3' # -- General configuration