Skip to content

Comments

Fix links and cg example in documentation.#1245

Merged
shi-eric merged 1 commit intoNVIDIA:mainfrom
clatim:bugfix/fix-incorrect-documentation
Feb 21, 2026
Merged

Fix links and cg example in documentation.#1245
shi-eric merged 1 commit intoNVIDIA:mainfrom
clatim:bugfix/fix-incorrect-documentation

Conversation

@clatim
Copy link
Contributor

@clatim clatim commented Feb 21, 2026

Description

Update some of the examples in the documentation, and fix some links.

Before your PR is "Ready for review"

  • All commits are signed-off to indicate that your contribution adheres to the Developer Certificate of Origin requirements
  • Necessary tests have been added
  • Documentation is up-to-date
  • Auto-generated files modified by compiling Warp and building the documentation have been updated (e.g. __init__.pyi, docs/api_reference/, docs/language_reference/)
  • Code passes formatting and linting checks with pre-commit run -a

Summary by CodeRabbit

  • Documentation
    • Added missing links in API reference docstrings to enhance navigation and resource discoverability.
    • Updated iterative solver usage documentation examples with explicit keyword arguments for improved clarity.
    • Improved docstring formatting with consistent function references across the API documentation.

Signed-off-by: Charlie Latimer <clatimer159@gmail.com>
@copy-pr-bot
Copy link

copy-pr-bot bot commented Feb 21, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai
Copy link

coderabbitai bot commented Feb 21, 2026

📝 Walkthrough

Walkthrough

Three files updated with documentation improvements: CHANGELOG.md adds entries for documentation enhancements, sparse.rst updates a Conjugate Gradient API usage example with corrected keyword arguments, and an init.py docstring receives formatting improvements for Sphinx role references.

Changes

Cohort / File(s) Summary
Release Notes
CHANGELOG.md
Added two documentation update entries in the Unreleased section.
API Documentation Examples
docs/domain_modules/sparse.rst
Updated Conjugate Gradient usage example to use explicit keyword arguments (x=, maxiter=, tol=).
Docstring Formatting
warp/_src/fem/space/__init__.py
Enhanced docstring in make_polynomial_space with explicit Sphinx :func: references for consistency.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: fixing documentation links and updating the conjugate gradient (cg) example.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@greptile-apps
Copy link

greptile-apps bot commented Feb 21, 2026

Greptile Summary

This PR fixes documentation issues including correcting the wp.optim.linear.cg function call example to match the current API signature (adding required x parameter and fixing max_iter to maxiter), and adding proper Sphinx :func: formatting to function references in docstrings to enable cross-linking in generated documentation.

  • Fixed cg() example in sparse.rst to include required x=x parameter and corrected max_iter to maxiter
  • Added :func: Sphinx directives to function references in make_polynomial_space docstring
  • Updated CHANGELOG.md with appropriate documentation improvement entries

Confidence Score: 5/5

  • Safe to merge - documentation-only changes with correct API fixes
  • All changes are documentation improvements with no functional code changes. The cg function signature was verified to match the corrected example, and Sphinx formatting changes are syntactically correct.
  • No files require special attention

Important Files Changed

Filename Overview
CHANGELOG.md Added changelog entries for documentation improvements
docs/domain_modules/sparse.rst Fixed cg function call to include required x parameter and corrected parameter name to maxiter
warp/_src/fem/space/init.py Added Sphinx :func: formatting to function references in docstring for proper cross-linking

Last reviewed commit: 8746415

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
CHANGELOG.md (1)

136-137: Consider adding GitHub issue references.

Both new entries lack ([GH-XXX](...)) links. Per project guidelines, CHANGELOG entries should include issue refs where one exists.

📝 Proposed fix
-- Add missing links to docstrings across the API Reference.
-- Update documentation examples for calls to `wp.optim.linear.cg`.
+- Add missing links to docstrings across the API Reference ([GH-XXX](https://github.com/NVIDIA/warp/issues/XXX)).
+- Update documentation examples for calls to `wp.optim.linear.cg` ([GH-XXX](https://github.com/NVIDIA/warp/issues/XXX)).

Based on learnings: "Applies to CHANGELOG.md : Use imperative present tense in CHANGELOG.md ('Add X', not 'Added X' or 'This adds X'). Include issue refs: (GH-XXX). Avoid internal implementation details users wouldn't understand."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CHANGELOG.md` around lines 136 - 137, Update the two CHANGELOG entries ("Add
missing links to docstrings across the API Reference." and "Update documentation
examples for calls to `wp.optim.linear.cg`.") to include the corresponding
GitHub issue references in the format
([GH-XXX](https://github.com/NVIDIA/warp/issues/XXX)); replace XXX with the
actual issue numbers where they exist and leave entries unchanged otherwise,
ensuring the entries remain in imperative present tense.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@CHANGELOG.md`:
- Around line 136-137: Update the two CHANGELOG entries ("Add missing links to
docstrings across the API Reference." and "Update documentation examples for
calls to `wp.optim.linear.cg`.") to include the corresponding GitHub issue
references in the format ([GH-XXX](https://github.com/NVIDIA/warp/issues/XXX));
replace XXX with the actual issue numbers where they exist and leave entries
unchanged otherwise, ensuring the entries remain in imperative present tense.

@shi-eric
Copy link
Contributor

Thanks for the docs fixes, @clatim! In the future, minor typo fixes should not be noted in the changelog, but I'll fix this post-merge in this instance.

@shi-eric shi-eric merged commit 83254b8 into NVIDIA:main Feb 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants