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

Function render_pep440_pre

monai/_version.py:436–457  ·  view source on GitHub ↗

TAG[.postN.devDISTANCE] -- No -dirty. Exceptions: 1: no tags. 0.post0.devDISTANCE

(pieces)

Source from the content-addressed store, hash-verified

434
435
436def render_pep440_pre(pieces):
437 """TAG[.postN.devDISTANCE] -- No -dirty.
438
439 Exceptions:
440 1: no tags. 0.post0.devDISTANCE
441 """
442 if pieces["closest-tag"]:
443 if pieces["distance"]:
444 # update the post release segment
445 tag_version, post_version = pep440_split_post(pieces["closest-tag"])
446 rendered = tag_version
447 if post_version is not None:
448 rendered += ".post%d.dev%d" % (post_version + 1, pieces["distance"])
449 else:
450 rendered += ".post0.dev%d" % (pieces["distance"])
451 else:
452 # no commits, use the tag as the version
453 rendered = pieces["closest-tag"]
454 else:
455 # exception #1
456 rendered = "0.post0.dev%d" % pieces["distance"]
457 return rendered
458
459
460def render_pep440_post(pieces):

Callers 1

renderFunction · 0.70

Calls 1

pep440_split_postFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…