Problem
The version "0.1.0" is hardcoded as a string literal in two places in main.py:
- Line 11:
version="0.1.0" (FastAPI app)
- Line 39:
"version": "0.1.0" (root endpoint response)
These will drift from the canonical version in pyproject.toml.
Suggested Fix
Use importlib.metadata.version("hier-config-api") to read the version from the installed package metadata, or use a single __version__ constant in __init__.py.
Problem
The version
"0.1.0"is hardcoded as a string literal in two places inmain.py:version="0.1.0"(FastAPI app)"version": "0.1.0"(root endpoint response)These will drift from the canonical version in
pyproject.toml.Suggested Fix
Use
importlib.metadata.version("hier-config-api")to read the version from the installed package metadata, or use a single__version__constant in__init__.py.