Note: these instructions assume you are making a minor release (that is, one with no breaking changes). The process for a major release is slightly different.
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 python setup.py sdist bdist_wheel
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 (Nikki, Shauna, or Soren) 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.
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. :)