SemanticVersion#

class ansys.tools.versioning.utils.SemanticVersion#

Bases: tuple

Class for semantic versioning.

It is a subclass of tuple and can be instantiated from a string or a tuple.

You can use ‘dev’ in the patch version, but nowhere else.

Overview#

as_string

Return the version as string.

as_tuple

Return the version as tuple.

as_list

Return the version as list.

as_dict

Return the version as dict.

major

Return major version number.

minor

Return minor version number.

patch

Return patch version number.

Import detail#

from ansys.tools.versioning.utils import SemanticVersion

Property detail#

property SemanticVersion.major#

Return major version number.

property SemanticVersion.minor#

Return minor version number.

property SemanticVersion.patch#

Return patch version number.

Method detail#

SemanticVersion.as_string()#

Return the version as string.

SemanticVersion.as_tuple()#

Return the version as tuple.

SemanticVersion.as_list()#

Return the version as list.

SemanticVersion.as_dict()#

Return the version as dict.