Skip to content

Add C++ API reference to Sphinx docs - #8544

Open
bdice wants to merge 2 commits into
NVIDIA:mainfrom
bdice:sphinx-cpp-docs
Open

Add C++ API reference to Sphinx docs#8544
bdice wants to merge 2 commits into
NVIDIA:mainfrom
bdice:sphinx-cpp-docs

Conversation

@bdice

@bdice bdice commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Integrate cuML’s Doxygen-generated C++ API into the Sphinx documentation using Breathe. This adds namespace references for ML, MLCommon, and cuml::genetic to the main documentation navigation and normalizes Doxygen 1.9.1 XML constructs that Sphinx cannot represent.

@bdice
bdice requested review from a team as code owners September 1, 2026 22:28
@bdice
bdice requested review from dantegd and gforsyth September 1, 2026 22:28
@github-actions github-actions Bot added conda conda issue CUDA/C++ labels Sep 1, 2026
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3dc31f76-22da-46a9-ae94-39eef3e5d1ab

📥 Commits

Reviewing files that changed from the base of the PR and between 2120ad5 and d016b04.

📒 Files selected for processing (6)
  • conda/environments/all_cuda-129_arch-aarch64.yaml
  • conda/environments/all_cuda-129_arch-x86_64.yaml
  • conda/environments/all_cuda-133_arch-aarch64.yaml
  • conda/environments/all_cuda-133_arch-x86_64.yaml
  • dependencies.yaml
  • docs/source/cpp/index.rst
🚧 Files skipped from review as they are similar to previous changes (3)
  • conda/environments/all_cuda-129_arch-aarch64.yaml
  • conda/environments/all_cuda-133_arch-aarch64.yaml
  • docs/source/cpp/index.rst

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Documentation

    • Added a C++ API documentation section covering the ML, MLCommon, and genetic namespaces.
    • Integrated generated C++ API references into the documentation navigation.
    • Enabled richer API reference generation and Sphinx integration.
  • Chores

    • Added required documentation tooling to supported CUDA environments.
    • Excluded generated Doxygen XML artifacts from version control.

Walkthrough

Changes

C++ API documentation

Layer / File(s) Summary
Doxygen XML generation and dependencies
.gitignore, cpp/Doxyfile.in, dependencies.yaml, conda/environments/*
Doxygen XML generation is enabled. breathe is added to documentation dependencies. The generated XML directory is ignored.
Doxygen XML cleanup and Breathe configuration
docs/source/conf.py
Sphinx registers Breathe and maps the cuML XML output. clean_doxygen_xml removes unsupported or conflicting XML elements and repairs enum-value IDs before documentation processing.
C++ API documentation pages
docs/source/cpp/*, docs/source/index.rst
The documentation tree adds C++ API pages for the ML, MLCommon, and cuml::genetic namespaces.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to d016b

This change publishes generated C++ API namespace documentation through the Sphinx site. No concrete merge-blocking risk remains in the supplied change context.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (6 skipped: 6 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the integration of Doxygen-generated C++ API documentation into Sphinx with Breathe and identifies the documented namespaces.
Title check ✅ Passed The title clearly and concisely describes the primary change: adding the C++ API reference to the Sphinx documentation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (6 skipped: 6 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@jcrist jcrist left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't currently consider the C++ api public in any way - I'd worry about the effect of publishing the docs for something that we make no promise is usable outside of the python library (and no promises of deprecations/no breaking changes). Personally I wouldn't want these docs to be published at this point.

cc @csadorf for another opinion.

@csadorf

csadorf commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

We don't currently consider the C++ api public in any way - I'd worry about the effect of publishing the docs for something that we make no promise is usable outside of the python library (and no promises of deprecations/no breaking changes). Personally I wouldn't want these docs to be published at this point.

cc @csadorf for another opinion.

I'm also against promoting the C++ API within our documentation in this way at this point in time. I wouldn't describe it as "not public at all", but it's certainly not as stable as the Python API, we don't have a formalized deprecation policy at the moment, and we are making breaking changes whenever needed. It is my intention that we work towards improving and stabilizing the C++ API and eventually promote it as more stable, but at this point, I agree with @jcrist , I'm afraid it would set the wrong expectations.

@bdice

bdice commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

We currently publish C++ docs for libcuml. It is linked from https://docs.rapids.ai/api/#rapids-libraries and points to https://docs.rapids.ai/api/libcuml/nightly/.

We are dropping publication of all our Doxygen sites to reduce maintenance cost. If you don't want Sphinx docs, that's fine, but we won't have Doxygen either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants