From 245f9efef321159088fb9810299807f3b06cfcf7 Mon Sep 17 00:00:00 2001 From: James B Date: Fri, 27 Sep 2024 11:55:52 +0100 Subject: [PATCH 1/2] docs: Switch to ODSC theme & config --- .readthedocs.yaml | 11 +++++++---- docs/conf.py | 2 ++ setup.py | 9 ++++++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index c4752a6..3d5c50e 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,7 +7,7 @@ version: 2 # Set the version of Python and other tools you might need build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: python: "3.9" @@ -17,6 +17,9 @@ sphinx: # We recommend specifying your dependencies to enable reproducible builds: # https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html -# python: -# install: -# - requirements: docs/requirements.txt +python: + install: + - method: pip + path: . + extra_requirements: + - dev diff --git a/docs/conf.py b/docs/conf.py index a7749a1..2152b6f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,3 +1,5 @@ project = "LibCoveWeb2" master_doc = "index" + +html_theme = "odsc_default_sphinx_theme" diff --git a/setup.py b/setup.py index cfc59f1..3ffd0ac 100644 --- a/setup.py +++ b/setup.py @@ -31,6 +31,13 @@ "celery[redis]", ], extras_require={ - "dev": ["black", "isort", "flake8", "mypy"], + "dev": [ + "black", + "isort", + "flake8", + "mypy", + "sphinx", + "odsc-default-sphinx-theme", + ], }, ) From 4fd78e684e798a0dcef1efd6ef908a1e087b68c4 Mon Sep 17 00:00:00 2001 From: James B Date: Fri, 27 Sep 2024 12:01:10 +0100 Subject: [PATCH 2/2] black: changes due to latest version of black --- libcoveweb2/templatetags/cove_tags.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libcoveweb2/templatetags/cove_tags.py b/libcoveweb2/templatetags/cove_tags.py index 0cbff92..6ed4f76 100644 --- a/libcoveweb2/templatetags/cove_tags.py +++ b/libcoveweb2/templatetags/cove_tags.py @@ -15,15 +15,15 @@ def cove_modal_list(**kw): @register.inclusion_tag("modal_errors.html") def cove_modal_errors(**context): if hasattr(settings, "VALIDATION_ERROR_LOCATIONS_LENGTH"): - context[ - "validation_error_locations_length" - ] = settings.VALIDATION_ERROR_LOCATIONS_LENGTH + context["validation_error_locations_length"] = ( + settings.VALIDATION_ERROR_LOCATIONS_LENGTH + ) else: context["validation_error_locations_length"] = 1000 if hasattr(settings, "VALIDATION_ERROR_LOCATIONS_SAMPLE"): - context[ - "validation_error_locations_sample" - ] = settings.VALIDATION_ERROR_LOCATIONS_SAMPLE + context["validation_error_locations_sample"] = ( + settings.VALIDATION_ERROR_LOCATIONS_SAMPLE + ) return context