From 8bfa107c5a0ca222f1339fba35f93a7c2c4c0151 Mon Sep 17 00:00:00 2001 From: James B Date: Thu, 3 Oct 2024 11:19:12 +0100 Subject: [PATCH 1/2] docs: Add .readthedocs.yaml & switch to our theme --- .readthedocs.yaml | 26 ++++++++++++++++++++++++++ docs/conf.py | 12 ++---------- requirements_dev.in | 2 +- requirements_dev.txt | 23 +++++++++++++++-------- 4 files changed, 44 insertions(+), 19 deletions(-) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 000000000..a659ae180 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,26 @@ +# .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-24.04 + tools: + python: "3.11" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + builder: dirhtml + +# We recommend specifying your dependencies to enable reproducible builds: +# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: requirements_dev.txt + + + diff --git a/docs/conf.py b/docs/conf.py index e85237796..74ceb2ba4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,7 +17,6 @@ # 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. # -import os # import sys # sys.path.insert(0, os.path.abspath('.')) from recommonmark.transform import AutoStructify @@ -121,18 +120,11 @@ # -- Options for HTML output ---------------------------------------------- -# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' - -if not on_rtd: # only import and set the theme if we're building docs locally - import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -#html_theme = 'alabaster' +html_theme = "odsc_default_sphinx_theme" + # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/requirements_dev.in b/requirements_dev.in index 3e29bcacb..2e1558761 100644 --- a/requirements_dev.in +++ b/requirements_dev.in @@ -12,5 +12,5 @@ transifex-client libsass Sphinx recommonmark -sphinx_rtd_theme +odsc-default-sphinx-theme hypothesis diff --git a/requirements_dev.txt b/requirements_dev.txt index 6c4192f71..8d42dc60d 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -30,6 +30,8 @@ backports-datetime-fromisoformat==2.0.1 # via # -r requirements.txt # flattentool +beautifulsoup4==4.12.3 + # via furo behave==1.2.5 # via # -r requirements.txt @@ -100,7 +102,6 @@ docutils==0.20.1 # via # recommonmark # sphinx - # sphinx-rtd-theme et-xmlfile==1.1.0 # via # -r requirements.txt @@ -114,6 +115,8 @@ flattentool==0.26.0 # -r requirements.txt # libcove # libcoveweb +furo==2024.8.6 + # via odsc-default-sphinx-theme gunicorn==23.0.0 # via -r requirements.txt h11==0.14.0 @@ -175,6 +178,8 @@ odfpy==1.4.1 # via # -r requirements.txt # flattentool +odsc-default-sphinx-theme==0.0.1 + # via -r requirements_dev.in openpyxl==3.1.5 # via # -r requirements.txt @@ -216,7 +221,9 @@ pycparser==2.22 pyflakes==3.2.0 # via flake8 pygments==2.18.0 - # via sphinx + # via + # furo + # sphinx pysocks==1.7.1 # via urllib3 pytest==8.3.2 @@ -301,22 +308,22 @@ sortedcontainers==2.4.0 # via # hypothesis # trio +soupsieve==2.6 + # via beautifulsoup4 sphinx==7.4.7 # via # -r requirements_dev.in + # furo # recommonmark - # sphinx-rtd-theme - # sphinxcontrib-jquery -sphinx-rtd-theme==2.0.0 - # via -r requirements_dev.in + # sphinx-basic-ng +sphinx-basic-ng==1.0.0b2 + # via furo sphinxcontrib-applehelp==2.0.0 # via sphinx sphinxcontrib-devhelp==2.0.0 # via sphinx sphinxcontrib-htmlhelp==2.1.0 # via sphinx -sphinxcontrib-jquery==4.1 - # via sphinx-rtd-theme sphinxcontrib-jsmath==1.0.1 # via sphinx sphinxcontrib-qthelp==2.0.0 From 521e5dfe52f13aabb64a942f8da21fa82aa011aa Mon Sep 17 00:00:00 2001 From: James B Date: Thu, 3 Oct 2024 11:33:13 +0100 Subject: [PATCH 2/2] .python-version: Add this file for pyenv --- .python-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .python-version diff --git a/.python-version b/.python-version new file mode 100644 index 000000000..2c0733315 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.11