MCPcopy
hub / github.com/huggingface/alignment-handbook / get_version

Function get_version

src/alignment/release.py:65–70  ·  view source on GitHub ↗

Reads the current version in the __init__.

()

Source from the content-addressed store, hash-verified

63
64
65def get_version():
66 """Reads the current version in the __init__."""
67 with open(REPLACE_FILES["init"], "r") as f:
68 code = f.read()
69 default_version = REPLACE_PATTERNS["init"][0].search(code).groups()[0]
70 return packaging.version.parse(default_version)
71
72
73def pre_release_work(patch=False):

Callers 2

pre_release_workFunction · 0.85
post_release_workFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected