SemanticVersion#

class ansys.tools.common.versioning.SemanticVersion#

Bases: tuple

Provides a class for semantic versioning.

It is a subclass of a 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

Version as string.

as_tuple

Version as tuple.

as_list

Version as list.

as_dict

Version as dictionary.

major

Major version number.

minor

Minor version number.

patch

Patch version number.

Import detail#

from ansys.tools.common.versioning import SemanticVersion

Property detail#

property SemanticVersion.major#

Major version number.

property SemanticVersion.minor#

Minor version number.

property SemanticVersion.patch#

Patch version number.

Method detail#

SemanticVersion.as_string()#

Version as string.

SemanticVersion.as_tuple()#

Version as tuple.

SemanticVersion.as_list()#

Version as list.

SemanticVersion.as_dict()#

Version as dictionary.