From efefba841bbda482f53e12e00f880cea9d511880 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 2 Oct 2024 10:12:14 -0500 Subject: [PATCH 1/3] PYTHON-4696 Add ReadTheDocs Config --- .readthedocs.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 000000000..7fc91ddb3 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,25 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Build documentation in the doc/ directory with Sphinx +sphinx: + configuration: doc/source/conf.py + fail_on_warning: true + +# Set the version of Python and requirements required to build the docs. +python: + install: + # Install pymongo itself. + - method: pip + path: . + extra_requirements: + - docs + +build: + os: ubuntu-22.04 + tools: + python: "3.11" From c8de6271c2df8db18d8bb055ca6ff06c545c99cd Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 2 Oct 2024 10:13:29 -0500 Subject: [PATCH 2/3] fix path --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 7fc91ddb3..b0d2edf9b 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,7 +7,7 @@ version: 2 # Build documentation in the doc/ directory with Sphinx sphinx: - configuration: doc/source/conf.py + configuration: docs/source/conf.py fail_on_warning: true # Set the version of Python and requirements required to build the docs. From 256fbff6037a5f57da567f11c6b2ba0be655a336 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 2 Oct 2024 10:19:12 -0500 Subject: [PATCH 3/3] handle warnings and version --- docs/source/conf.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 323bd28c1..b8c7862d8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -7,17 +7,19 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information from __future__ import annotations +from importlib.metadata import version as _version + project = "django_mongodb" copyright = "2024, The MongoDB Python Team" author = "The MongoDB Python Team" -release = "0.1.0.dev0" +release = _version("django_mongodb") # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration extensions = [] -templates_path = ["_templates"] +# templates_path = ["_templates"] exclude_patterns = [] @@ -25,4 +27,4 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output html_theme = "alabaster" -html_static_path = ["_static"] +# html_static_path = ["_static"]