|
1 | | -# SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. |
2 | | -# All rights reserved. |
| 1 | +# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
3 | 2 | # SPDX-License-Identifier: Apache-2.0 |
4 | 3 | # Configuration file for the Sphinx documentation builder. |
5 | 4 | # |
6 | 5 | # For the full list of built-in configuration values, see the documentation: |
7 | 6 | # https://www.sphinx-doc.org/en/master/usage/configuration.html |
8 | 7 |
|
9 | | -# -- Project information ----------------------------------------------------- |
10 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
11 | | - |
12 | | - |
| 8 | +import datetime |
13 | 9 | import os |
14 | 10 | import sys |
15 | 11 |
|
16 | | -sys.path.insert(0, os.path.abspath("../rapids_cli")) |
| 12 | +sys.path.insert(0, os.path.abspath("../../")) |
17 | 13 |
|
| 14 | +# -- Project information ----------------------------------------------------- |
18 | 15 |
|
19 | 16 | project = "RAPIDS CLI" |
20 | | -copyright = "2024, NVIDIA RAPIDS" |
21 | | -author = "NVIDIA RAPIDS" |
22 | | -release = "2024" |
| 17 | +html_title = "RAPIDS CLI" |
| 18 | +copyright = f"{datetime.date.today().year}, NVIDIA" |
| 19 | +author = "NVIDIA" |
23 | 20 |
|
24 | 21 | # -- General configuration --------------------------------------------------- |
25 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
26 | 22 |
|
27 | | -extensions = [] |
| 23 | +extensions = [ |
| 24 | + "sphinx.ext.autodoc", |
| 25 | + "sphinx.ext.viewcode", |
| 26 | + "sphinx.ext.napoleon", |
| 27 | + "sphinx.ext.intersphinx", |
| 28 | + "sphinx_copybutton", |
| 29 | + "sphinx_llm.txt", |
| 30 | +] |
28 | 31 |
|
29 | 32 | templates_path = ["_templates"] |
30 | 33 | exclude_patterns = [] |
31 | 34 |
|
| 35 | +copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: " |
| 36 | +copybutton_prompt_is_regexp = True |
| 37 | + |
| 38 | +# Napoleon settings for Google-style docstrings |
| 39 | +napoleon_google_docstring = True |
| 40 | +napoleon_numpy_docstring = False |
| 41 | + |
| 42 | +# Autodoc settings |
| 43 | +autodoc_default_options = { |
| 44 | + "members": True, |
| 45 | + "member-order": "bysource", |
| 46 | + "undoc-members": True, |
| 47 | +} |
| 48 | + |
| 49 | +intersphinx_mapping = { |
| 50 | + "python": ("https://docs.python.org/3", None), |
| 51 | +} |
32 | 52 |
|
33 | 53 | # -- Options for HTML output ------------------------------------------------- |
34 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
35 | 54 |
|
36 | | -html_theme = "alabaster" |
| 55 | +html_theme = "pydata_sphinx_theme" |
| 56 | + |
| 57 | +html_theme_options = { |
| 58 | + "header_links_before_dropdown": 7, |
| 59 | + "icon_links": [], |
| 60 | + "logo": { |
| 61 | + "link": "https://docs.rapids.ai/", |
| 62 | + }, |
| 63 | + "github_url": "https://github.com/rapidsai/rapids-cli", |
| 64 | + "show_toc_level": 1, |
| 65 | + "navbar_align": "right", |
| 66 | +} |
| 67 | + |
| 68 | +html_sidebars = { |
| 69 | + "**": ["sidebar-nav-bs", "sidebar-ethical-ads"], |
| 70 | +} |
| 71 | + |
37 | 72 | html_static_path = ["_static"] |
38 | 73 |
|
39 | | -extensions = [ |
40 | | - "sphinx.ext.autodoc", |
41 | | - "sphinx.ext.autosummary", |
42 | | - "sphinx.ext.viewcode", |
43 | | - "sphinx.ext.napoleon", # For Google and NumPy style docstrings |
44 | | -] |
| 74 | + |
| 75 | +def setup(app): |
| 76 | + app.add_css_file("https://docs.rapids.ai/assets/css/custom.css") |
| 77 | + app.add_css_file( |
| 78 | + "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css" |
| 79 | + ) |
| 80 | + app.add_js_file( |
| 81 | + "https://docs.rapids.ai/assets/js/custom.js", loading_method="defer" |
| 82 | + ) |
0 commit comments