MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / render_git_describe

Function render_git_describe

monai/_version.py:538–555  ·  view source on GitHub ↗

TAG[-DISTANCE-gHEX][-dirty]. Like 'git describe --tags --dirty --always'. Exceptions: 1: no tags. HEX[-dirty] (note: no 'g' prefix)

(pieces)

Source from the content-addressed store, hash-verified

536
537
538def render_git_describe(pieces):
539 """TAG[-DISTANCE-gHEX][-dirty].
540
541 Like 'git describe --tags --dirty --always'.
542
543 Exceptions:
544 1: no tags. HEX[-dirty] (note: no 'g' prefix)
545 """
546 if pieces["closest-tag"]:
547 rendered = pieces["closest-tag"]
548 if pieces["distance"]:
549 rendered += "-%d-g%s" % (pieces["distance"], pieces["short"])
550 else:
551 # exception #1
552 rendered = pieces["short"]
553 if pieces["dirty"]:
554 rendered += "-dirty"
555 return rendered
556
557
558def render_git_describe_long(pieces):

Callers 1

renderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…