Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit e4b2a151 authored by GotthardG's avatar GotthardG
Browse files

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.
parent 5dff380c
No related branches found
No related tags found
No related merge requests found
Pipeline #44736 failed
......@@ -26,7 +26,15 @@ from app.database import Base, engine, SessionLocal, load_sample_data
# Utility function to fetch metadata from pyproject.toml
def get_project_metadata():
with open("pyproject.toml", "rb") as f:
# Dynamically resolve the correct path to pyproject.toml
current_dir = Path(__file__).resolve().parent
root_dir = current_dir.parent.parent # Adjust based on structure
pyproject_path = root_dir / "pyproject.toml"
if not pyproject_path.exists():
raise FileNotFoundError(f"pyproject.toml not found at {pyproject_path}")
with open(pyproject_path, "rb") as f:
pyproject = tomllib.load(f)
name = pyproject["project"]["name"]
version = pyproject["project"]["version"]
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment