Release Version

Prepare Test PyPi / PyPi

  1. Get your access tokens from Test PyPi and PyPi, respectively.

  2. Provide the token to uv publish, either via the --token argument or via the UV_PUBLISH_TOKEN environment variable. Make sure to use the token matching the index you publish to.

export UV_PUBLISH_TOKEN=pypi-XXXXX...

Release Version to Test PyPi

First, check whether the project is ready for publication on Test PyPi.

  1. Update version, build the project, and publish the project at Test PyPi.

uv version --bump patch --bump alpha
uv build
uv publish --publish-url https://test.pypi.org/legacy/ --token <TEST_PYPI_TOKEN>
  1. Create a new, empty virtual environment outside of the repository and install PyExperimenter from Test PyPi.

uv venv pyexperimenter-release --python 3.10
source pyexperimenter-release/bin/activate
uv pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple --index-strategy unsafe-best-match py-experimenter==<VERSION>
  1. Execute all example notebooks and check the outputs based on the new environment pyexperimenter-release. If anything does not work, fix it and repeat the steps above.

Release Version to PyPi

Warning

Check the publication on Test PyPi before publishing to PyPi!

  1. Update version and add according CHANGELOG information.

uv version --bump <major/minor/patch>
  1. Create a pull request from develop to main and merge it (not squash merge).

  2. Create a tag with the according version number for that merge commit.

  3. Create a new release for that tag with the version number as title and the latest changelog additions as content. With pressing the button Publish release the requested files will be attached automatically.

  4. Build the project and publish the project at PyPi.

uv build
uv publish --token <PYPI_TOKEN>
  1. Check PyPi version.