diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 0e8af64cbb..ed58b4f260 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -52,9 +52,7 @@ jobs: fetch-depth: 0 ref: ${{ inputs.git-tag }} - - name: Setup proxy cache - uses: nv-gha-runners/setup-proxy-cache@main - continue-on-error: true + # TODO: This workflow runs on GH-hosted runner and cannot use the proxy cache - name: Set up miniforge uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0 diff --git a/cuda_bindings/docs/nv-versions.json b/cuda_bindings/docs/nv-versions.json new file mode 100644 index 0000000000..0031e6238a --- /dev/null +++ b/cuda_bindings/docs/nv-versions.json @@ -0,0 +1,30 @@ +[ + { + "version": "latest", + "url": "https://nvidia.github.io/cuda-python/cuda-bindings/latest/" + }, + { + "version": "13.0.1", + "url": "https://nvidia.github.io/cuda-python/cuda-bindings/13.0.1/" + }, + { + "version": "13.0.0", + "url": "https://nvidia.github.io/cuda-python/cuda-bindings/13.0.0/" + }, + { + "version": "12.9.0", + "url": "https://nvidia.github.io/cuda-python/cuda-bindings/12.9.0/" + }, + { + "version": "12.8.0", + "url": "https://nvidia.github.io/cuda-python/cuda-bindings/12.8.0/" + }, + { + "version": "12.6.2", + "url": "https://nvidia.github.io/cuda-python/cuda-bindings/12.6.2/" + }, + { + "version": "12.6.1", + "url": "https://nvidia.github.io/cuda-python/cuda-bindings/12.6.1/" + } +] diff --git a/cuda_bindings/docs/source/_static/javascripts/version_dropdown.js b/cuda_bindings/docs/source/_static/javascripts/version_dropdown.js deleted file mode 100644 index 9348d2bf84..0000000000 --- a/cuda_bindings/docs/source/_static/javascripts/version_dropdown.js +++ /dev/null @@ -1,61 +0,0 @@ -// SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -// SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE - -function change_current_version(event) { - event.preventDefault(); - - var selectedVersion = event.target.textContent; - var currentVersion = document.getElementById('currentVersion'); - - // need to update both the on-screen state and the internal (persistent) storage - currentVersion.textContent = selectedVersion; - sessionStorage.setItem("currentVersion", selectedVersion); - - // Navigate to the clicked URL - window.location.href = event.target.href; -} - - -function add_version_dropdown(jsonLoc, targetLoc, currentVersion) { - var otherVersionsDiv = document.getElementById('otherVersions'); - - fetch(jsonLoc) - .then(function(response) { - return response.json(); - }) - .then(function(data) { - var versions = data; - - if (Object.keys(versions).length >= 1) { - var dlElement = document.createElement('dl'); - var dtElement = document.createElement('dt'); - dtElement.textContent = 'Versions'; - dlElement.appendChild(dtElement); - - for (var ver in versions) { - var url = versions[ver]; - var ddElement = document.createElement('dd'); - var aElement = document.createElement('a'); - aElement.setAttribute('href', targetLoc + url); - aElement.textContent = ver; - - if (ver === currentVersion) { - var strongElement = document.createElement('strong'); - strongElement.appendChild(aElement); - aElement = strongElement; - } - - ddElement.appendChild(aElement); - // Attach event listeners to version links - ddElement.addEventListener('click', change_current_version); - dlElement.appendChild(ddElement); - } - - otherVersionsDiv.innerHTML = ''; - otherVersionsDiv.appendChild(dlElement); - } - }) - .catch(function(error) { - console.error('Error fetching version.json:', error); - }); -} diff --git a/cuda_bindings/docs/source/_templates/sidebar/variant-selector.html b/cuda_bindings/docs/source/_templates/sidebar/variant-selector.html deleted file mode 100644 index b041194c50..0000000000 --- a/cuda_bindings/docs/source/_templates/sidebar/variant-selector.html +++ /dev/null @@ -1,24 +0,0 @@ -
- - cuda-bindings - v: {{ version }} - - -
-
-
-
- - - diff --git a/cuda_bindings/docs/source/conf.py b/cuda_bindings/docs/source/conf.py index c156cb4ccf..93427d3631 100644 --- a/cuda_bindings/docs/source/conf.py +++ b/cuda_bindings/docs/source/conf.py @@ -59,27 +59,17 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_baseurl = "docs" -html_theme = "furo" -# html_theme = 'pydata_sphinx_theme' +html_theme = "nvidia_sphinx_theme" html_theme_options = { - "light_logo": "logo-light-mode.png", - "dark_logo": "logo-dark-mode.png", - # For pydata_sphinx_theme: - # "logo": { - # "image_light": "_static/logo-light-mode.png", - # "image_dark": "_static/logo-dark-mode.png", - # }, - # "switcher": { - # "json_url": "https://nvidia.github.io/cuda-python/cuda-bindings/versions.json", - # "version_match": release, - # }, - ## Add light/dark mode and documentation version switcher - # "navbar_end": [ - # "search-button", - # "theme-switcher", - # "version-switcher", - # "navbar-icon-links", - # ], + "switcher": { + "json_url": "https://nvidia.github.io/cuda-python/cuda-bindings/nv-versions.json", + "version_match": release, + }, + # Add light/dark mode and documentation version switcher + "navbar_center": [ + "version-switcher", + "navbar-nav", + ], } if os.environ.get("CI"): if int(os.environ.get("BUILD_PREVIEW", 0)): diff --git a/cuda_core/docs/nv-versions.json b/cuda_core/docs/nv-versions.json new file mode 100644 index 0000000000..d1c10914cd --- /dev/null +++ b/cuda_core/docs/nv-versions.json @@ -0,0 +1,30 @@ +[ + { + "version": "latest", + "url": "https://nvidia.github.io/cuda-python/cuda-core/latest/" + }, + { + "version": "0.3.2", + "url": "https://nvidia.github.io/cuda-python/cuda-core/0.3.2/" + }, + { + "version": "0.3.1", + "url": "https://nvidia.github.io/cuda-python/cuda-core/0.3.1/" + }, + { + "version": "0.3.0", + "url": "https://nvidia.github.io/cuda-python/cuda-core/0.3.0/" + }, + { + "version": "0.2.0", + "url": "https://nvidia.github.io/cuda-python/cuda-core/0.2.0/" + }, + { + "version": "0.1.1", + "url": "https://nvidia.github.io/cuda-python/cuda-core/0.1.1/" + }, + { + "version": "0.1.0", + "url": "https://nvidia.github.io/cuda-python/cuda-core/0.1.0/" + } +] diff --git a/cuda_core/docs/source/_static/javascripts/version_dropdown.js b/cuda_core/docs/source/_static/javascripts/version_dropdown.js deleted file mode 100644 index 5878c344f1..0000000000 --- a/cuda_core/docs/source/_static/javascripts/version_dropdown.js +++ /dev/null @@ -1,61 +0,0 @@ -// SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -// SPDX-License-Identifier: Apache-2.0 - -function change_current_version(event) { - event.preventDefault(); - - var selectedVersion = event.target.textContent; - var currentVersion = document.getElementById('currentVersion'); - - // need to update both the on-screen state and the internal (persistent) storage - currentVersion.textContent = selectedVersion; - sessionStorage.setItem("currentVersion", selectedVersion); - - // Navigate to the clicked URL - window.location.href = event.target.href; -} - - -function add_version_dropdown(jsonLoc, targetLoc, currentVersion) { - var otherVersionsDiv = document.getElementById('otherVersions'); - - fetch(jsonLoc) - .then(function(response) { - return response.json(); - }) - .then(function(data) { - var versions = data; - - if (Object.keys(versions).length >= 1) { - var dlElement = document.createElement('dl'); - var dtElement = document.createElement('dt'); - dtElement.textContent = 'Versions'; - dlElement.appendChild(dtElement); - - for (var ver in versions) { - var url = versions[ver]; - var ddElement = document.createElement('dd'); - var aElement = document.createElement('a'); - aElement.setAttribute('href', targetLoc + url); - aElement.textContent = ver; - - if (ver === currentVersion) { - var strongElement = document.createElement('strong'); - strongElement.appendChild(aElement); - aElement = strongElement; - } - - ddElement.appendChild(aElement); - // Attach event listeners to version links - ddElement.addEventListener('click', change_current_version); - dlElement.appendChild(ddElement); - } - - otherVersionsDiv.innerHTML = ''; - otherVersionsDiv.appendChild(dlElement); - } - }) - .catch(function(error) { - console.error('Error fetching version.json:', error); - }); -} diff --git a/cuda_core/docs/source/_templates/sidebar/variant-selector.html b/cuda_core/docs/source/_templates/sidebar/variant-selector.html deleted file mode 100644 index 7110d24a61..0000000000 --- a/cuda_core/docs/source/_templates/sidebar/variant-selector.html +++ /dev/null @@ -1,24 +0,0 @@ -
- - cuda-core - v: {{ version }} - - -
-
-
-
- - - diff --git a/cuda_core/docs/source/conf.py b/cuda_core/docs/source/conf.py index fd62db4678..c172d0995f 100644 --- a/cuda_core/docs/source/conf.py +++ b/cuda_core/docs/source/conf.py @@ -56,27 +56,17 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_baseurl = "docs" -html_theme = "furo" -# html_theme = 'pydata_sphinx_theme' +html_theme = "nvidia_sphinx_theme" html_theme_options = { - "light_logo": "logo-light-mode.png", - "dark_logo": "logo-dark-mode.png", - # For pydata_sphinx_theme: - # "logo": { - # "image_light": "_static/logo-light-mode.png", - # "image_dark": "_static/logo-dark-mode.png", - # }, - # "switcher": { - # "json_url": "https://nvidia.github.io/cuda-python/cuda-core/versions.json", - # "version_match": release, - # }, - ## Add light/dark mode and documentation version switcher - # "navbar_end": [ - # "search-button", - # "theme-switcher", - # "version-switcher", - # "navbar-icon-links", - # ], + "switcher": { + "json_url": "https://nvidia.github.io/cuda-python/cuda-core/nv-versions.json", + "version_match": release, + }, + # Add light/dark mode and documentation version switcher + "navbar_center": [ + "version-switcher", + "navbar-nav", + ], } if os.environ.get("CI"): if int(os.environ.get("BUILD_PREVIEW", 0)): diff --git a/cuda_python/docs/environment-docs.yml b/cuda_python/docs/environment-docs.yml index a3e10599e0..47f1875e3a 100644 --- a/cuda_python/docs/environment-docs.yml +++ b/cuda_python/docs/environment-docs.yml @@ -15,8 +15,9 @@ dependencies: - scipy - sphinx <8.2.0 - sphinx-copybutton - - furo - myst-nb - enum_tools - sphinx-toolbox - pyclibrary + - pip: + - nvidia-sphinx-theme diff --git a/cuda_python/docs/nv-versions.json b/cuda_python/docs/nv-versions.json new file mode 100644 index 0000000000..bb43580397 --- /dev/null +++ b/cuda_python/docs/nv-versions.json @@ -0,0 +1,30 @@ +[ + { + "version": "latest", + "url": "https://nvidia.github.io/cuda-python/latest/" + }, + { + "version": "13.0.1", + "url": "https://nvidia.github.io/cuda-python/13.0.1/" + }, + { + "version": "13.0.0", + "url": "https://nvidia.github.io/cuda-python/13.0.0/" + }, + { + "version": "12.9.0", + "url": "https://nvidia.github.io/cuda-python/12.9.0/" + }, + { + "version": "12.8.0", + "url": "https://nvidia.github.io/cuda-python/12.8.0/" + }, + { + "version": "12.6.2", + "url": "https://nvidia.github.io/cuda-python/12.6.2/" + }, + { + "version": "12.6.1", + "url": "https://nvidia.github.io/cuda-python/12.6.1/" + } +] diff --git a/cuda_python/docs/source/_static/javascripts/version_dropdown.js b/cuda_python/docs/source/_static/javascripts/version_dropdown.js deleted file mode 100644 index 9348d2bf84..0000000000 --- a/cuda_python/docs/source/_static/javascripts/version_dropdown.js +++ /dev/null @@ -1,61 +0,0 @@ -// SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -// SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE - -function change_current_version(event) { - event.preventDefault(); - - var selectedVersion = event.target.textContent; - var currentVersion = document.getElementById('currentVersion'); - - // need to update both the on-screen state and the internal (persistent) storage - currentVersion.textContent = selectedVersion; - sessionStorage.setItem("currentVersion", selectedVersion); - - // Navigate to the clicked URL - window.location.href = event.target.href; -} - - -function add_version_dropdown(jsonLoc, targetLoc, currentVersion) { - var otherVersionsDiv = document.getElementById('otherVersions'); - - fetch(jsonLoc) - .then(function(response) { - return response.json(); - }) - .then(function(data) { - var versions = data; - - if (Object.keys(versions).length >= 1) { - var dlElement = document.createElement('dl'); - var dtElement = document.createElement('dt'); - dtElement.textContent = 'Versions'; - dlElement.appendChild(dtElement); - - for (var ver in versions) { - var url = versions[ver]; - var ddElement = document.createElement('dd'); - var aElement = document.createElement('a'); - aElement.setAttribute('href', targetLoc + url); - aElement.textContent = ver; - - if (ver === currentVersion) { - var strongElement = document.createElement('strong'); - strongElement.appendChild(aElement); - aElement = strongElement; - } - - ddElement.appendChild(aElement); - // Attach event listeners to version links - ddElement.addEventListener('click', change_current_version); - dlElement.appendChild(ddElement); - } - - otherVersionsDiv.innerHTML = ''; - otherVersionsDiv.appendChild(dlElement); - } - }) - .catch(function(error) { - console.error('Error fetching version.json:', error); - }); -} diff --git a/cuda_python/docs/source/_templates/sidebar/variant-selector.html b/cuda_python/docs/source/_templates/sidebar/variant-selector.html deleted file mode 100644 index bec47cf474..0000000000 --- a/cuda_python/docs/source/_templates/sidebar/variant-selector.html +++ /dev/null @@ -1,24 +0,0 @@ -
- - cuda-python - v: {{ version }} - - -
-
-
-
- - - diff --git a/cuda_python/docs/source/conf.py b/cuda_python/docs/source/conf.py index aae73eb119..9bd3dcc78c 100644 --- a/cuda_python/docs/source/conf.py +++ b/cuda_python/docs/source/conf.py @@ -52,27 +52,17 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_baseurl = "docs" -html_theme = "furo" -# html_theme = 'pydata_sphinx_theme' +html_theme = "nvidia_sphinx_theme" html_theme_options = { - "light_logo": "logo-light-mode.png", - "dark_logo": "logo-dark-mode.png", - # For pydata_sphinx_theme: - # "logo": { - # "image_light": "_static/logo-light-mode.png", - # "image_dark": "_static/logo-dark-mode.png", - # }, - # "switcher": { - # "json_url": "https://nvidia.github.io/cuda-python/cuda-core/versions.json", - # "version_match": release, - # }, - ## Add light/dark mode and documentation version switcher - # "navbar_end": [ - # "search-button", - # "theme-switcher", - # "version-switcher", - # "navbar-icon-links", - # ], + "switcher": { + "json_url": "https://nvidia.github.io/cuda-python/nv-versions.json", + "version_match": release, + }, + # Add light/dark mode and documentation version switcher + "navbar_center": [ + "version-switcher", + "navbar-nav", + ], } if os.environ.get("CI"): if int(os.environ.get("BUILD_PREVIEW", 0)):