Making a release#
Procedure#
To push a new release you must be a maintainer in pypi (see pypi below)
Bump version in pyproject.toml (this step might be done in the PR)
Clean out old distribution
rm dist/*
Create the distribution
Create a tar/gzip file (unbuilt source distibution) and a wheel file (built package) together using the
build
package:pip install --upgrade build python -m build
Check it:
ls dist
should show two files a.tar.gz
file and a.whl
file and both file names should contain correct version number that you intend to release.
Optional - At this point you could do an optional test installation (see below)
Upload to PYPI
One-time-only auth setup: Login to pypi and then in your account settings, go to the API tokens section and select “Add API token”. Give it any name and select scope to project:firefly-client and create token. To save this token for later uses, make sure to create a
$HOME/.pypirc
file (or update it if you already have it) with the following:[distutils] index-servers = firefly-client #note the values here are newline-separated [firefly-client] repository = https://upload.pypi.org/legacy/ username = __token__ password = pypi-token-you-created
Upload dist to pypi using twine (with the auth setup in previous step)
pip install --upgrade twine twine upload dist/* --repository firefly-client
If any files were edited (i.e
pyproject.toml
)git commit - a
git push origin master
Tag
git tag -a 2.5.0
(replace version number with the current version from pyproject.toml)
Push tags
git push --tags
After this you can install
pip install firefly_client
Make a release with github, using the tag above
https://github.com/Caltech-IPAC/firefly_client/releases
PYPI#
Must be maintainer at https://pypi.org/project/firefly-client/
Testing site: https://test.pypi.org/project/firefly-client/
Optional Test installation#
To create a test release you must be a mainainer on testpypi
Create the distribution (see above)
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
pip uninstall firefly_client
pip install --verbose --index-url https://testpypi.python.org/pypi firefly_client
Conda and conda-forge#
Anytime the version tag is updated, conda-forge is set up to do a pull and add firefly_client
to its distribution.
See the following sites:
https://github.com/conda-forge/firefly-client-feedstock/
https://anaconda.org/conda-forge/firefly-client