-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce amount of hard-coding of RAPIDS version #15
Comments
Yes! Really like this idea A single file with just this value makes it easy to read and use anywhere (CMake, Python, Bash, etc.) |
I was going to write up a list of ways I see this working, but it looks like you've already started on some of the core ones so I'll just let you keep pushing on! Thanks for tackling this. |
For cases in which hard-coding is infeasible (due to the file not being a script that can read the For example, if
Then
|
I've opened rapidsai/pre-commit-hooks#13 to implement the above idea. |
* Update to 0.1.13 * Use `VERSION` file to set version dynamically xref: rapidsai/build-planning#15
This was done for |
rapidsai/pynvjitlink#58 also includes an example of how we can read versions in recipes (see https://github.com/rapidsai/pynvjitlink/blob/main/conda/recipes/pynvjitlink/meta.yaml#L4). This isn't generally applicable to RAPIDS packages, which set versions during package build time via https://github.com/rapidsai/gha-tools/blob/main/tools/rapids-generate-version (which uses git tag/distance information under the hood), but it's worth keeping in mind in case there are other special cases like pynvjitlink that don't use that script for generating versions. |
Am actually curious why the |
Actually you are right. I take back what I said, we should be able to do this in the rest of RAPIDS as well since we overwrite the VERSION file in the build scripts with the appropriate setting. That would allow us to make some simplifications. To aplpy the changes, we would do (using the cudf repo as an example):
Since we already overwrite the VERSION file, changing the recipes to read that file should "just work" as far as pulling the right version. |
Ok cool. Wasn't sure if I'd missed something particular in the wheel case Thanks Vyas! 🙏 That enumeration should provide a good guide forward |
Is there a good way to do this for GHA shared-workflows? Edit: Looks like this may be possible as this example demonstrates |
Yes, we ought to be able to do it using some combination of the environment variables available in GHA. In particular, using |
Following up on issue ( rapidsai/build-planning#15 ), drop RAPIDS version hard-coding in doc builds. Authors: - https://github.com/jakirkham Approvers: - Bradley Dice (https://github.com/bdice) - Ray Douglass (https://github.com/raydouglass) URL: #15101
* Drop version update steps for doc pages that no longer exist: #666 * Use the `main` branch in links as that is updated every release xref: rapidsai/build-planning#15 Authors: - https://github.com/jakirkham Approvers: - Gregory Lee (https://github.com/grlee77) - Ray Douglass (https://github.com/raydouglass) URL: #705
Unfortunately, the uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@${{inputs.rapids_branch}} Some people have come up with a workaround for this, where they create a proxy workflow that then calculates the real workflow to use. This would require use to create a workflow repository or directory that doesn't change between RAPIDS versions. |
Ah that's too bad, I wasn't aware of that limitation. That definitely complicates things. |
The shared-workflows repo doesn't currently mention the 24.04 branch anywhere in the code. What would be the feasibility of removing the per-version branch and using only a single branch instead? There is the issue that only 24.04 and newer supports Python 3.11, but we can probably figure out a way to deal with that. |
Agree that sounds like a good option. Let's raise that as an issue on the |
We chose to have versioned branches for |
My guess is GH doesn't want us to use variables in Would add there are probably several ways we could consider changes in |
Given that this task is general fairly low-priority IMO, I would suggest that we focus on making all the other changes we want that don't involve shared workflows and then coming back to the shared workflows last and seeing where we stand on moving RAPIDS to a simpler branching strategy. I don't expect that change to happen soon, but I suspect it'll take us a while to root out all the other versioning changes first too. |
* Read `VERSION` file from CMake * Read `rmm.__version__` from docs build * Read `VERSION` file from shell scripts * Remove updates from `ci/release/update-version.sh` Issue: rapidsai/build-planning#15 Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) - Bradley Dice (https://github.com/bdice) Approvers: - Mark Harris (https://github.com/harrism) - Bradley Dice (https://github.com/bdice) - Jake Awe (https://github.com/AyodeAwe) URL: #1496
* Read `VERSION` file from CMake * Read `cuml.__version__` from docs build * Read `VERSION` file from `ci/build_docs.sh` Issue: rapidsai/build-planning#15 Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Robert Maynard (https://github.com/robertmaynard) - Bradley Dice (https://github.com/bdice) - Jake Awe (https://github.com/AyodeAwe) URL: #5793
* Read `cucim.__version__` in docs build * Remove update from `ci/release/update-version.sh` Issue: rapidsai/build-planning#15 Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Bradley Dice (https://github.com/bdice) - Jake Awe (https://github.com/AyodeAwe) URL: #711
Doxyfiles support environment variable substitution, so read the version from `VERSION` and put it in an environment variable. Also remove a hard-coded version from `ci/check_style.sh`. Issue: rapidsai/build-planning#15 Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Bradley Dice (https://github.com/bdice) - Jake Awe (https://github.com/AyodeAwe) URL: #15231
* Read `VERSION` file in CMake * Read `cuspatial.__version__` and `cuproj.__version__` in docs build * Read `VERSION` file in shell scripts * Use environment variable substitution in Doxygen * Remove updates from `ci/release/update-version.sh` Issue: rapidsai/build-planning#15 Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Bradley Dice (https://github.com/bdice) - Jake Awe (https://github.com/AyodeAwe) - Mark Harris (https://github.com/harrism) URL: #1357
* Read `VERSION` file from CMake * Read `pylibraft.__version__` from docs build * Read `VERSION` file from shell scripts * Use environment variable substitution in Doxygen * Remove updates from `ci/release/update-version.sh` Issue: rapidsai/build-planning#15 Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Jake Awe (https://github.com/AyodeAwe) - Bradley Dice (https://github.com/bdice) - Divye Gala (https://github.com/divyegala) URL: #2219
* Read `VERSION` file from CMake * Read `cuvs.__version__` from docs build * Read `VERSION` file from shell scripts * Use variable substitution in Doxyfile * Update `ci/release/update-version.sh` Issue: rapidsai/build-planning#15 Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Corey J. Nolet (https://github.com/cjnolet) - Bradley Dice (https://github.com/bdice) - Jake Awe (https://github.com/AyodeAwe) - Ben Frederickson (https://github.com/benfred) URL: #45
* Read `cuxfilter.__version__` from docs build * Update `ci/release/update-version.sh` Issue: rapidsai/build-planning#15 Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Bradley Dice (https://github.com/bdice) - Jake Awe (https://github.com/AyodeAwe) URL: #579
* Add `VERSION` file * Read `VERSION` file from CMake * Read `VERSION` file from Python * Read `kvikio.__version__` from docs build * Read `VERSION` file from shell scripts * Use variable substitution in Doxyfile * Remove unused `ci/checks/style.sh` * Update `ci/release/update-version.sh` Issue: rapidsai/build-planning#15 Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Robert Maynard (https://github.com/robertmaynard) - Bradley Dice (https://github.com/bdice) - Jake Awe (https://github.com/AyodeAwe) - Vukasin Milovanovic (https://github.com/vuule) - https://github.com/jakirkham URL: #351
* Read `VERSION` file from CMake * Read `ucxx.__version__` from docs build * Read `VERSION` file from shell scripts * Use variable substitution in Doxyfile * Update `pyproject.toml` to use dynamic version * Update `ci/release/update-version.sh` Issue: rapidsai/build-planning#15 Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) - https://github.com/jakirkham Approvers: - Bradley Dice (https://github.com/bdice) - Jake Awe (https://github.com/AyodeAwe) - Peter Andreas Entschev (https://github.com/pentschev) URL: #201
* Read `VERSION` file in CMake * Read `cugraph.__version__` in docs build * Read `VERSION` file in shell scripts * Use environment variables in Doxyfile * Remove updates from `ci/update-version.sh` Issue: rapidsai/build-planning#15 Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Don Acosta (https://github.com/acostadon) - Chuck Hastings (https://github.com/ChuckHastings) - Brad Rees (https://github.com/BradReesWork) - Jake Awe (https://github.com/AyodeAwe) - https://github.com/jakirkham URL: #4217
Contributes to rapidsai/build-planning#15. Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Corey J. Nolet (https://github.com/cjnolet) - Bradley Dice (https://github.com/bdice) URL: #2285
Closed as completed. |
Thanks Kyle! 🙏 |
* Read `VERSION` file from CMake * Read `cuvs.__version__` from docs build * Read `VERSION` file from shell scripts * Use variable substitution in Doxyfile * Update `ci/release/update-version.sh` Issue: rapidsai/build-planning#15 Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Corey J. Nolet (https://github.com/cjnolet) - Bradley Dice (https://github.com/bdice) - Jake Awe (https://github.com/AyodeAwe) - Ben Frederickson (https://github.com/benfred) URL: rapidsai/cuvs#45
Many (most?) projects have an
update-version.sh
script that usessed
expressions to replace the RAPIDS version in the repository's files. Many of these hard-coded usages of the version can be replaced with smarter dynamic reading of theVERSION
file, and the remaining usages that must be hard-coded can be updated by a centralized hook in https://github.com/rapidsai/pre-commit-hooks that reads a configuration file from the repo.In this issue, I propose two RAPIDS-wide changes:
VERSION
wherever possible. Read version from VERSION file in CMake cudf#14867 serves as an example for updating CMake code to read fromVERSION
. Other scripts in other languages can do something similar.The text was updated successfully, but these errors were encountered: