Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion cuda_bindings_13/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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'<a href="https://github.com/NVIDIA/cuda-python/pull/{PR_NUMBER}">PR {PR_NUMBER}</a>'
html_theme_options["announcement"] = f"<em>Warning</em>: This documentation is only a preview for {PR_TEXT}!"
html_theme_options["announcement"] = (
f"<em>Warning</em>: 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"] = (
"<em>Warning</em>: This documentation is built from the development branch!"
Expand Down
Loading