libera_utils.io.filenaming.format_semantic_version#

libera_utils.io.filenaming.format_semantic_version(semantic_version: str) str#

Formats a semantic version string X.Y.Z into a filename-compatible string like VX-Y-Z, for X = major version, Y = minor version, Z = patch.

Result is uppercase. Release candidate suffixes are allowed as no strict checking is done on the contents of X, Y, or Z. e.g. 1.2.3rc1 becomes V1-2-3RC1

Parameters:

semantic_version (str) – String matching X.Y.Z where X, Y and Z are integers of any length

Return type:

str