diff --git a/.readthedocs.yaml b/.readthedocs.yaml index e6bf1bb..f72c324 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -20,4 +20,3 @@ sphinx: # python: # install: # - requirements: docs/requirements.txt - diff --git a/docs/conf.py b/docs/conf.py index acf6bed..1456ad7 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,9 +20,13 @@ import os import sys +import tomli + sys.path.insert(0, os.path.abspath("..")) -import houseplant +# Read version from pyproject.toml +with open("../pyproject.toml", "rb") as f: + pyproject = tomli.load(f) # -- General configuration --------------------------------------------- @@ -60,9 +64,9 @@ # the built documents. # # The short X.Y version. -version = houseplant.__version__ +version = pyproject["project"]["version"] # The full version, including alpha/beta/rc tags. -release = houseplant.__version__ +release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/pyproject.toml b/pyproject.toml index bf2ea9b..5a15b3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,4 +43,5 @@ dev = [ "ruff", # linting "isort", # linting "sphinx", # documentation + "tomli", # documentation ]