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

Function render_pep440

versioneer.py:1435–1456  ·  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

1433
1434
1435def render_pep440(pieces):
1436 """Build up version string, with post-release "local version identifier".
1437
1438 Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you
1439 get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty
1440
1441 Exceptions:
1442 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]
1443 """
1444 if pieces["closest-tag"]:
1445 rendered = pieces["closest-tag"]
1446 if pieces["distance"] or pieces["dirty"]:
1447 rendered += plus_or_dot(pieces)
1448 rendered += "%d.g%s" % (pieces["distance"], pieces["short"])
1449 if pieces["dirty"]:
1450 rendered += ".dirty"
1451 else:
1452 # exception #1
1453 rendered = "0+untagged.%d.g%s" % (pieces["distance"], pieces["short"])
1454 if pieces["dirty"]:
1455 rendered += ".dirty"
1456 return rendered
1457
1458
1459def 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…