Skip to content

Release workflow

Jan edited this page Aug 28, 2024 · 9 revisions

Create a release branch

Decide what will be the upcoming version number

  • sbi currently uses the Semver 2.0.0 convention.
  • Edit the version number in the tuple at sbi/sbi/__version__.py.

Collect a list of relevant changes

  • Edit changelog.md, add a new version number header and report changes below it.
  • Use one line per change, include links to the pull requests that implemented each of the changes.
  • Credit contributors!
  • If there are new package dependencies or updated version constraints for the existing dependencies, add/modify the corresponding entries in pyproject.toml.

Run tests locally and make sure they pass

  • Run the full test suite, including slow tests.
  • This is the time to commit changes to __version__.py, changelog.md and other modified release-related files such as pyproject.toml to main.

Upload via the command line.

You need access to the sbi PyPi account for doing this (talk the maintainers).

  • Install build and twine: pip install build twine
  • Use the build module to create the source distribution (.tar.gz) and the wheel (.whl) files:
    • python -m build
    • This will generate distribution archives (usually located in the dist/ directory).
  • Once the package is built, you can upload it to PyPI using twine:
    • twine upload dist/*

Update the documentation to the new version

If docs changed, update the docs according to docs/README.md. Currently this happens automatically via GitHub Actions.