Description of the new release procedure
----------------------------------------

1. Update changelog, update version number and date (CHANGELOG)

2. Run tests and build documentation to make sure that everything is ok.

3. Commit and push.

4. When Gitlab-CI is happy, tag the version and push tags (git push --tags).
   The package version is set automatically from the git tag thanks to
   setuptools_scm.

5. Create the sdist archive, from a clean tree:

    git clean -fxd .
    python setup.py build sdist

6. Install the sdist archive in a fresh virtualenv and run tests.

    virtualenv test-new-version
    source test-new-version/bin/activate
    pip install dist/mpdaf-3.0.tar.gz
    pip install pytest
    python -c "import mpdaf; print(mpdaf.__file__)"
    pytest $(dirname $(python -c "import mpdaf; print(mpdaf.__file__)"))

7. Upload the sdist archive to PyPI:

    pip install twine
    twine upload -u <username> dist/*

8. Build the binary wheels.
   On https://github.com/musevlt/mpdaf-wheels, edit MPDAF_VERSION in the
   .travis.yml file, commit and push. Then wheels should be build on
   https://travis-ci.org/musevlt/mpdaf-wheels and uploaded to
   https://github.com/musevlt/mpdaf-wheels/releases if it was successful.
   Download the wheels, and push them to PyPI with twine.

9. Prepare the next version: add new version header in the changelog.
