refactor(geometry): streamline iterator helpers for diagnostics work#471
Conversation
- Preserve point-generator preallocation while using fallible iterator control flow. - Extract Poisson spacing checks and stream geometry test distance calculations. - Gate benchmark setup tracing behind bench-logging and update diagnostics examples to use DelaunayResult.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (11)
✅ Files skipped from review due to trivial changes (6)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughRefactors collection-building loops to iterator pipelines ( ChangesIterator Refactoring, Doc Fixes, and Bench Feature Gating
Tool Version Updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | -10 |
🟢 Coverage 100.00% diff coverage · +0.01% coverage variation
Metric Results Coverage variation ✅ +0.01% coverage variation (-1.00%) Diff coverage ✅ 100.00% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (db46fa2) 69017 63270 91.67% Head commit (011fb00) 69013 (-4) 63272 (+2) 91.68% (+0.01%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#471) 64 64 100.00% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@benches/common/bench_utils.rs`:
- Around line 32-33: The documentation comment for the `abort_benchmark`
function states it unconditionally emits through tracing, but the actual
implementation at lines 39-40 skips logging when the `bench-logging` feature is
disabled. Update the doc comment to accurately reflect this conditional behavior
by noting that tracing emission only occurs when the `bench-logging` feature is
enabled, or by describing both execution paths for clarity.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: 7c238765-803f-467a-b41f-12401d77a44e
📒 Files selected for processing (8)
benches/common/bench_utils.rsdocs/diagnostics.mdsrc/delaunay/builder.rssrc/delaunay/validation.rssrc/geometry/algorithms/convex_hull.rssrc/geometry/quality.rssrc/geometry/util/point_generation.rstests/proptest_geometry.rs
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #471 +/- ##
=======================================
Coverage 91.64% 91.65%
=======================================
Files 72 72
Lines 68796 68792 -4
=======================================
+ Hits 63051 63053 +2
+ Misses 5745 5739 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
- Replace manual accumulation loops in geometry diagnostics, quality helpers, point generation, and proptests with iterator adapters. - Preserve Poisson spacing and scale-aware epsilon invariants while reducing intermediate mutation. - Standardize Delaunay doctests on DelaunayResult and fix diagnostics validation examples. - Gate benchmark tracing behind bench-logging and refresh pinned uv, just, rumdl, and semgrep tooling.
Closes #353