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

Function render_git_describe_long

monai/_version.py:558–575  ·  view source on GitHub ↗

TAG-DISTANCE-gHEX[-dirty]. Like 'git describe --tags --dirty --always -long'. The distance/hash is unconditional. Exceptions: 1: no tags. HEX[-dirty] (note: no 'g' prefix)

(pieces)

Source from the content-addressed store, hash-verified

556
557
558def render_git_describe_long(pieces):
559 """TAG-DISTANCE-gHEX[-dirty].
560
561 Like 'git describe --tags --dirty --always -long'.
562 The distance/hash is unconditional.
563
564 Exceptions:
565 1: no tags. HEX[-dirty] (note: no 'g' prefix)
566 """
567 if pieces["closest-tag"]:
568 rendered = pieces["closest-tag"]
569 rendered += "-%d-g%s" % (pieces["distance"], pieces["short"])
570 else:
571 # exception #1
572 rendered = pieces["short"]
573 if pieces["dirty"]:
574 rendered += "-dirty"
575 return rendered
576
577
578def render(pieces, style):

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…