fsl.version
The primary purpose of this module is as a container for the fslpy
version number. A handful of convenience functions for managing version
numbers are also defined here.
Current version number, as a string. |
|
Parses the given version string, and returns a tuple containing the individual components of the version number (see the description of the |
|
Compares the given |
|
Patches the given |
The fslpy
version number consists of three numbers, separated by a period,
roughly obeys the Semantic Versioning conventions (http://semver.org/), and
is compatible with PEP 440 (https://www.python.org/dev/peps/pep-0440/):
The major release number. This gets updated for major/external releases.
The minor release number. This gets updated for minor/internal releases, which involve new features, bug-fixes, and other updates.
The point release number. This gets updated for minor/internal releases, which primarily involve bug-fixes and minor changes.
The sole exceptions to the above convention are:
development versions, where the point release number is followed by a development release identifier of the form
'.devN'
, whereN
denotes a specific development release.Builds, where the version number ends in
'+buildN'
, whereN
denotes a specific build.
- fsl.version.__version__ = '3.22.0'
Current version number, as a string.
- fsl.version.parseVersionString(versionString)[source]
Parses the given version string, and returns a tuple containing the individual components of the version number (see the description of the
__version__
attribute).An error is raised if the
versionString
is invalid.
- fsl.version.compareVersions(v1, v2, ignorePoint=False)[source]
Compares the given
fslpy
version numbers.Both developemnt versions and build numbers are ignored in the comparison.
- Parameters:
v1 – Version number to compare
v2 – Version number to compare
ignorePoint – Defaults to
False
. IfTrue
, the point release numbers are ignored in the comparison.
- Returns:
One of the following:
-1 if
v1
<v2
(i.e.v1
is older thanv2
)0 if
v1
==v2
1 if
v1
>v2