diff --git a/doc/development.rst b/doc/development.rst index 9bf0b9bb5b61c0d3c1b53fdf6e77fb9265957eda..310a3a62ed1eda666483a3676d0d70df32b04286 100644 --- a/doc/development.rst +++ b/doc/development.rst @@ -70,25 +70,21 @@ request. After the branch was merged you can safely delete it:: Versioning ---------- -All version numbers for recent Mutalyzer releases take the form 2.0.beta-X -where X is incremented on release. Pre-release (or development) version -numbers take the form 2.0.beta-X.dev where 2.0.beta-X is the closest future -release version. +A normal version number takes the form X.Y.Z where X is the major version, Y +is the minor version, and Z is the patch version. Development versions take +the form X.Y.Z.dev where X.Y.Z is the closest future release version. -Note that we are planning a switch to `SemVer`_. +Note that this scheme is not 100% compatible with `SemVer`_ which would +require X.Y.Z-dev instead of X.Y.Z.dev but `compatibility with setuptools +<http://peak.telecommunity.com/DevCenter/setuptools#specifying-your-project-s-version>`_ +is more important for us. Other than that, version semantics are as described +by SemVer. -.. A normal version number takes the form X.Y.Z where X is the major version, Y - is the minor version, and Z is the patch version. Development versions take - the form X.Y.Z.dev where X.Y.Z is the closest future release version. +Releases are available from the GitLab git repository as tags. Additionally, +the latest release is available from the `release` branch. - Note that this scheme is not 100% compatible with `SemVer`_ which would - require X.Y.Z-dev instead of X.Y.Z.dev but `compatibility with setuptools - <http://peak.telecommunity.com/DevCenter/setuptools#specifying-your-project-s-version>`_ - is more important for us. Other than that, version semantics are as described - by SemVer. - - Releases are `published at PyPI <https://pypi.python.org/pypi/wiggelen>`_ and - available from the GitHub git repository as tags. +.. note:: Older Mutalyzer version numbers took the form 2.0.beta-X where X was + incremented on release. Release procedure @@ -101,30 +97,35 @@ Releasing a new version is done as follows: .. note:: - Commits since release 2.0.beta-X can be listed with ``git log - mutalyzer-2.0.beta-X..`` for quick inspection. + Commits since release X.Y.Z can be listed with ``git log vX.Y.Z..`` for + quick inspection. 2. Update the ``CHANGES`` file to state the current date for this release - and edit ``mutalyzer/__init__.py`` by updating `__date__`, removing the - ``dev`` value from `__version_info__` and setting `RELEASE` to `True`. + and edit ``mutalyzer/__init__.py`` by updating `__date__` and removing the + ``dev`` value from `__version_info__`. Commit and tag the version update:: - git commit -am 'Bump version to 2.0.beta-X' - git tag -a 'mutalyzer-2.0.beta-X' - git push --tags + git commit -am 'Bump version to X.Y.Z' + git tag -a 'vX.Y.Z' + +3. Push to the GitLab repository (assuming the remote name is `gitlab` and you + are working on the `master` branch:: + + git push gitlab master + git push gitlab master:release --tags -3. Add a new entry at the top of the ``CHANGES`` file like this:: +4. Add a new entry at the top of the ``CHANGES`` file like this:: - Version 2.0.beta-Y - ------------------ + Version X.Y.Z+1 + --------------- Release date to be decided. - Set `__version_info__` to a new version ending with ``dev`` and set - `RELEASE` to `True` in ``mutalyzer/__init__.py``. Commit these changes:: + Increment the patch version and add a ``dev`` value to `__version_info__` + in ``mutalyzer/__init__.py`` and commit these changes:: - git commit -am 'Open development for 2.0.beta-Y' + git commit -am 'Open development for X.Y.Z+1' .. _nose: https://nose.readthedocs.org/ diff --git a/mutalyzer/__init__.py b/mutalyzer/__init__.py index 13b87384e1477a19038daeed26019e66516f8fcc..589572219500de154a3a53ecbec9219f725cf254 100644 --- a/mutalyzer/__init__.py +++ b/mutalyzer/__init__.py @@ -3,23 +3,18 @@ HGVS variant nomenclature checker. """ -# On the event of a new release, we update the __version_info__ and __date__ -# package globals and set RELEASE to True. -# Before a release, a development version is denoted by a __version_info__ -# ending with a 'dev' item. Also, RELEASE is set to False (indicating that -# the __date__ value is to be ignored). -# # We follow a versioning scheme compatible with setuptools [1] where the -# __version_info__ variable always contains the version of the upcomming -# release (and not that of the previous release), post-fixed with a 'dev' -# item. Only in a release commit, this 'dev' item is removed (and added -# again in the next commit). +# package version is always that of the upcoming release (and not that of the +# previous release), post-fixed with ``.dev``. Only in a release commit, the +# ``.dev`` is removed (and added again in the next commit). +# +# Note that this scheme is not 100% compatible with SemVer [2] which would +# require ``-dev`` instead of ``.dev``. # # [1] http://peak.telecommunity.com/DevCenter/setuptools#specifying-your-project-s-version +# [2] http://semver.org/ -RELEASE = False - -__version_info__ = ('2', '0', 'beta-30', 'dev') +__version_info__ = ('2', '0', '0', 'dev') __date__ = '11 Oct 2013' diff --git a/mutalyzer/services/rpc.py b/mutalyzer/services/rpc.py index 0699ffd83f0ac1719be541bfede7380b1769176c..f80da16e8460ffb6594450151dc449a443faeced 100644 --- a/mutalyzer/services/rpc.py +++ b/mutalyzer/services/rpc.py @@ -1135,10 +1135,10 @@ class MutalyzerService(ServiceBase): result = InfoOutput() result.version = mutalyzer.__version__ result.versionParts = mutalyzer.__version_info__ - if mutalyzer.RELEASE: - result.releaseDate = mutalyzer.__date__ - else: + if mutalyzer.__version_info__[-1] == 'dev': result.releaseDate = '' + else: + result.releaseDate = mutalyzer.__date__ result.nomenclatureVersion = mutalyzer.NOMENCLATURE_VERSION result.nomenclatureVersionParts = mutalyzer.NOMENCLATURE_VERSION_INFO result.serverName = socket.gethostname() diff --git a/mutalyzer/website/views.py b/mutalyzer/website/views.py index ecfb6e5c79210eec441bc298cf3a34e63db2f1f1..9bc65ccb36627473560476bf60052882c2f064c8 100644 --- a/mutalyzer/website/views.py +++ b/mutalyzer/website/views.py @@ -39,7 +39,7 @@ def add_globals(): return {'mutalyzer_version' : mutalyzer.__version__, 'nomenclature_version': mutalyzer.NOMENCLATURE_VERSION, 'release_date' : mutalyzer.__date__, - 'release' : mutalyzer.RELEASE, + 'release' : mutalyzer.__version_info__[-1] != 'dev', 'copyright_years' : mutalyzer.COPYRIGHT_YEARS, 'contact_email' : settings.EMAIL, 'soap_wsdl_url' : settings.SOAP_WSDL_URL,