diff --git a/.readthedocs.yml b/.readthedocs.yml index 9c3144b9..7cfe4697 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -4,6 +4,7 @@ formats: all sphinx: configuration: docs/source/conf.py + fail_on_warning: true build: @@ -13,6 +14,6 @@ build: jobs: install: - pip install --upgrade pip - - pip install --group 'docs' + - pip install . --group 'docs' pre_build: - python -m sphinx -b linkcheck docs/source/ $READTHEDOCS_OUTPUT/linkcheck diff --git a/docs/source/conf.py b/docs/source/conf.py index 03e44d95..bea0bac8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -12,6 +12,7 @@ # import os import sys +from importlib.metadata import version as package_version sys.path.insert(0, os.path.abspath("..")) # Will find modules in the docs parent @@ -21,6 +22,8 @@ sys.path.insert(0, os.path.abspath("..")) # Will find modules in the docs paren project = "python-kasa" copyright = "2020, python-kasa developers" author = "python-kasa developers" +release = package_version("python-kasa") +version = release # -- General configuration ---------------------------------------------------