Skip to content

Commit 75c4281

Browse files
mmccartyclaude
andcommitted
Improve docs: fix cross-refs, add sphinx-llm/autobuild, refine doctor page
- Fix Sphinx cross-references for run_debug and CheckResult to use fully qualified module paths - Add sphinx-llm extension to generate llms.txt for LLM consumption - Add sphinx-autobuild with `make serve` target for live-reload dev - Rewrite doctor.rst with user-facing content explaining cross-layer compatibility checks and library-bundled health checks - Move check execution flow details to plugin_development.rst - Fix incorrect Raises section in doctor_check docstring Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Mike McCarty <mmccarty@nvidia.com>
1 parent 005391c commit 75c4281

File tree

8 files changed

+57
-22
lines changed

8 files changed

+57
-22
lines changed

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ coverage html && open htmlcov/index.html
4545
# Build HTML documentation
4646
cd docs && make html
4747

48-
# View documentation
49-
open docs/build/html/index.html
48+
# Live-reload documentation server
49+
cd docs && make serve
5050

5151
# Clean build artifacts
5252
cd docs && make clean

dependencies.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ dependencies:
8181
packages:
8282
- pydata-sphinx-theme
8383
- sphinx
84+
- sphinx-autobuild
8485
- sphinx-copybutton
86+
- sphinx-llm
8587
test_python:
8688
common:
8789
- output_types: [conda, requirements, pyproject]

docs/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ BUILDDIR = build
1212
help:
1313
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
1414

15-
.PHONY: help Makefile
15+
.PHONY: help serve Makefile
16+
17+
serve:
18+
sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS) $(O)
1619

1720
# Catch-all target: route all unknown targets to Sphinx using the new
1821
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).

docs/source/api/debug.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Debug Module
77
The ``rapids_cli.debug.debug`` module gathers system and environment information
88
for troubleshooting RAPIDS installations.
99

10-
:func:`run_debug` is the main entry point. It collects:
10+
:func:`~rapids_cli.debug.debug.run_debug` is the main entry point. It collects:
1111

1212
- Platform and OS details (from ``platform`` and ``/etc/os-release``)
1313
- NVIDIA driver and CUDA versions (via ``pynvml``)

docs/source/api/doctor.rst

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,37 @@ Doctor Module
77
The ``rapids_cli.doctor.doctor`` module orchestrates health check discovery
88
and execution.
99

10-
Checks are discovered via Python entry points in the ``rapids_doctor_check``
11-
group. Each check function is called with ``verbose`` as a keyword argument.
12-
Results are collected into :class:`CheckResult` objects that track pass/fail
13-
status, return values, errors, and warnings.
10+
The CUDA + Python software stack spans multiple layers — the GPU driver, the
11+
CUDA runtime, C/C++ libraries, and Python packages — each managed by different
12+
package managers (OS packages, CUDA toolkit installers, conda, pip). Because no
13+
single package manager owns the full stack, misconfigurations across layer
14+
boundaries are common and difficult to diagnose. ``rapids doctor`` validates
15+
compatibility across these layers, from the driver through CUDA to the Python
16+
libraries, and provides actionable feedback when an incompatibility is found.
1417

15-
Check Execution Flow
16-
--------------------
18+
Health checks are bundled with the RAPIDS libraries you install rather than
19+
hard-coded into ``rapids-cli`` itself. When you install a library such as
20+
cuDF or cuML, any checks it ships are automatically available to
21+
``rapids doctor`` — no extra configuration required.
1722

18-
1. **Discovery**: Scan ``rapids_doctor_check`` entry points and load check
19-
functions. ``ImportError`` and ``AttributeError`` during loading are
20-
silently suppressed via ``contextlib.suppress``.
23+
You can run all discovered checks at once, or filter to a specific library
24+
by passing its name as an argument:
2125

22-
2. **Filtering**: If filter arguments are provided, only checks whose
23-
``ep.value`` contains a filter substring are kept.
26+
.. code-block:: bash
2427
25-
3. **Execution**: Each check runs inside ``warnings.catch_warnings(record=True)``
26-
so warnings are captured. Exceptions are caught and stored rather than
27-
propagated.
28+
# Run every available check
29+
rapids doctor
2830
29-
4. **Reporting**: Warnings are printed, verbose output is shown for passing
30-
checks, and failed checks are listed with their error messages.
31+
# Run only checks related to cudf
32+
rapids doctor cudf
33+
34+
# See which checks would run without executing them
35+
rapids doctor --dry-run --verbose
36+
37+
Results are collected into :class:`~rapids_cli.doctor.doctor.CheckResult`
38+
objects that track pass/fail status, return values, errors, and warnings.
39+
For details on how checks are discovered and executed, or how to write your
40+
own, see :doc:`/plugin_development`.
3141

3242
API
3343
---

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"sphinx.ext.napoleon",
2727
"sphinx.ext.intersphinx",
2828
"sphinx_copybutton",
29+
"sphinx_llm.txt",
2930
]
3031

3132
templates_path = ["_templates"]

docs/source/plugin_development.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,25 @@ Quick Start
4343
pip install -e .
4444
rapids doctor --verbose --dry-run
4545
46+
Check Execution Flow
47+
--------------------
48+
49+
When ``rapids doctor`` runs, checks go through four stages:
50+
51+
1. **Discovery**: Scan ``rapids_doctor_check`` entry points and load check
52+
functions. ``ImportError`` and ``AttributeError`` during loading are
53+
silently suppressed via ``contextlib.suppress``.
54+
55+
2. **Filtering**: If filter arguments are provided, only checks whose
56+
``ep.value`` contains a filter substring are kept.
57+
58+
3. **Execution**: Each check runs inside ``warnings.catch_warnings(record=True)``
59+
so warnings are captured. Exceptions are caught and stored rather than
60+
propagated.
61+
62+
4. **Reporting**: Warnings are printed, verbose output is shown for passing
63+
checks, and failed checks are listed with their error messages.
64+
4665
Check Function Contract
4766
-----------------------
4867

rapids_cli/doctor/doctor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def doctor_check(
3939
dry_run: Whether to skip running checks.
4040
filters: A list of filters to run specific checks.
4141
42-
Raises:
43-
ValueError: If an invalid subcommand is provided.
42+
Returns:
43+
True if all checks passed (or dry_run is True), False otherwise.
4444
4545
Note:
4646
The function discovers and loads check functions defined in entry points

0 commit comments

Comments
 (0)