Publishing to PyPI
New versions of pybalmorel are distributed to PyPI. The steps below assume you are in the dev environment (pixi shell).
Steps
Check that all tests pass, including the GAMS-dependent ones that CI skips (see testing):
pixi run test
Bump the version in the following files:
pyproject.tomldocs/conf.pydocs/get_started/installation.mdenvironment.yaml
Avoid a blind project-wide find & replace, as the old version number can also appear in unrelated dependency pins in
pyproject.toml. Therelease-updatepixi task does the replacement in these four files, but the old and new versions are written into the task itself, so edit it before running it.Build and upload:
pixi run publish
This builds a source archive and a wheel into
dist/and uploads them with twine. Usepixi run publish-testto upload to TestPyPI first. You will need a PyPI account and an API token configured in~/.pypircor passed interactively.Note that
publishuploads everything indist/, so remove files from earlier builds first. To do the steps by hand:python -m build python -m twine upload dist/pybalmorel-X.Y.Z.tar.gz dist/pybalmorel-X.Y.Z-py3-none-any.whl
Check the release in the
userenvironment, which installs the latest version from PyPI (see environments).