-
Notifications
You must be signed in to change notification settings - Fork 65
post-processing: consolidate project-to-versions implementations #666
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
Conversation
✅ Deploy Preview for docs-rapids-ai ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| **[{{ version_name }} ({{ site.data.releases[version_name].version }})](/api/{{ api.path }}/{{ version_name }})** | ||
| {%- endif -%} | ||
| {%- unless forloop.last %} | {% endunless -%} | ||
| {%- endfor %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # given a version number like "25.10", figure out the corresponding version name like "stable", "nightly", or "legacy" | ||
| for version_name, version_number in versions_dict.items(): | ||
| if version_number == version_number_from_filepath: | ||
| return {"name": version_name, "number": version_number_from_filepath} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started the changes in this function to account for projects which don't have requested versions of all of nightly, stable, and legacy. For example, for rapidsmpfwe only hostnightly` API docs today:
Lines 170 to 179 in 5c2a36d
| rapidsmpf: | |
| name: RapidsMPF | |
| path: rapidsmpf | |
| desc: 'RAPIDS Multi-Process Foundation (rapidsmpf) is a collection of multi-GPU, distributed memory algorithms written in C++ and exposed to Python.' | |
| ghlink: https://github.com/rapidsai/rapidsmpf | |
| versions: | |
| # enable or disable links; 0 = disabled, 1 = enabled | |
| legacy: 0 | |
| stable: 0 | |
| nightly: 1 |
Because the version number we're comparing here is just {major}.{minor} (doesn't need to account for hotfix versions like 25.10.01), I think we can rely on always having exact matches.
And so don't need the r_versions class and its version-comparison logic.
|
Thanks @ajschmidt8 ! I'll merge this so we can get some feedback from a deployment. We're getting close, I swear 😅 |
|
The deployment succeeded! https://github.com/rapidsai/docs/actions/runs/16921632721/job/47948902232 And the API docs (https://docs.rapids.ai/api/ and everything linked from it) look right... correct versions and labels, working and correct selectors on individual projects' pages. Almost there! |
Followup to #654
And earlier version of these changes were already approved in #657 ... I'll repurpose that PR to just be about adding the "Inactive Projects" section.
This project does some post-processing to ensure that links like
/stable,/latest,/legacy, and/nightlypoint to the correct versions. I misunderstood how that worked and so missed it in #654, resulting in some broken and incorrect links.This consolidates duplication implementations of the same "what versions of the API docs should be built?" logic to help reduce the risk of such mistakes in the future.
Notes for Reviewers
Ugh MORE PRs?
If this works well, there should be only 1 more PR to fully restore the changes from #654 and finish rapidsai/build-planning#197.
Then 1 more with docs on all this (#664 (comment)).
Then I'll stop fiddling with this and move on 😅
How to review this
I know this looks like a lot, but I think the end state is actually simpler than the current state, even if the diff is kind of gross.
Real-world purpose of each of the files in the diff:
ci/download_from_s3.sh= download rendered HTML docs from the S3 bucketrapids-upload-docsposts to,ci/update_symlinks.sh= implement paths like/stablevia local symlinks, e.g. create a symbolic link_site/api/cudf/stablepointing to local directory./_site/api/cudf/25.08ci/customization/customize_doc.py= populate custom release selectors (dropdowns that say things like "stable (25.10)")ci/customization/customize_docs_in_folder.sh= figure out which files to invokecustomize_doc.pyfor, and invoke itOn
main, those files have their own (and slightly different!) implementations of "figure out which versions of docs to build for which projects". That leads to issues like those that led to #658This proposes centralizing that in one place that's re-used by all of them:
ci/get-projects-to-versions.sh= parse the configuration files in_data/and determine which projects to build and what types + versions of docs to build for themHow I tested this
Check that this new script determines the expected set of projects and versions:
ci/customization/projects-to-versions.json (click me)
{ "cucim": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" }, "cudf": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" }, "cudf-java": { "legacy": "25.06", "stable": "25.08" }, ... "rapidsmpf": { "nightly": "25.10" }, "rmm": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" } } `` <details><summary>full output (click me)</summary> ```text Skipping: cuspatial | nightly | 25.10 Skipping: cuspatial | stable | 25.08 Skipping: cuproj | nightly | 25.10 Skipping: cuproj | stable | 25.08 Skipping: cusignal | legacy | 25.06 Skipping: cusignal | nightly | 25.10 Skipping: cusignal | stable | 25.08 Skipping: cudf-java | nightly | 25.10 Skipping: rapidsmpf | legacy | 25.06 Skipping: rapidsmpf | stable | 25.08 Skipping: libcuspatial | nightly | 25.10 Skipping: libcuspatial | stable | 25.08 Skipping: libcuproj | nightly | 25.10 Skipping: libcuproj | stable | 25.08 { "cucim": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" }, "cudf": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" }, "cudf-java": { "legacy": "25.06", "stable": "25.08" }, "cugraph": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" }, "cuml": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" }, "cuproj": { "legacy": "25.06" }, "cusignal": {}, "cuspatial": { "legacy": "25.06" }, "cuvs": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" }, "cuxfilter": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" }, "dask-cuda": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" }, "dask-cudf": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" }, "kvikio": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" }, "libcudf": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" }, "libcuml": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" }, "libcuproj": { "legacy": "25.06" }, "libcuspatial": { "legacy": "25.06" }, "libkvikio": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" }, "librmm": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" }, "libucxx": { "legacy": "0.44", "nightly": "0.46", "stable": "0.45" }, "raft": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" }, "rapids-cmake": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" }, "rapidsmpf": { "nightly": "25.10" }, "rmm": { "legacy": "25.06", "nightly": "25.10", "stable": "25.08" } }Tested this locally end-to-end (including really downloading all the API docs from S3) following the docs added in #659
All looked good! API docs links worked, and selector dropdowns were correctly populated and their links worked. For example, for
rapidsmpf(which should only havenightlydocs):and
cuml(which should havenightly,stable, andlegacy):