From 0d473939de436da52d490c4bfd805c0442a9b36f Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Wed, 2 Sep 2026 09:41:11 -0500 Subject: [PATCH 1/2] Make RAPIDS intersphinx references release-aware --- docs/source/conf.py | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index ba3d0f3c6c..549719f317 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -92,6 +92,20 @@ f"{CUML_VERSION.major:02}.{CUML_VERSION.minor:02}.{CUML_VERSION.micro:02}" ) +rapids_branch_file = os.path.join( + os.path.dirname(__file__), "..", "..", "RAPIDS_BRANCH" +) +try: + with open(rapids_branch_file) as f: + RAPIDS_BRANCH = f.read().strip() +except FileNotFoundError: + RAPIDS_BRANCH = "main" +nvidia_docs_intersphinx_version = ( + RAPIDS_BRANCH.removeprefix("release/") + if RAPIDS_BRANCH.startswith("release/") + else "latest" +) + # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # @@ -210,10 +224,13 @@ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { - # TODO: Use stable URLs once subpath redirects are available: - # https://github.com/rapidsai/build-infra/issues/395 + # main uses latest; release branches use immutable CalVer URLs: + # https://github.com/rapidsai/build-planning/issues/320 # rapids-pre-commit-hooks: disable-next-line - "cudf": ("https://docs.nvidia.com/cudf/26.10/", None), + "cudf": ( + f"https://docs.nvidia.com/cudf/{nvidia_docs_intersphinx_version}/", + None, + ), "numpy": ("https://numpy.org/doc/stable/", None), "python": ("https://docs.python.org/3", None), # TODO: re-enable once scipy docs are more reliable @@ -225,7 +242,10 @@ None, ), # rapids-pre-commit-hooks: disable-next-line - "rmm": ("https://docs.nvidia.com/rmm/26.10/", None), + "rmm": ( + f"https://docs.nvidia.com/rmm/{nvidia_docs_intersphinx_version}/", + None, + ), } # Config numpydoc From 3226444b58bd0448cee3bb42129e86cf409f3c2d Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Thu, 3 Sep 2026 12:26:24 -0500 Subject: [PATCH 2/2] Use package version for intersphinx URLs --- docs/source/conf.py | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 549719f317..dfec7cb8dc 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -92,20 +92,6 @@ f"{CUML_VERSION.major:02}.{CUML_VERSION.minor:02}.{CUML_VERSION.micro:02}" ) -rapids_branch_file = os.path.join( - os.path.dirname(__file__), "..", "..", "RAPIDS_BRANCH" -) -try: - with open(rapids_branch_file) as f: - RAPIDS_BRANCH = f.read().strip() -except FileNotFoundError: - RAPIDS_BRANCH = "main" -nvidia_docs_intersphinx_version = ( - RAPIDS_BRANCH.removeprefix("release/") - if RAPIDS_BRANCH.startswith("release/") - else "latest" -) - # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # @@ -224,11 +210,11 @@ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { - # main uses latest; release branches use immutable CalVer URLs: + # Versioned URLs keep intersphinx links immutable in archived docs: # https://github.com/rapidsai/build-planning/issues/320 # rapids-pre-commit-hooks: disable-next-line "cudf": ( - f"https://docs.nvidia.com/cudf/{nvidia_docs_intersphinx_version}/", + f"https://docs.nvidia.com/cudf/{version}/", None, ), "numpy": ("https://numpy.org/doc/stable/", None), @@ -243,7 +229,7 @@ ), # rapids-pre-commit-hooks: disable-next-line "rmm": ( - f"https://docs.nvidia.com/rmm/{nvidia_docs_intersphinx_version}/", + f"https://docs.nvidia.com/rmm/{version}/", None, ), }

AltStyle によって変換されたページ (->オリジナル) /