-
Notifications
You must be signed in to change notification settings - Fork 9
Overhaul Sphinx documentation #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a97c196
Updated docs
mmccarty 005391c
updated docs to match the deployment docs
mmccarty 75c4281
Improve docs: fix cross-refs, add sphinx-llm/autobuild, refine doctor…
mmccarty bb08cda
Add JSON output example to debug docs
mmccarty 1d94024
Update CLAUDE.md
mmccarty 7631f67
Update dependencies.yaml
mmccarty f98ab9d
Add filter assertion to test_doctor_check_with_filters
mmccarty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| .. SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| .. SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| Health Checks | ||
| ============= | ||
|
|
||
| Built-in health check modules registered via the ``rapids_doctor_check`` | ||
| entry point group in ``pyproject.toml``. | ||
|
|
||
| All check functions follow the contract described in :doc:`../plugin_development`. | ||
|
|
||
| GPU Checks | ||
| ---------- | ||
|
|
||
| .. automodule:: rapids_cli.doctor.checks.gpu | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| CUDA Driver Checks | ||
| ------------------ | ||
|
|
||
| .. automodule:: rapids_cli.doctor.checks.cuda_driver | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| Memory Checks | ||
| ------------- | ||
|
|
||
| .. automodule:: rapids_cli.doctor.checks.memory | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| NVLink Checks | ||
| ------------- | ||
|
|
||
| .. automodule:: rapids_cli.doctor.checks.nvlink | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| .. SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| .. SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| CLI Module | ||
| ========== | ||
|
|
||
| The ``rapids_cli.cli`` module defines the main CLI entry point and subcommands | ||
| using `rich-click <https://github.com/ewels/rich-click>`_. | ||
|
|
||
| The CLI is registered as a console script called ``rapids`` via the | ||
| ``[project.scripts]`` entry in ``pyproject.toml``. | ||
|
|
||
| .. automodule:: rapids_cli.cli | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| .. SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| .. SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| Debug Module | ||
| ============ | ||
|
|
||
| The ``rapids_cli.debug.debug`` module gathers system and environment information | ||
| for troubleshooting RAPIDS installations. | ||
|
|
||
| :func:`~rapids_cli.debug.debug.run_debug` is the main entry point. It collects: | ||
|
|
||
| - Platform and OS details (from ``platform`` and ``/etc/os-release``) | ||
| - NVIDIA driver and CUDA versions (via ``pynvml``) | ||
| - CUDA runtime path (via ``cuda-pathfinder``) | ||
| - System CUDA toolkit locations (globbing ``/usr/local/cuda*``) | ||
| - Python version and hash info | ||
| - All installed package versions | ||
| - pip freeze and conda list output | ||
| - Tool versions: pip, conda, uv, pixi, g++, cmake, nvcc | ||
|
|
||
| Output is either a Rich-formatted console table or JSON (``--json``). | ||
|
|
||
| Example: | ||
|
|
||
| ``rapids debug --json > "<name-output-file>.json"`` | ||
|
|
||
| API | ||
| --- | ||
|
|
||
| .. automodule:: rapids_cli.debug.debug | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| .. SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| .. SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| Doctor Module | ||
| ============= | ||
|
|
||
| The ``rapids_cli.doctor.doctor`` module orchestrates health check discovery | ||
| and execution. | ||
|
mmccarty marked this conversation as resolved.
|
||
|
|
||
| The CUDA + Python software stack spans multiple layers — the GPU driver, the | ||
| CUDA runtime, C/C++ libraries, and Python packages — each managed by different | ||
| package managers (OS packages, CUDA toolkit installers, conda, pip). Because no | ||
| single package manager owns the full stack, misconfigurations across layer | ||
| boundaries are common and difficult to diagnose. ``rapids doctor`` validates | ||
| compatibility across these layers, from the driver through CUDA to the Python | ||
| libraries, and provides actionable feedback when an incompatibility is found. | ||
|
|
||
| Health checks are bundled with the RAPIDS libraries you install rather than | ||
| hard-coded into ``rapids-cli`` itself. When you install a library such as | ||
| cuDF or cuML, any checks it ships are automatically available to | ||
| ``rapids doctor`` — no extra configuration required. | ||
|
|
||
| You can run all discovered checks at once, or filter to a specific library | ||
| by passing its name as an argument: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| # Run every available check | ||
| rapids doctor | ||
|
|
||
| # Run only checks related to cudf | ||
| rapids doctor cudf | ||
|
|
||
| # See which checks would run without executing them | ||
| rapids doctor --dry-run --verbose | ||
|
|
||
| Results are collected into :class:`~rapids_cli.doctor.doctor.CheckResult` | ||
| objects that track pass/fail status, return values, errors, and warnings. | ||
| For details on how checks are discovered and executed, or how to write your | ||
| own, see :doc:`/plugin_development`. | ||
|
|
||
| API | ||
| --- | ||
|
|
||
| .. automodule:: rapids_cli.doctor.doctor | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,44 +1,82 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. | ||
| # All rights reserved. | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # Configuration file for the Sphinx documentation builder. | ||
| # | ||
| # For the full list of built-in configuration values, see the documentation: | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
|
||
| # -- Project information ----------------------------------------------------- | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
|
||
|
|
||
| import datetime | ||
| import os | ||
| import sys | ||
|
|
||
| sys.path.insert(0, os.path.abspath("../rapids_cli")) | ||
| sys.path.insert(0, os.path.abspath("../../")) | ||
|
|
||
| # -- Project information ----------------------------------------------------- | ||
|
|
||
| project = "RAPIDS CLI" | ||
| copyright = "2024, NVIDIA RAPIDS" | ||
| author = "NVIDIA RAPIDS" | ||
| release = "2024" | ||
| html_title = "RAPIDS CLI" | ||
| copyright = f"{datetime.date.today().year}, NVIDIA" | ||
| author = "NVIDIA" | ||
|
|
||
| # -- General configuration --------------------------------------------------- | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
|
||
| extensions = [] | ||
| extensions = [ | ||
| "sphinx.ext.autodoc", | ||
| "sphinx.ext.viewcode", | ||
| "sphinx.ext.napoleon", | ||
| "sphinx.ext.intersphinx", | ||
| "sphinx_copybutton", | ||
|
mmccarty marked this conversation as resolved.
|
||
| "sphinx_llm.txt", | ||
| ] | ||
|
|
||
| templates_path = ["_templates"] | ||
| exclude_patterns = [] | ||
|
|
||
| copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: " | ||
| copybutton_prompt_is_regexp = True | ||
|
|
||
| # Napoleon settings for Google-style docstrings | ||
| napoleon_google_docstring = True | ||
| napoleon_numpy_docstring = False | ||
|
|
||
| # Autodoc settings | ||
| autodoc_default_options = { | ||
| "members": True, | ||
| "member-order": "bysource", | ||
| "undoc-members": True, | ||
| } | ||
|
|
||
| intersphinx_mapping = { | ||
| "python": ("https://docs.python.org/3", None), | ||
| } | ||
|
|
||
| # -- Options for HTML output ------------------------------------------------- | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
|
||
| html_theme = "alabaster" | ||
| html_theme = "pydata_sphinx_theme" | ||
|
|
||
| html_theme_options = { | ||
| "header_links_before_dropdown": 7, | ||
| "icon_links": [], | ||
| "logo": { | ||
| "link": "https://docs.rapids.ai/", | ||
| }, | ||
| "github_url": "https://github.com/rapidsai/rapids-cli", | ||
| "show_toc_level": 1, | ||
| "navbar_align": "right", | ||
| } | ||
|
|
||
| html_sidebars = { | ||
| "**": ["sidebar-nav-bs", "sidebar-ethical-ads"], | ||
| } | ||
|
|
||
| html_static_path = ["_static"] | ||
|
|
||
| extensions = [ | ||
| "sphinx.ext.autodoc", | ||
| "sphinx.ext.autosummary", | ||
| "sphinx.ext.viewcode", | ||
| "sphinx.ext.napoleon", # For Google and NumPy style docstrings | ||
| ] | ||
|
|
||
| def setup(app): | ||
| app.add_css_file("https://docs.rapids.ai/assets/css/custom.css") | ||
| app.add_css_file( | ||
| "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css" | ||
| ) | ||
| app.add_js_file( | ||
| "https://docs.rapids.ai/assets/js/custom.js", loading_method="defer" | ||
| ) | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.