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

Function render_pep440

monai/_version.py:371–393  ·  view source on GitHub ↗

Build up version string, with post-release "local version identifier". Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty Exceptions: 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]

(pieces)

Source from the content-addressed store, hash-verified

369
370
371def render_pep440(pieces):
372 """Build up version string, with post-release "local version identifier".
373
374 Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you
375 get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty
376
377 Exceptions:
378 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]
379 """
380 if pieces["closest-tag"]:
381 rendered = pieces["closest-tag"]
382 if pieces["distance"] or pieces["dirty"]:
383 rendered += plus_or_dot(pieces)
384 rendered += "%d.g%s" % (pieces["distance"], pieces["short"])
385 if pieces["dirty"]:
386 rendered += ".dirty"
387 else:
388 # exception #1
389 rendered = "0+untagged.%d.g%s" % (pieces["distance"],
390 pieces["short"])
391 if pieces["dirty"]:
392 rendered += ".dirty"
393 return rendered
394
395
396def render_pep440_branch(pieces):

Callers 1

renderFunction · 0.70

Calls 1

plus_or_dotFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…