Note: these instructions assume you are making a minor release (that is, one with no breaking changes). If you are making a major release you’ll need to first follow these steps (if not, skip them):
merge all past changes from major-release into main, using rebase
submit a PR to add all changes from the (now up-to-date) major-release branch into main
once that PR is merged, move on to the next steps immediately (do not merge any new PRs before finishing the process)
First Phase - anybody can do these!
Update setup.py
with the current release number on a new branch/fork
Open a pull request from that branch into main
Second Phase - Write Access needed
Review and merge the aforementioned pull request
Create a new release in GitHub. You can find the Draft a New Release button here, along with previous releases you can use as a template. Make sure to credit all contributors and give a special welcome to those who made their first PR in this release. Also make sure no PRs labeled ‘breaking change’ are included if you’re doing a minor release.
Make a new virtualenv by running python -m venv parsons-release
, and then activate that environment by running source parsons-release/bin/activate
Checkout release in git within that new environment. For example, if you just made release v1.1, you’d use the command git checkout v1.1
. This may give you an error since the tag was made on Github and you might not have it locally. To get tags from Github, try: git fetch origin --tags
. Then re-run the command to checkout the latest tagged release.
In the top-level folder of the checked-out repository, run python setup.py check
Run python -m pip install --upgrade setuptools wheel twine
in the virtualenv to get the necessary tools to build the Python package from the repository’s source files
Build distribution files with pip wheel --no-deps -w dist .
Test installation of the built files with pip install dist/parsons[...].whl
, where the exact filename for the new version’s wheel is listed near the top of the output for the previous command
Run tests with pytest -rf test/*
From outside the parsons repo, run python -c 'from parsons import Table'
Let a repo maintainer (Shauna, Sharine, Kasia, Ian, etc) know that the release is ready to publish on PyPI and they’ll take it from there!
Third Phase - TMC Staff Access needed
First, upload the latest version of Parsons to the test PyPI site, using Twine: twine upload -r testpypi dist/*
It will prompt you for your credentials, which only maintainers have. NOTE: you may need to manually delete past distributions so you’re only uploaded the most recent release.
Check that everything looks right, then upload to the real PyPI site, again using Twine: twine upload dist/*
Check that everything looks right, and you’re done! Don’t forget to post about the new release in #general on Slack, and tag all the contributors. :)