How to release

Create a release

Here is the release process for PyPitch:

  1. bump the version (will commit):

    python -m pip install bumpversion
    bumpversion release
    
  2. update the changelog date (in the same commit):

    vim CHANGELOG.md
    git add CHANGELOG.md
    git commit --amend
    
  3. make a PR

  4. if tests pass on Travis, merge the PR

  5. make a tag:

    git tag VERSION
    
  6. make the source distribution:

    python setup.py build_ext --inplace --force
    python setup.py sdist
    
  7. make wheels with AppVeyor

  8. upload sources and wheels on GitHub in a new release.

Upload to PyPI

You need to upload sources and wheels to PyPI:

python -m pip install twine
twine upload -r pypi dist/*

Note

First, upload on TestPyPI:

$ twine upload -r pypitest dist/*

Then, you need to test the installation:

pushd $(mktemp -d)
mktmpenv
pip install -i https://test.pypi.org/simple pypitch
python -c "from pypitch import pypitch; print(pypitch.__version__)"
deactivate
popd

Prepare the next release

To prepare the next release:

  1. bump the version (with PART in [major, minor, patch], will commit):

    bumpversion PART
    
  2. update the changelog to add the unreleased subsection (in the same commit):

    vim CHANGELOG.md
    git add CHANGELOG.md
    git commit --amend
    
  3. make a PR.