onyx.version – The project version number
See the project file doc/versioning.txt for the interpretation of the project’s
version numbers.
Module Attributes
- SHORT_VERSION_NUMBER_STRING
- A string representation of the major and minor version number of the project,
e.g. 1.0.
- FULL_VERSION_NUMBER_STRING
- A string representation of the full version number of the project,
e.g. 1.01.503.
- FULL_VERSION_RE
- A compiled regular expresssion with match groups for major, minor, and revno
fields of the FULL_VERSION_NUMBER_STRING.
>>> SHORT_VERSION_NUMBER_STRING.split('.') == [str(MAJOR_VERSION), str(MINOR_VERSION)]
True
>>> m = FULL_VERSION_RE.search(FULL_VERSION_NUMBER_STRING)
>>> m is not None
True
>>> major, minor, revno = m.groups()
>>> int(major) == MAJOR_VERSION
True
>>> int(minor) == MINOR_VERSION
True
>>> int(revno) >= 0
True