From 967605732e6579f68c19dddc52c08f4b4d52890a Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Tue, 27 Oct 2026 09:30:41 -0400 Subject: [PATCH 1/2] Omit autosummary pages in PR previews --- cuda_bindings_13/docs/source/conf.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cuda_bindings_13/docs/source/conf.py b/cuda_bindings_13/docs/source/conf.py index 2043cfae359..904557ae969 100644 --- a/cuda_bindings_13/docs/source/conf.py +++ b/cuda_bindings_13/docs/source/conf.py @@ -64,6 +64,9 @@ def _html_baseurl(): "enum_documenter", ] +# PR previews skip the (very large) autosummary-generated stub pages to save space. +autosummary_generate = not int(os.environ.get("BUILD_PREVIEW", 0)) + nb_execution_mode = "off" numfig = True @@ -106,7 +109,10 @@ def _html_baseurl(): if int(os.environ.get("BUILD_PREVIEW", 0)): PR_NUMBER = f"{os.environ['PR_NUMBER']}" PR_TEXT = f'PR {PR_NUMBER}' - html_theme_options["announcement"] = f"Warning: This documentation is only a preview for {PR_TEXT}!" + html_theme_options["announcement"] = ( + f"Warning: This documentation is only a preview for {PR_TEXT}! " + "To keep previews small, the `autosummary`-generated API pages are omitted." + ) elif int(os.environ.get("BUILD_LATEST", 0)): html_theme_options["announcement"] = ( "Warning: This documentation is built from the development branch!" From a86d7e9dddbe5c109d774ad48a690ebdd105cd18 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Tue, 27 Oct 2026 09:38:35 -0400 Subject: [PATCH 2/2] Fix syntax in note --- cuda_bindings_13/docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuda_bindings_13/docs/source/conf.py b/cuda_bindings_13/docs/source/conf.py index 904557ae969..b0437159042 100644 --- a/cuda_bindings_13/docs/source/conf.py +++ b/cuda_bindings_13/docs/source/conf.py @@ -111,7 +111,7 @@ def _html_baseurl(): PR_TEXT = f'PR {PR_NUMBER}' html_theme_options["announcement"] = ( f"Warning: This documentation is only a preview for {PR_TEXT}! " - "To keep previews small, the `autosummary`-generated API pages are omitted." + "To keep previews small, the autosummary-generated API pages are omitted." ) elif int(os.environ.get("BUILD_LATEST", 0)): html_theme_options["announcement"] = (