Skip to content

Make a release

Thomas Bonald edited this page Jul 29, 2022 · 40 revisions

Procedure

To make a release :

  1. Merge everything you need into develop. Make sure it passes the tests.

  2. Update HISTORY.rst with the new release.

  3. Checkout on the master branch.

  4. Merge develop into master. Make sure it passes the tests on GitHub Actions and that the wheels build properly, this is the last step before the release where the whole code is tested!

  5. 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!

  6. 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/*

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

  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 on GitHub Actions. The name of the tag should be displayed (v.x.x.x) rather than the name of the branch (master). See the Troubleshooting section if that is not the case.

  3. Check that GitHub Actions builds and deploys to PyPI.

  4. Draft a new release on GitHub (go to Code -> Releases then Draft a new release).

  5. Merge master into develop.

See Package Helper for more details.

Troubleshooting

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

  • if GitHub Actions does not detect the commit tag, manually push it in GitKraken. This should prompt GitHub Actions to launch a new build and deploy
  • do not hesitate to have a thorough look at the GitHub Actions log.

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

If GitHub Actions fails to compile .cpp files (typically for Windows...), you can check that the version of cibuidwheel which is hard-coded in the *.yml files is up to date.

Clone this wiki locally