Skip to content

Conversation

@mdboom
Copy link
Contributor

@mdboom mdboom commented Oct 17, 2025

This prevents the need to update the release notes table of contents every time we make a release. It automatically pulls in all release notes files (ignoring ones that don't end in a digit, since we don't want to include pre-release release notes). A sphinx extension is required to sort them in the desired order, which is "newest first, by version number".

@mdboom mdboom requested review from leofang and rwgk October 17, 2025 16:34
@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Oct 17, 2025

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@mdboom
Copy link
Contributor Author

mdboom commented Oct 17, 2025

/ok to test

@github-actions

This comment has been minimized.

@rwgk
Copy link
Collaborator

rwgk commented Oct 17, 2025

I love this, but when clicking through the four doc links in the auto-generated comment above, the rendered pages don't look quite right yet?

E.g. for cuda-python I see:


Release Notes
CUDA Python 11.8.6 Release notes
CUDA Python 11.8.7 Release notes
CUDA Python Release notes
CUDA Python Release notes
CUDA Python 12.8.0 Release notes
CUDA Python 12.9.0 Release notes
CUDA Python 12.9.1 Release notes
CUDA Python 12.9.2 Release notes
CUDA Python 13.0.0 Release notes
CUDA Python 13.0.1 Release notes


For 12.6.1 and 12.6.2 the version numbers don't show.

The list used to be newest-to-oldest, but now it's the other way around.

For easy reference, this is the existing page: https://nvidia.github.io/cuda-python/latest/

I think it looks nicest with just the plain release numbers.


For cuda-bindings I see:


CUDA Python 11.4.0 Release notes
CUDA Python 11.5.0 Release notes
CUDA Python 11.6.0 Release notes
CUDA Python 11.6.1 Release notes
CUDA Python 11.7.0 Release notes
CUDA Python 11.7.1 Release notes
CUDA Python 11.8.0 Release notes
CUDA Python 11.8.1 Release notes
CUDA Python 11.8.2 Release notes
CUDA Python 11.8.3 Release notes
CUDA Python 11.8.4 Release notes
CUDA Python 11.8.5 Release notes
cuda-bindings 11.8.6 Release notes
cuda-bindings 11.8.7 Release notes
CUDA Python 12.0.0 Release notes
CUDA Python 12.1.0 Release notes
CUDA Python 12.2.0 Release notes
CUDA Python 12.2.1 Release notes
CUDA Python 12.3.0 Release notes
CUDA Python 12.4.0 Release notes
CUDA Python 12.5.0 Release notes
CUDA Python 12.6.0 Release notes
CUDA Python 12.6.1 Release notes
CUDA Python 12.6.2 Release notes
cuda-bindings 12.8.0 Release notes
cuda-bindings 12.9.0 Release notes
cuda-bindings 12.9.1 Release notes
cuda-bindings 12.9.2 Release notes
cuda-bindings 12.9.3 Release notes
cuda-bindings 13.0.0 Release notes
cuda-bindings 13.0.1 Release notes
cuda-bindings 13.0.2 Release notes


About half show CUDA Python, the other half cuda-bindings.

cuda-core and cuda-pathfinder look consistent, but the order is oldest-to-newest everywhere, and I think having just the plain relaese numbers everywhere would be best.

@mdboom
Copy link
Contributor Author

mdboom commented Oct 20, 2025

Yeah, this works fine in the individual builds, but isn't playing nice with the combined build, it looks like. I'll see what we can do...

@mdboom
Copy link
Contributor Author

mdboom commented Oct 20, 2025

/ok to test

@mdboom
Copy link
Contributor Author

mdboom commented Oct 20, 2025

@rwgk: I think this addresses everything you raised now.

@mdboom
Copy link
Contributor Author

mdboom commented Oct 20, 2025

/ok to test

@mdboom
Copy link
Contributor Author

mdboom commented Oct 20, 2025

@rwgk: I think this addresses everything you raised now.

Oh, I see that the links across the projects in the preview take you out to the published docs. In that case, I think there's still something wrong here. Not sure why, since it's working locally for me. I will investigate.

@mdboom
Copy link
Contributor Author

mdboom commented Oct 20, 2025

/ok to test

@mdboom
Copy link
Contributor Author

mdboom commented Oct 20, 2025

@rwgk: I think this addresses everything you raised now.

Oh, I see that the links across the projects in the preview take you out to the published docs. In that case, I think there's still something wrong here. Not sure why, since it's working locally for me. I will investigate.

@rwgk: This is checking out now. I'd appreciate a second look. Thanks.

rwgk
rwgk previously approved these changes Oct 20, 2025
Copy link
Collaborator

@rwgk rwgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I looked through the generated pages pretty carefully, it looks perfect.

My suggestions are optional; maybe for another PR after the release is out.

super().parse_content(toctree)

if not toctree["glob"]:
return
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a valid use case that needs this? — If not: maybe issue a warning, to guard against oversights, like typos?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main toctree in each of the subprojects doesn't use glob, they list the files explicitly. We don't want to sort those. For example.

Comment on lines 19 to 23
toctree["entries"] = [
(Version(Path(x[1]).name.removesuffix("-notes")), x[1]) for x in toctree.get("entries", [])
]
toctree["entries"].sort(key=lambda x: x[0], reverse=True)
toctree["entries"] = [(str(x[0]), x[1]) for x in toctree["entries"]]
Copy link
Collaborator

@rwgk rwgk Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT about the below?

  • to make the code more hermetic (doesn't assign multiple times to toctree["entries"])
  • issues a warning to guard against oversights

I didn't test this:

        entires_in = toctree.get("entries")
        if not entires_in:
            warnings.warn('toctree["entries"] is EMPTY') UserWarning, stacklevel=2)
            return
        entries = [(Version(Path(x[1]).name.removesuffix("-notes")), x[1]) for x in entires_in]
        entries.sort(key=lambda x: x[0], reverse=True)
        toctree["entries"] = [(str(x[0]), x[1]) for x in entries]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense. Sphinx itself already warns when glob finds no elements, so we don't need to do that again.

@mdboom
Copy link
Contributor Author

mdboom commented Oct 21, 2025

/ok to test

@leofang
Copy link
Member

leofang commented Oct 21, 2025

LGTM, need to resolve the conflicts

@leofang
Copy link
Member

leofang commented Oct 21, 2025

Discussed with Mike offline, we could move the plugin to a common place, e.g.
https://github.com/NVIDIA/cuda-python/tree/main/cuda_python_test_helpers
in a follow-up PR.

@leofang leofang added documentation Improvements or additions to documentation P0 High priority - Must do! cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module cuda.pathfinder Everything related to the cuda.pathfinder module labels Oct 21, 2025
rwgk
rwgk previously approved these changes Oct 21, 2025
rparolin
rparolin previously approved these changes Oct 21, 2025
@mdboom mdboom dismissed stale reviews from rparolin and rwgk via 475fa5c October 23, 2025 14:52
@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Oct 23, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@mdboom
Copy link
Contributor Author

mdboom commented Oct 23, 2025

/ok to merge

@mdboom mdboom requested a review from rwgk October 23, 2025 16:06
@mdboom
Copy link
Contributor Author

mdboom commented Oct 23, 2025

/ok to test

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Oct 23, 2025

/ok to test

@mdboom, there was an error processing your request: E1

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/

@mdboom mdboom enabled auto-merge (squash) October 23, 2025 16:06
@mdboom
Copy link
Contributor Author

mdboom commented Oct 23, 2025

/ok to test 475fa5c

@mdboom mdboom requested a review from rparolin October 23, 2025 16:07
@mdboom mdboom merged commit ef4a9cc into NVIDIA:main Oct 23, 2025
64 checks passed
@github-actions
Copy link

Doc Preview CI
Preview removed because the pull request was closed or merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module cuda.pathfinder Everything related to the cuda.pathfinder module documentation Improvements or additions to documentation P0 High priority - Must do!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants