Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 3.08 KB

RELEASE_INSTRUCTIONS.rst

File metadata and controls

58 lines (41 loc) · 3.08 KB

M-LOOP Release Instructions

This document describes the process for generating new M-LOOP releases and is intended to be a reference for M-LOOP developers.

  1. Create a PR to bump the version numbers in the required places.
    • In docs/conf.py, update the following:
      • Update release = ....
      • If bumping the major or minor version number, update version = ....
      • Although it is commented out, it's probably wise to update html_title = ....
    • In mloop/__init__.py, update the following:
      • Update __version__ = ....
    • In setup.py, update the following:
      • Update download_url = 'https://github.com/michaelhush/M-LOOP/tarball/....
  2. Merge the PR to bump the version numbers.
  3. Create an environment to perform the release which includes an editable install of M-LOOP, as well as and the packages pip and twine.
    • For example, this can be done with Anaconda Python using the following commands:
      • conda create --name m-loop-release-env --clone base
      • conda activate m-loop-release-env
      • conda install tensorflow
      • conda install pip twine
      • pip install -e . (Make sure to cd to M-LOOP project root directory first.)
  4. Ensure you've checked out the master branch in your local repo and pulled the most recent changes, including the PR to bump the version numbers.
  5. Stash any local changes to the repo, including any untracked files, with git stash --include-untracked to be sure that they won't accidentally be included in the release.
  6. In the M-LOOP project root directory, run python setup.py sdist to make the source distribution.
  7. Delete any previous source distribution files in the dist/ subdirectory of the project root directory.
  8. Create a release on Github.
    • Go to https://github.com/michaelhush/M-LOOP/releases and press "Draft a new release".
    • For the tag, put the version number as formatted in the last part of the download_url updated in setup.py.
      • If the url's version number starts with a "v", be sure to include that here as well.
    • Set the title to "M-LOOP <version_number>" (without the quotes).
    • Click "Generate release notes" which will automatically fill out the description.
    • If necessary, edit the auto-generated description.
    • No need to upload any files - Github will automatically generate tar and zip files.
    • Double check that everything looks good.
    • Click "Publish release".
  9. Do a dry run publishing to TestPyPI by running twine upload --repository testpypi dist/* in the M-LOOP project root directory.
  10. If the previous step goes well, then run twine upload dist/* to publish to real PyPI.
  11. If any local changes were stashed, you may want to reapply them with git stash apply.
  12. Build a new documentation version on readthedocs.
    • In particular a new version of "stable" should be built.
    • It may be wise to build a new version of "latest" as well since it may not have been built in a while.