diff --git a/docs/__init__.py b/docs/__init__.py deleted file mode 100644 index a772c38..0000000 --- a/docs/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -import toml - -with open("pyproject.toml") as f: - config = toml.load(f) - -version = config["project"]["version"] - -__version__ = version \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 0e92290..eda415d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,4 @@ -from . import __version__ +import toml # Configuration file for the Sphinx documentation builder. # @@ -8,10 +8,17 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information +# Read version from pyproject.toml + +with open("pyproject.toml") as f: + config = toml.load(f) + +version = config["project"]["version"] + project = "NetcdfData Microservice" copyright = "2024, IHCantabria" author = "IHCantabria" -release = __version__ +release = version # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration