Skip to content

Update version handling #102

@jameslamb

Description

@jameslamb

Description

As of this writing, updating the package version involves manually modifying a VERSION file:

0.1.1

And that file's value then flows into wheels

[tool.setuptools.dynamic]
version = {file = "VERSION"}

and conda packages

RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION)
export RAPIDS_PACKAGE_VERSION

version: ${{ env.get("RAPIDS_PACKAGE_VERSION") }}

version: ${{ version }}

This totally works!

For example, it's how pynvjitlink has been managing its version. Development happens on main, and then when you're ready to release a batch of functionality, you put up a PR changing the version number in VERSION, like rapidsai/pynvjitlink#139

But there are some reasons we might not want to stay with this approach:

  • not aligned with git tags / GitHub releases, which makes cloning and building from source a bit more difficult
  • doesn't easily support publishing nightly versions on merge
    • (not sure if we care about that for this project, we might not)
  • creates extra development and reviewing churn
    • (because of the need to open PRs that update VERSION)

This documents the current state and some reasons we might want to change it.

Benefits of this work

  • addresses some of the concerns listed above

Acceptance Criteria

  • version-management for the repo is in a long-term state we're comfortable with
  • documentation has been added explaining how to update the version and publish releases

Approach

The approach we set up in the rapidsai/legate-* packages could be a good starting point:

The main idea is to set git tags with versions, and then pull those in with rapids-generate-version at runtime, like this:

rapids-generate-version > ./VERSION

(rapidsai/legateboost/ci/build_python.sh)

Notes

Merges to main here don't automatically publish new packages to nightly conda / pip repos if the content of VERSION has not changed relative to the previous upload.

Because we pass --skip-existing to the Anaconda CLI:

https://github.com/rapidsai/gha-tools/blob/d4c9117c231314272b0444173dc0623d4ba3bb90/tools/rapids-upload-to-anaconda-github#L56

https://github.com/rapidsai/gha-tools/blob/d4c9117c231314272b0444173dc0623d4ba3bb90/tools/rapids-wheels-anaconda-github#L69

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions