weldx.asdf.util.get_highest_tag_version#

weldx.asdf.util.get_highest_tag_version(pattern, ctx=None)#

Get the highest available weldx extension tag version matching a pattern.

Parameters:
  • pattern (str | list[str]) – The tag pattern to match against.

  • ctx (Union[SerializationContext, AsdfConfig, None]) – The asdf context containing the extension. Will look in the current asdf_config() by default.

Returns:

The full tag string of the highest version match.

Return type:

str

Raises:

ValueError – When the pattern matches multiple base tags in the extension.

Examples

>>> from weldx.asdf.util import get_highest_tag_version
>>> get_highest_tag_version("asdf://weldx.bam.de/weldx/tags/uuid-*")
'asdf://weldx.bam.de/weldx/tags/uuid-0.1.0'