Skip to content

Make a release

QLutz edited this page May 7, 2020 · 40 revisions

Procedure

To make a release :

  1. Merge everything you need into develop. Make sure it passes the tests.
  2. Merge develop into master. Make sure it passes the tests.
  3. Checkout on the master branch.
  4. Update HISTORY.rst with the new version
  5. Commit and push.
  6. Use bumpversion to change the version number (X.Y.Z). Type bumpversion major (respectively bumpversion minor and bumpversion patch) in a terminal to make a major release (respectively minor release and patch) ie. X+1.Y.Z (respectively X.Y+1.Z and X.Y.Z+1). This creates a tag and commits on Git. For proper numbering see the associated PEP. Do not push yet!
  7. Before pushing a commit tag, you may check whether PyPI will be able to render the package description. To do so:
  • Create a source distribution by entering python setup.py sdist in a terminal
  • Check the distribution with Twine (to be installed) with twine check dist/*
  1. If the wheels passed inspection, push the created commit.
  2. Make sure the tag is pushed as well. To see if the tag is pushed, look at the icon next to the build number (it should be a tag rather than a node shape, see the Troubleshooting section).

This should mark the checks as passed and will display an error otherwise. See this link for more information.

  1. Check that Travis builds and deploys to PyPI

  2. Draft a new release on GitHub (go to Releases then Draft a new release)

  3. Be nice and create a pull request from master to develop afterwards :)

See Package Helper for more details.

Troubleshooting

If Travis builds but does not deploy to PyPI, check the console output of the last build:

  • if Travis does not detect the commit tag, manually create a release on GitHub. This should prompt Travis to launch a new build and deploy
  • if Travis does not accept the repo as valid, check the .travis.yml configuration file (look for the repo field)
  • do not hesitate to have a thorough look at the Travis log. For instance, in build 953, see how the actual error is hidden at line 737 which does not show by default.

If Travis starts to deploy but fails, make sure you have valid credentials for PyPI deployment. If not, ask an owner (nicely).

If you need to make a new tagged commit, you may add a tag to any commit. Make sure you push again after adding that tag. You can check if a commit is tagged on Travis by checking the icon next to the build number (#XXXX received/passed/...).

Clone this wiki locally