Skip to content
Snippets Groups Projects
Commit c55f64be authored by Vermaat's avatar Vermaat
Browse files

Move to semantic versioning

parent a03ab8f2
No related branches found
No related tags found
No related merge requests found
......@@ -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/
......
......@@ -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'
......
......@@ -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()
......
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment