diff --git a/docs/source/conf.py b/docs/source/conf.py index e32a765..e661d48 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -5,8 +5,12 @@ import os import sys +from pathlib import Path -sys.path.append(os.path.join(os.path.dirname(__file__), "../..")) +import toml + +project_root = Path(__file__).parents[2] +sys.path.append(str(project_root)) # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information @@ -14,7 +18,11 @@ sys.path.append(os.path.join(os.path.dirname(__file__), "../..")) project = "jubeatools" copyright = "2022, Stepland" author = "Stepland" -release = "1.4.0" + +with open(project_root / "pyproject.toml") as f: + pyproject = toml.load(f) + +release = pyproject["tool"]["poetry"]["version"] # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration