version_tuple_from_str#

brainglobe_atlasapi.utils.version_tuple_from_str(version_str)[source]#

Parse a version string into a numeric tuple for comparison.

Accepts ., _ and - as separators, so both BrainGlobe (3_0) and atlas-assets (2024-05) version folder names parse.

Parameters:

version_str (str) – Version string, e.g. "3.0", "3_0" or "2024-05".

Returns:

Numeric components, in order.

Return type:

tuple of int