-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Description
As of this writing, updating the package version involves manually modifying a VERSION file:
Line 1 in 4a846b9
| 0.1.1 |
And that file's value then flows into wheels
Lines 47 to 48 in 4a846b9
| [tool.setuptools.dynamic] | |
| version = {file = "VERSION"} |
and conda packages
Lines 10 to 11 in 4a846b9
| 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
gittags / 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)
- (because of the need to open PRs that update
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:
- https://github.com/rapidsai/legate-boost/blob/7b94a53c608cb0cb58847af514eadd12536e214d/contributing.md#change-the-project-version
- https://github.com/rapidsai/legate-boost/blob/7b94a53c608cb0cb58847af514eadd12536e214d/contributing.md#releasing
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: