Skip to content

How to release

WolfBunke edited this page Sep 10, 2018 · 17 revisions

Preparation

  • Start a reminder issue a few days before the release and label various issues to the release. Leave this issue open until the release is done and close it with a comment to inform the other developers.
  • Create a release branch. Mind the Dreissen Branching Model
  • Test the examples and start in issue for non working examples.
  • Use empty virtual environment e.g. virtualenv etrago_release --clear -p python3.5 and install the new version from your local folder with pip3 install /home/.../.../eGo --process-dependency-links
  • Start documentation of release in doc/whatsnew/ v[X]_[Y].rst
  • ...

Day of release

  • check setup.py and add new version no.
  • Merge release branch into master and dev branch.
  • Create a release tag.
  • Release by using the tag.
  • Release via PyPI (if you don't have permissions for this repo, ask someone who does, e.g. @ulfmueller)
    1. The upload requires a ~/.pypirc file with your PyPI credentials. Mind this: https://mail.python.org/pipermail/distutils-sig/2017-June/030766.html
    2. Make sure you are in master branch.
    3. (Use python3 setup.py sdist bdist_wheel to create the distribution)
    4. use twine to upload the distribution by twine upload dist/eGo-x.y.z.tar.gz

Readthedocs

  • In case of mayor changes of the files and folder structure create or update the doc/api files for ReadtheDocs by using sphinx-apidoc -o api/ ../ego/
  • check import of packages and add in case if not 'READTHEDOCS' in os.environ: import ...
  • include new release massage /news file doc/whatsnew/v[X]_[Y].rst into /doc/whatsnew.rst by adding .. include:: whatsnew/v[X]_[Y].rst
  • add new version no. of release in doc/conf.py
  • ...

dependency_links and package_data

  • In case of missing files like *.csv, *.json etc. check our setup.py file and add our files to package_data
  • In case of wrong installed packages and/or the use of clones and forks use dependency_links and read A and B. If using a fork make sure the egg version number of your dependency link is different to the original e.g. #egg=pypsa-0.11.0fork

Testing and checking setup.py

In Order to check our setup.py use https://pypi.org/project/collective.checkdocs/ or python setup.py check -r -s

check the README.rst

rst-lint README.rst from https://github.com/twolfson/restructuredtext-lint

Testing pypi with test.pypi.org

pip3 install --index-url https://test.pypi.org/simple/ eGo --process-dependency-links --extra-index-url https://pypi.org/simple --process-dependency-links

Links:

Based on: How to release (oemof)