Skip to content

Use zip_expected_warnings() where possible - #160

Merged
rapids-bot[bot] merged 1 commit into
rapidsai:mainfrom
KyleFromNVIDIA:use-zip_expected_warnings
Oct 7, 2026
Merged

rapids-bot[bot] merged 1 commit into
rapidsai:mainfrom
KyleFromNVIDIA:use-zip_expected_warnings

Conversation

@KyleFromNVIDIA

Copy link
Copy Markdown
Member

Remove some test code duplication by using this helper. Leave some areas of the code where using the helper would make the test code bigger.

Remove some test code duplication by using this helper. Leave some
areas of the code where using the helper would make the test code
bigger.
@KyleFromNVIDIA
KyleFromNVIDIA requested a review from a team as a code owner October 6, 2026 18:10
@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: rapidsai/pre-commit-hooks/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: d175316d-b378-4a7a-90a9-824d7adb87fe
📥 Commits

Reviewing files that changed from the base of the PR and between b6569b7 and 6a4b4ce.

📒 Files selected for processing (3)
  • tests/rapids_pre_commit_hooks/dependencies/test_use_cuda_wheels.py
  • tests/rapids_pre_commit_hooks/test_codeowners.py
  • tests/rapids_pre_commit_hooks/test_copyright.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Tests
    • Updated automated checks for CUDA wheel dependencies, code ownership, and copyright notices to verify diagnostic messages alongside their source locations.
    • Standardized how expected warnings, notes, and suggested replacements are represented across these checks.

Walkthrough

Tests for CUDA-wheel, CODEOWNERS, and copyright checks now use zip_expected_warnings and named source-span annotations to compare expected diagnostics. The copyright test file’s declaration also names “NVIDIA CORPORATION & AFFILIATES.”

Changes

Span-aware warning test expectations

Layer / File(s) Summary
Adopt shared warning expectations
tests/rapids_pre_commit_hooks/dependencies/test_use_cuda_wheels.py, tests/rapids_pre_commit_hooks/test_codeowners.py, tests/rapids_pre_commit_hooks/test_copyright.py
The tests use zip_expected_warnings instead of manually constructing expected warning objects. Expected warning and replacement locations use named-span annotations. The copyright test declaration now includes “& AFFILIATES.”

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Other

Suggested reviewers: jameslamb

Merge Risk: ⚪ Minimal · up to 6a4b4

The test refactor appears mergeable after normal checks.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: using zip_expected_warnings() in tests where it reduces duplication.
Description check ✅ Passed The description explains that the change reduces test-code duplication by using the helper where it keeps tests smaller.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@KyleFromNVIDIA

Copy link
Copy Markdown
Member Author

/merge

@rapids-bot
rapids-bot Bot merged commit 6772845 into rapidsai:main Oct 7, 2026
4 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