diff --git a/doc/contributing.rst b/doc/contributing.rst index 12d085d5ef53af57dd53bbf8df7ddec2bedd52ea..ca5751c938ec8175239b11320f0140043e0e17bf 100644 --- a/doc/contributing.rst +++ b/doc/contributing.rst @@ -24,23 +24,6 @@ Development model - Coding conventions are adhered to (unless there is good reason not to). -Releases --------- - - -A separate branch is created for each release. The name of the branch is -``v[release]``, where ``[release]`` is the ``major.minor`` version number (see -below). For example, the branch name for release ``1.0`` would be ``v1.0``. -Hotfixes may be added to these release branches. Hotfixes should be merged -into the master branch, and then cherry-picked onto the release branch(es). - - -Every release (including hotfixes) is also tagged with its version number. -For example, the first commit in the ``v1.0`` branch would also be tagged with -``1.0``. A maintenance release to the ``v1.0`` branch would be tagged with -``1.0.1``. - - Version number -------------- @@ -48,7 +31,7 @@ Version number The ``fslpy`` version number roughly follows `semantic versioning <http://semver.org/>`_ rules, so that dependant projects are able to perform compatibility testing. The full version number string consists of three -numbers: +numbers:: major.minor.patch @@ -62,6 +45,27 @@ numbers: backwards-incompatible changes. +Releases +-------- + + +A separate branch is created for each **minor** release. The name of the +branch is ``v[major.minor]``, where ``[major.minor]`` is the first two +components of the release version number (see below). For example, the branch +name for minor release ``1.0`` would be ``v1.0``. + + +Patches and hotfixes may be added to these release branches. These should be +merged into the master branch, and then cherry-picked onto the release +branch(es). + + +Every release is also tagged with its full version number. For example, the +first release off the ``v1.0`` branch would be tagged with ``1.0.0``. +Maintenance release to the ``v1.0`` branch would be tagged with ``1.0.1``, +``1.0.2``, etc. + + Testing ------- diff --git a/fsl/version.py b/fsl/version.py index 28976a2246de5ef379948fca9792c744f643dc59..a298768cc78e91752f334c35a2356eac9b12d80b 100644 --- a/fsl/version.py +++ b/fsl/version.py @@ -28,6 +28,10 @@ which roughly obeys the Semantic Versioning conventions (http://semver.org/): which primarily involve bug-fixes and minor changes. """ + +import string + + __version__ = '1.0.0' """Current version number, as a string. """ @@ -44,9 +48,16 @@ def parseVersionString(versionString): # Major, minor, and point # version are always numeric - major, minor, point = [int(c) for c in components] + major, minor, point = [c for c in components] + + # Early versions of FSLeyes + # used a letter at the end + # to denote a hotfix release. + # Don't break if we get one + # of these old version numbers. + point = point.strip(string.ascii_letters) - return major, minor, point + return [int(c) for c in [major, minor, point]] def compareVersions(v1, v2, ignorePoint=False):