maple.utils.spec.parse_versioned

maple.utils.spec.parse_versioned(spec: str) tuple[str, str]

Parse a versioned specification string into name and version components.

Splits a colon-separated specification into its name and version parts. If no version is specified, defaults to ‘latest’. Used for parsing model specifications, package versions, or other versioned identifiers.

Parameters:

spec – Versioned specification string in format ‘name:version’ or ‘name’.

Returns:

Tuple of (name, version) where version is ‘latest’ if not specified.