Skip to content

Commit 20a4aee

Browse files
authored
Omit autosummary pages in PR previews (#3244)
* Omit autosummary pages in PR previews * Fix syntax in note
1 parent 590a8bf commit 20a4aee

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • cuda_bindings_13/docs/source

‎cuda_bindings_13/docs/source/conf.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ def _html_baseurl():
6464
"enum_documenter",
6565
]
6666

67+
# PR previews skip the (very large) autosummary-generated stub pages to save space.
68+
autosummary_generate = not int(os.environ.get("BUILD_PREVIEW", 0))
69+
6770
nb_execution_mode = "off"
6871
numfig = True
6972

@@ -106,7 +109,10 @@ def _html_baseurl():
106109
if int(os.environ.get("BUILD_PREVIEW", 0)):
107110
PR_NUMBER = f"{os.environ['PR_NUMBER']}"
108111
PR_TEXT = f'<a href="https://github.com/NVIDIA/cuda-python/pull/{PR_NUMBER}">PR {PR_NUMBER}</a>'
109-
html_theme_options["announcement"] = f"<em>Warning</em>: This documentation is only a preview for {PR_TEXT}!"
112+
html_theme_options["announcement"] = (
113+
f"<em>Warning</em>: This documentation is only a preview for {PR_TEXT}! "
114+
"To keep previews small, the autosummary-generated API pages are omitted."
115+
)
110116
elif int(os.environ.get("BUILD_LATEST", 0)):
111117
html_theme_options["announcement"] = (
112118
"<em>Warning</em>: This documentation is built from the development branch!"

0 commit comments

Comments
 (0)