Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/CODERABBIT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!-- SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -->
<!-- SPDX-License-Identifier: Apache-2.0 -->

# CodeRabbit Configuration

This document explains how CodeRabbit is configured for CUDA Python. For review
commands and guidance, see the
[CodeRabbit section of the contributing guide](../CONTRIBUTING.md#coderabbit).
For complete product documentation, see the
[CodeRabbit documentation](https://docs.coderabbit.ai/).

CUDA Python configures CodeRabbit through [`.coderabbit.yaml`](../.coderabbit.yaml)
in the repository root. For pull requests from a branch in the same repository,
the configuration in that branch is used for the review. Pull requests from
forks use the target branch's configuration instead, so changes to
`.coderabbit.yaml` in a fork do not affect that review.

When setting up or updating CodeRabbit:

1. Keep repository-specific settings in `.coderabbit.yaml`.
2. Use `@coderabbitai configuration` on a pull request to inspect the resolved
configuration. This is useful when checking whether CodeRabbit is using the
expected repository settings for that pull request.
3. Use `@coderabbitai generate configuration` to export the resolved
configuration if a new baseline is needed. This is useful when moving
settings into a reviewable repository configuration file.
4. Keep configuration changes small and reviewable.
5. Use `reviews.path_instructions` for path-specific review guidance.
6. Use `knowledge_base.code_guidelines.filePatterns` for CUDA Python guidance
files that CodeRabbit should read as review context.

The CUDA Python configuration should keep comments focused on correctness, API
stability, performance, security, and other high-impact issues. Avoid enabling
features that add noisy generated comments or code by default.
43 changes: 43 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ Thank you for your interest in contributing to CUDA Python! Based on the type of
- [Enabling git symlinks](#enabling-git-symlinks)
- [Type stubs for cuda.core](#type-stubs-for-cudacore)
- [Pre-commit](#pre-commit)
- [CodeRabbit](#coderabbit)
- [Review Guidance](#review-guidance)
- [Pull Request Reviews](#pull-request-reviews)
- [Pixi lockfiles](#pixi-lockfiles)
- [Signing Your Work](#signing-your-work)
- [Code signing](#code-signing)
Expand Down Expand Up @@ -235,6 +238,46 @@ between commits, leaving stale headers or out-of-date stubs in the history.
If the hook isn't installed, `pre-commit run` will print a visible warning
reminding you to run `pre-commit install`.

## CodeRabbit

This section explains how to use CodeRabbit for CUDA Python pull request review.
For complete product documentation, see the
[CodeRabbit documentation](https://docs.coderabbit.ai/).

### Review Guidance

We treat CodeRabbit feedback as review assistance, not as a merge requirement by
itself. Maintainers remain responsible for deciding whether comments are
actionable and whether a pull request has adequate tests and CI coverage.

### Pull Request Reviews

Automatic reviews may be disabled or restricted by the repository
configuration. PR authors and maintainers can request a review explicitly by
posting a comment on the pull request:

```text
@coderabbitai review
```

Use a full review when the pull request should be reviewed again from scratch:

```text
@coderabbitai full review
```

Other useful commands:

- `@coderabbitai help` shows the current command reference.
- `@coderabbitai configuration` shows the active configuration.
- `@coderabbitai summary` can be placed in the pull request description as a
placeholder for the generated summary.
- `@coderabbitai pause` and `@coderabbitai resume` pause or resume automatic
review behavior. This is useful when a pull request is still being updated
frequently and should not be reviewed again until it is ready.
- `@coderabbitai ignore` can be placed in the pull request description to
disable automatic reviews.

## Pixi lockfiles

The repository checks in a `pixi.lock` next to each `pixi.toml`. Those lockfiles
Expand Down
Loading