Creating a new version¶
In order to create a new version the following should be done:
update
__version__
insrc/madgui/__init__.py
update
CHANGES.rst
by looking at the commit logupdate dependencies in
setup.py
(if necessary)commit these changes in a single commit with the title
Release madgui YY.M.P
, e.g.Release madgui 19.6.0
test the release by pushing to the special
test-release
branch:git push -f origin HEAD:test-release
If the build and tests are successful, the release will be uploaded to test.pypi.org from where the wheels can be inspected.
Once you are confident with the commit, you can tag it and upload:
git tag YY.M.P git push git push --tag
If your commit is fine, this will take care of uploading an installable wheel to PyPI. The tests and documentation will be build for any commit, but releases will only be uploaded when a tag is pushed.
Once the madgui release has appeared on PyPI, you can proceed to build an installer for offline installation using the madgui-installer repository, see Creating an offline installer.
Important: It is important to subscribe to updates on the appveyor and travis continuous integration services (build farms) that are used to create and test releases, in order to be notified when and why builds or tests start failing. You can use the github account to login on both platforms.
Version numbers¶
Note that madgui version numbers follow a calendaric version scheme (calver)
YY.M.P
, i.e. two-digit year, one-digit month followed by a patch number
starting at 0
that can be increased when releasing multiple versions in
the same month. This is well suited for the application nature of this package
with frequent releases.
cpymad version numbers follow a semantic version scheme (semver) where major version numbers indicate backwards compatibility. This is better suited for the library nature of this package.
Creating an offline installer¶
Clone the madgui-installer repository:
git clone git@github.com:hibtc/madgui-installer
Update
requirements.txt
with the new madgui version (and possibly other dependencies). These versions must have been uploaded to PyPI in order to be used by this repository.Commit the changes.
Tag the commit with the madgui version:
git tag YY.M.P
Push the commit and tag:
git push --tag git push
Wait for appveyor to finish the build
Download the new installer from the releases page
If something goes wrong¶
If you notice a bug or an error in an already uploaded version, fix the problem and then issue a new release.
If the travis or appveyor builds failed for an unrelated reason (e.g. downtime on some dependent server), go to the travis/appveyor build page and restart the build.
If you have pushed a tag that failed to build, it is possible to remove the tag from github using the syntax:
git push origin :YY.M.P
(However, don’t do this if the version was already released)