MCPcopy
hub / github.com/dataelement/Clawith / _read_version

Function _read_version

backend/app/config.py:65–74  ·  view source on GitHub ↗

Read version from local VERSION file, fallback to root.

()

Source from the content-addressed store, hash-verified

63
64
65def _read_version() -> str:
66 """Read version from local VERSION file, fallback to root."""
67 for candidate in [Path(__file__).resolve().parent.parent / "VERSION",
68 Path(__file__).resolve().parent.parent.parent / "VERSION",
69 Path("/app/VERSION"), Path("/VERSION")]:
70 try:
71 return candidate.read_text(encoding="utf-8").strip()
72 except OSError:
73 continue
74 return "0.0.0"
75
76
77class Settings(BaseSettings):

Callers 1

SettingsClass · 0.85

Calls 1

read_textMethod · 0.80

Tested by

no test coverage detected