Creating a New Release of the Data Attribute Recommendation SDK

This document describes how to publish a new release of the SDK to Pypi and does not apply to simple use of the SDK.

To create a new release of the Data Attribute Recommendation Python SDK and publish it to pypi.org, you will need to have write access to the GitHub repository.

Follow these steps to create a release:

  • Update version.txt with the desired version number

  • Update the CHANGELOG.md

    • Add a new heading with the new version number below [Unreleased]

    • The heading for the new version number should be a link to the (non-existing) tag on GitHub

    • [Unreleased] becomes an empty section

    • Update the tag used in the URL for [Unreleased] to the new version number so that [Unreleased] points to the changes between the new version and whatever is pushed to main afterwards

  • Merge the updated version.txt and CHANGELOG.md to main

  • Create a tag against the latest main with the desired version number and push the tag. This triggers the build and deploy on Travis.

    • No special permissions for pypi.org are required. Travis has access to a token which grants permission to publish to pypi.org.

$ git pull
$ VERSION=$(cat version.txt)
$ git tag -a rel/$VERSION -m "Tagging release $VERSION"
$ git push --tags
  • A new build for the tag should appear on Travis. Once the deploy stage has run successfully, the new version should be available on pypi.org.

  • The documentation on Read The Docs is automatically updated. A new version based on the git tag is also added. Note that the default documentation version displayed to visitors is always latest and is built from main on any update to the main branch.