diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 000000000..b0d2edf9b --- /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: docs/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" 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"]