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

Function get_version

methods/MIRIX/scripts/packaging/setup_client.py:65–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

setup_client.pyFile · 0.70

Calls 3

searchMethod · 0.65
joinMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected