From dbde01435835b3c90476bc7a4eb13803cfe0db79 Mon Sep 17 00:00:00 2001 From: Marika Marszalkowski Date: Mon, 20 Jul 2026 10:56:26 +0200 Subject: [PATCH] chore: fix documentation generatrion for gen --- packages/gen/docs/source/conf.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/gen/docs/source/conf.py b/packages/gen/docs/source/conf.py index a9319dd..c52a36f 100644 --- a/packages/gen/docs/source/conf.py +++ b/packages/gen/docs/source/conf.py @@ -9,6 +9,7 @@ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. +import importlib.metadata import pathlib import sys sys.path.insert(0, pathlib.Path(__file__).parents[2].resolve().as_posix()) @@ -19,15 +20,7 @@ copyright = '2026, SAP SE' author = 'SAP SE' -# The full version, including alpha/beta/rc tags -VERSION_FILE = '../../version.txt' - -def get_version(version_file=VERSION_FILE): - with open(version_file, encoding='utf-8-sig', mode='r') as ver_file: - version_str = ver_file.readline().rstrip() - return version_str - -release = get_version() +release = importlib.metadata.version('sap-ai-sdk-gen') # -- General configuration ---------------------------------------------------