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

Function render_pep440_post

monai/_version.py:460–484  ·  view source on GitHub ↗

TAG[.postDISTANCE[.dev0]+gHEX] . The ".dev0" means dirty. Note that .dev0 sorts backwards (a dirty tree will appear "older" than the corresponding clean one), but you shouldn't be releasing software with -dirty anyways. Exceptions: 1: no tags. 0.postDISTANCE[.dev0]

(pieces)

Source from the content-addressed store, hash-verified

458
459
460def render_pep440_post(pieces):
461 """TAG[.postDISTANCE[.dev0]+gHEX] .
462
463 The ".dev0" means dirty. Note that .dev0 sorts backwards
464 (a dirty tree will appear "older" than the corresponding clean one),
465 but you shouldn't be releasing software with -dirty anyways.
466
467 Exceptions:
468 1: no tags. 0.postDISTANCE[.dev0]
469 """
470 if pieces["closest-tag"]:
471 rendered = pieces["closest-tag"]
472 if pieces["distance"] or pieces["dirty"]:
473 rendered += ".post%d" % pieces["distance"]
474 if pieces["dirty"]:
475 rendered += ".dev0"
476 rendered += plus_or_dot(pieces)
477 rendered += "g%s" % pieces["short"]
478 else:
479 # exception #1
480 rendered = "0.post%d" % pieces["distance"]
481 if pieces["dirty"]:
482 rendered += ".dev0"
483 rendered += "+g%s" % pieces["short"]
484 return rendered
485
486
487def render_pep440_post_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…