From c34526731395c82afee26bf0ce8c90364d0d3521 Mon Sep 17 00:00:00 2001 From: GotthardG <51994228+GotthardG@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:33:15 +0100 Subject: [PATCH] Sync project metadata with `pyproject.toml` Updated scripts and backend to dynamically retrieve project name and version from `pyproject.toml`. This ensures consistent metadata across the OpenAPI client generation and the FastAPI application. --- backend/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/main.py b/backend/main.py index 8235563..990e1ad 100644 --- a/backend/main.py +++ b/backend/main.py @@ -27,8 +27,9 @@ from app.database import Base, engine, SessionLocal, load_sample_data # Utility function to fetch metadata from pyproject.toml def get_project_metadata(): # Dynamically resolve the correct path to pyproject.toml - current_dir = Path(__file__).resolve().parent - root_dir = current_dir.parent.parent # Adjust based on structure + root_dir = ( + Path(__file__).resolve().parent.parent.parent + ) # Adjust path to project root pyproject_path = root_dir / "pyproject.toml" if not pyproject_path.exists():