Making a release

A core developer should use the following steps to create a release X.Y.Z of scikit-ci-addons on PyPI.


Documentation conventions

The commands reported below should be evaluated in the same terminal session.

Commands to evaluate starts with a dollar sign. For example:

$ echo "Hello"

means that echo "Hello" should be copied and evaluated in the terminal.

Setting up environment

  1. First, register for an account on PyPI.

  2. If not already the case, ask to be added as a Package Index Maintainer.

  3. Create a ~/.pypirc file with your login credentials:

    index-servers =
where <your-username> and <your-password> correspond to your PyPI account.

PyPI: Step-by-step

  1. Make sure that all CI tests are passing.
  2. Download the latest sources
$ cd /tmp && \
  git clone && \
  cd scikit-ci-addons
  1. List all tags sorted by version
$ git fetch --tags && \
  git tag -l | sort -V
  1. Choose the next release version number
$ release=X.Y.Z


To ensure the packages are uploaded on PyPI, tags must match this regular expression: ^[0-9]+(\.[0-9]+)*(\.post[0-9]+)?$.

  1. In README.rst, update PyPI download count after running this big table query and commit the changes.
$ git add README.rst && \
  git commit -m "README: Update download stats [ci skip]"


To learn more about pypi-stats, see How to get PyPI download statistics.

  1. Tag the release
$ git tag --sign -m "scikit-ci-addons ${release}" ${release} master


We recommend using a GPG signing key to sign the tag.

  1. Create the source distribution and wheel
$ python sdist bdist_wheel
  1. Publish the both release tag and the master branch
$ git push origin ${release} && \
  git push origin master
  1. Upload the distributions on PyPI
twine upload dist/*


To first upload on TestPyPI , do the following:

$ twine upload -r pypitest dist/*
  1. Create a clean testing environment to test the installation
$ mkvirtualenv scikit-ci-addons-${release}-install-test && \
  pip install scikit-ci-addons && \
  ci_addons --list && \
  ci_addons --version


If the mkvirtualenv command is not available, this means you do not have virtualenvwrapper installed, in that case, you could either install it or directly use virtualenv or venv.

To install from TestPyPI, do the following:

$ pip install -i scikit-ci-addons
  1. Cleanup
$ deactivate  && \
  rm -rf dist/* && \
  rmvirtualenv scikit-ci-addons-${release}-install-test
  1. Add a Next Release section back in CHANGES.rst, commit and push local changes.
$ git add CHANGES.rst && \
  git commit -m "CHANGES.rst: Add \"Next Release\" section [ci skip]" && \
  git push origin master