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.
This commit is contained in:
parent
c6da3e9ebe
commit
c345267313
@ -27,8 +27,9 @@ from app.database import Base, engine, SessionLocal, load_sample_data
|
|||||||
# Utility function to fetch metadata from pyproject.toml
|
# Utility function to fetch metadata from pyproject.toml
|
||||||
def get_project_metadata():
|
def get_project_metadata():
|
||||||
# Dynamically resolve the correct path to pyproject.toml
|
# Dynamically resolve the correct path to pyproject.toml
|
||||||
current_dir = Path(__file__).resolve().parent
|
root_dir = (
|
||||||
root_dir = current_dir.parent.parent # Adjust based on structure
|
Path(__file__).resolve().parent.parent.parent
|
||||||
|
) # Adjust path to project root
|
||||||
pyproject_path = root_dir / "pyproject.toml"
|
pyproject_path = root_dir / "pyproject.toml"
|
||||||
|
|
||||||
if not pyproject_path.exists():
|
if not pyproject_path.exists():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user