This page describes some of the steps required for releasing new versions of GCPy on Github, PyPi, and conda-forge.
- For clarity, update version numbers to the new release in the following locations:
setup.py
gcpy/_version.py
docs/source/conf.py
benchmark/run_benchmark.py
benchmark/modules/run_1yr_fullchem_benchmark.py
benchmark/modules/run_1yr_tt_benchmark.py
- Update
CHANGELOG.md
- Merge dev into main
- Publish the release on Github.
- Install
twine
usingpip install twine
(if you haven't done this before). To package GCPy for publication to PyPi, run the following from the root of your local GCPy repository:
$ conda activate gcpy_env # or whatever your conda env is named $ python setup.py sdist bdist_wheel $ twine check dist/* $ run twine upload --repository-url https://test.pypi.org/legacy/ dist/*
Enter your login credentials for
test.pypi.org
as requested. Publishing to test.pypi ensures there are no issues with packaging the new release before publication to the primary PyPi database.- Publish to PyPi by running
run twine upload dist/*
, and enter your login information for pypi.org as requested. - Verify the new release is visible at https://pypi.org/project/geoschem-gcpy/ (may take a few minutes).
- After a period of time (around an hour), you will be notified of a new PR at https://github.com/conda-forge/geoschem-gcpy-feedstock indicating conda-forge has detected a new release on PyPi. You should be able to merge this PR without any additinal interference once all checks have passed.
- Once the feedstock PR has been merged and after another period of waiting, you should see builds for the new release when running
conda search -f geoschem-gcpy
. This indicates the new version is publicly available for installation through conda-forge.