From 5c1c6491a8d52dfc7d95b4e4d96bc727bb18b5da Mon Sep 17 00:00:00 2001 From: John Hawkins Date: Fri, 3 May 2024 12:01:48 +1000 Subject: [PATCH] Sorting out documentation --- .gitignore | 1 + .readthedocs.yaml | 29 +++++++++++++++++++++++++++++ docs/requirements.txt | 2 ++ docs/source/conf.py | 10 ++++++++-- 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 .readthedocs.yaml create mode 100644 docs/requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5509140 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.DS_Store diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..0e1be93 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,29 @@ +# .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 version of Python and other tools you might need +build: + os: ubuntu-20.04 + tools: + python: "3.9" + # You can also specify other tool versions: + # nodejs: "16" + # rust: "1.55" + # golang: "1.17" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/source/conf.py + +# If using Sphinx, optionally build your docs in additional formats such as PDF +# formats: +# - pdf + +# Optionally declare the Python requirements required to build your docs +python: + install: + - requirements: docs/requirements.txt diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..f78c041 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +sphinx==6.2.1 +sphinx-rtd-theme==1.2.2 diff --git a/docs/source/conf.py b/docs/source/conf.py index 8ad5375..2f5a127 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -12,6 +12,7 @@ # import os import sys +import sphinx_rtd_theme sys.path.insert(0, os.path.abspath('../../')) # -- Project information ----------------------------------------------------- @@ -21,7 +22,7 @@ author = 'John Hawkins' # The full version, including alpha/beta/rc tags -release = '0.1.0' +release = '0.1.12' # -- General configuration --------------------------------------------------- @@ -29,7 +30,12 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.autodoc'] +extensions = [ + 'sphinx_rtd_theme', + 'sphinx.ext.todo', + 'sphinx.ext.viewcode', + 'sphinx.ext.autodoc' +] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates']