Skip to content

Releasing New Versions

Darel13712 edited this page Feb 3, 2022 · 1 revision

This document provides instructions on how to create new version of the package and upload it to PyPI.

You should do three things:

  1. Update version
  2. Build package
  3. Update documentation

Update Version

To update package version, run version command with appropriate option.

poetry version minor|patch|major

Versioning should be somewhat aligned with semantic versioning. In short, patch should be used for bug fixes and minor for new functionality.

What this command does is just changes version in pyproject.toml, so you have to commit this change. It is advisible to update version in a separate commit, this way it is easier to create change logs and spot new releases in commit history.

Build Package

poetry build
poetry publish

All releases to date were made under recsys_ailab account registered with a techical email. You can add collabolators to a project, but it wasn't really necessary.

Make sure that there are no uncommited junk files, because they will be added to the package archive and uploaded to PyPI. You can fix this by having a separate folder with a clean clone of the repository to make build from.

Update Documentation

cd docs
make gh-deploy

All configuration for Sphinx is either in docs/conf.py or docs/Makefile. gh-deploy is just a convenience build target specified in the Makefile. Basically it just builds docs one more time and runs ghp-import tool with proper options that does all the job for you.

Clone this wiki locally