# set tw: 72

Release checklist

  1. Ensure we’re on the correct branch to be released, and that HEAD is the commit we want to tag with the new version:

    $ git log --oneline  --decorate HEAD~5..HEAD
    
  2. Check that there are no files that have not been commited:

    $ git status
    
  3. Run the tests one last time.

    $ tox
    
  4. Tag the correct commit with an annotated tag. The format of the tag itself is vX.Y.Z where X, Y and Z are integers. The annotation should be a very brief summary of the most important changes.

    $ git tag -m 'Post release bugfixes' v1.0.1
    
  5. Push the tag (given that origin is the correct remote):

    $ git push origin v1.0.1
    
  6. Create the python wheel:

    $ python3 setup.py bdist_wheel
    

    This will create a wheel in the dist/ directory.

  7. Do a quick manual check of the contents of the wheel: Check that the correct version is in the filename (if not, you might have forgotten to tag, or the git index is dirty):

    $ ls dist/
    

    Then check the contents with any tool that can analyze a zip-file, for instance zipinfo. Check that no unwanted files are included, like editor swap files, .pyc files, or __pycache__ directories:

    $ zipinfo dist/FILENAME
    
  8. Upload the wheel at PyPI, for instance with twine:

    $ twine upload dist/\*.whl
    
  9. Turn the tag into a release on Github. (On the “Code” tab, find the column to the right of the list of files and scroll until you find “Releases”. Click on “Releases”. To the right, find the button “Draft new release”. Click. Type in the tag in the box that says “Tag version” left of the ‘@’, and copy the tag where it says “Release title”. Then click the “Publish release”-button.)