Skip to content

Publish

Philipp Niedermayer edited this page Jan 17, 2025 · 23 revisions

Publishing a new version

Publication to PyPI is automated via GitHub actions. The workflow is triggered by version tags.

Important

  • For small bugfixes, use the fix-* branches (e.g. cherry-picking from main, or directly make changes there and later merge into main). It's okay to make immediate releases there and just add a point to the corresponding GitHub release.
  • For feature development, use the main branch. Releases from the main branch should have at least a minor version increment and proper documentation as separate GitHub release, naming new features and changes.

To release a new version:

  • Re-run and commit the example notebooks to make sure all documentation is up-to-date. They are not automatically re-run but deployed as-is!
  • Update the __version__ string in xplt/__init__.py (including trailing zeros!)
  • Push and make sure all checks pass (CI failures will not prevent releasing to PyPI!)
  • Create a tag in the form v0.0.0 with matching version number (including trailing zeros!).
    • For major or minor releases, this should be done by creating a release on GitHub
    • For bug fix releases, only create the tag, add the information to the corresponding "Version 0.0.*" minor release (where applicable) and point it to the new tag. See previous releases for examples.
  • When the tag is created, the release action (see release.yaml) will automatically be triggered and will perform the deployment for you, i.e. it will

    Check that the tag matches the version string
    Publish the package to test.pypi.org
    Build the documentation and push it to the gh-pages branch, from where it is published on GitHub Pages
    Publish the package to pypi.org
    Show you a green light if everything went well

Clone this wiki locally