Skip to content

Latest commit

 

History

History
100 lines (67 loc) · 3.05 KB

RELEASING.md

File metadata and controls

100 lines (67 loc) · 3.05 KB

Snorkel Release Guide

Before You Start

Make sure you have PyPI account with maintainer access to the Snorkel project. Create a .pypirc in your home directory. It should look like this:

[distutils]
index-servers =
  pypi
  pypitest

[pypi]
username=YOUR_USERNAME
password=YOUR_PASSWORD

Then run chmod 600 ./.pypirc so only you can read/write.

Release Steps

  1. Make sure you're in the top-level snorkel directory.

  2. Make certain your branch is in sync with head:

    $ git pull origin master
    
  3. Make sure CHANGELOG.md is up to date for the release: compare against PRs merged since the last release & update top heading with release date.

  4. Update version to, e.g. 0.9.0 (remove the +dev label) in snorkel/version.py.

  5. Commit these changes and create a PR:

    git add . -u
    git commit -m "[RELEASE]: v0.9.0"
    git push origin master
    
  6. Once the PR is approved, merge it and pull master locally.

  7. Tag the release:

    git tag -a v0.9.0 -m "v0.9.0 release"
    git push origin v0.9.0
    
  8. Build source & wheel distributions:

    rm -rf dist build  # clean old builds & distributions
    python3 setup.py sdist  # create a source distribution
    python3 setup.py bdist_wheel  # create a universal wheel
    
  9. Attach the resulting binaries in (dist/snorkel-x.x.x.*) to the release.

  10. Check that everything looks correct by uploading the package to the PyPI test server:

    pip install twine  # if not installed
    twine upload dist/* -r pypitest  # publish to test.pypi.org
    python3 -m venv test_snorkel  # create a virtualenv for testing
    source test_snorkel/bin/activate  # activate virtualenv
    python3 -m pip install -i https://testpypi.python.org/pypi snorkel  # check that install works
    
  11. Publish to PyPI

    twine upload dist/* -r pypi
    
  12. A PR is auto-submitted (this will take a few hours) on conda-forge/snorkel-feedstock to update the version.

    • A maintainer needs to accept and merge those changes.
  13. Copy the release notes in CHANGELOG.md to the GitHub tag and publish a release.

  14. Update version to, e.g. 0.9.1+dev in snorkel/VERSION.py.

  15. Add a new changelog entry for the unreleased version:

    ## [Unreleased]
    ## [0.9.1]
    ### [Breaking Changes]
    ### [Added]
    ### [Changed]
    ### [Deprecated]
    ### [Removed]
    
  16. Commit these changes and push to master:

    git add . -u
    git commit -m "[BUMP]: v0.9.1+dev"
    git push origin master
    
  17. Add the new tag to the Snorkel project on ReadTheDocs,

    • Trigger a build for master to pull new tags.
    • Go to the "Versions" tab, and "Activate" the new tag.
    • Go to Admin/Advanced to set this tag as the new default version.
    • Make sure a build is triggered on the correct tag in "Overview".

Credit