MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / get_version

Function get_version

methods/MIRIX/scripts/packaging/setup_server.py:63–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61
62# Get version from command line or __init__.py
63def get_version():
64 # If version was provided via command line, use that
65 if version is not None:
66 return version
67
68 # Otherwise, fall back to reading from __init__.py
69 import re
70
71 version_file = os.path.join(project_root, "mirix", "__init__.py")
72 with open(version_file, "r", encoding="utf-8") as version_f:
73 version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_f.read(), re.M)
74 if version_match:
75 return version_match.group(1)
76 raise RuntimeError("Unable to find version string.")
77
78
79# Server dependencies (comprehensive)

Callers 1

setup_server.pyFile · 0.70

Calls 3

searchMethod · 0.65
joinMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected