Skip to content

feat(query): add topology-aware simplex barycenters - #501

Merged
acgetchell merged 3 commits into
mainfrom
feat/420-simplex-barycenter
Jul 3, 2026
Merged

acgetchell merged 3 commits into
mainfrom
feat/420-simplex-barycenter

Conversation

@acgetchell

Copy link
Copy Markdown
Owner
  • Add DelaunayTriangulation::simplex_barycenter for Euclidean and periodic triangulations.
  • Surface typed barycenter failures through SimplexBarycenterError and DelaunayError.
  • Export the barycenter error through root, query, and prelude facades.
  • Add benchmark coverage for the public barycenter query.
  • Refresh dependency locks and align the pinned Markdown linter on rumdl 0.2.28.

Closes #420

- Add `DelaunayTriangulation::simplex_barycenter` for Euclidean and periodic triangulations.
- Surface typed barycenter failures through `SimplexBarycenterError` and `DelaunayError`.
- Export the barycenter error through root, query, and prelude facades.
- Add benchmark coverage for the public barycenter query.
- Refresh dependency locks and align the pinned Markdown linter on `rumdl` 0.2.28.

Closes #420
@acgetchell acgetchell self-assigned this Jul 3, 2026
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: f62f756e-23bf-49e5-9cdd-5d2fdf400ee5

📥 Commits

Reviewing files that changed from the base of the PR and between 92f7f23 and 626b93a.

📒 Files selected for processing (8)
  • .config/nextest.toml
  • README.md
  • benches/README.md
  • docs/api_design.md
  • docs/architecture/prelude_reference.md
  • docs/workflows.md
  • src/delaunay/query.rs
  • tests/COVERAGE.md
✅ Files skipped from review due to trivial changes (6)
  • benches/README.md
  • README.md
  • docs/architecture/prelude_reference.md
  • docs/workflows.md
  • tests/COVERAGE.md
  • .config/nextest.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/delaunay/query.rs

Walkthrough

Adds a public topology-aware simplex barycenter API and error type, wires them into exports, tests, and benchmarks, and updates CI coverage, tooling pins, dependency versions, and a few test-support utilities.

Changes

Simplex Barycenter Feature

Layer / File(s) Summary
Barycenter error and computation
src/delaunay/query.rs
Adds SimplexBarycenterError and implements simplex_barycenter with simplex validation, periodic lifting, averaging, canonicalization, and point validation.
Delaunay error integration
src/delaunay/construction.rs
Adds DelaunayError::SimplexBarycenter, a conversion from SimplexBarycenterError, and related doc updates.
Exports, tests, and benchmark wiring
src/lib.rs, tests/prelude_exports.rs, benches/allocation_hot_paths.rs
Re-exports SimplexBarycenterError, extends prelude export coverage, and switches the allocation benchmark to the public barycenter API with a dedicated benchmark case.

Tooling, coverage, and version updates

Layer / File(s) Summary
Version pins and docs
.github/workflows/ci.yml, justfile, docs/dev/tooling-alignment.md, Cargo.toml
Bumps rumdl and dependency versions and updates the tooling-alignment note.
Coverage workflow and profile
.config/nextest.toml, .github/workflows/codecov.yml, justfile, tests/COVERAGE.md
Adds a coverage nextest profile, routes coverage through cargo llvm-cov nextest, and updates Codecov paths and coverage documentation.
Storage test-helper visibility
src/core/tds/storage.rs
Broadens visibility of internal storage test helpers to pub(crate).

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related issues

Possibly related PRs

Suggested labels: enhancement, rust, api, geometry, topology

Poem

Hoppity hop, I traced the barycenter bright,
Through wrapped-up space and periodic light.
New errors, exports, and tests took their place,
While CI trimmed its coverage race.
🐇✨ I nibble leaves and thump in delight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding topology-aware simplex barycenters.
Description check ✅ Passed The description matches the changeset, covering the barycenter API, error typing, exports, benchmarks, and dependency updates.
Linked Issues check ✅ Passed The PR implements the requested public simplex barycenter helper with periodic lifting and wrapping, matching issue #420's goals.
Out of Scope Changes check ✅ Passed The dependency, CI, benchmark, and documentation updates all support the barycenter work or the stated housekeeping tasks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/420-simplex-barycenter

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

@acgetchell
acgetchell enabled auto-merge (squash) July 3, 2026 16:57
@codacy-production

codacy-production Bot commented Jul 3, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 51 complexity

Metric Results
Complexity 51

View in Codacy

🟢 Coverage 97.80% diff coverage · +0.07% coverage variation

Metric Results
Coverage variation +0.07% coverage variation (-1.00%)
Diff coverage 97.80% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (9cecd49) 77903 70960 91.09%
Head commit (626b93a) 78264 (+361) 71345 (+385) 91.16% (+0.07%)

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 (#501) 363 355 97.80%

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.

@coderabbitai coderabbitai Bot added api enhancement New feature or request geometry Geometry-related issues rust Pull requests that update rust code labels Jul 3, 2026
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.79614% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.13%. Comparing base (9cecd49) to head (626b93a).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/delaunay/query.rs 97.99% 7 Missing ⚠️
src/core/tds/storage.rs 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #501      +/-   ##
==========================================
+ Coverage   91.06%   91.13%   +0.07%     
==========================================
  Files          87       87              
  Lines       77679    78040     +361     
==========================================
+ Hits        70738    71123     +385     
+ Misses       6941     6917      -24     
Flag Coverage Δ
unittests 91.13% <97.79%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

- Generate Cobertura coverage and Codecov JUnit results from the same
  instrumented nextest run.
- Keep property tests in the coverage job with a dedicated coverage profile and
  bounded timeout for LLVM instrumentation overhead.
- Remove the stale multiple-crate-versions lint expectation and make the
  barycenter allocation benchmark tolerate exact-float roundoff.
@coderabbitai coderabbitai Bot added the topology label Jul 3, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.config/nextest.toml (1)

58-62: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate junit config vs. profile.ci.junit.

This block is identical to the existing [profile.ci.junit] (path, store-success-output, store-failure-output). Consider inheriting from ci instead of duplicating, so future changes to junit settings don't silently drift between profiles.

♻️ Proposed refactor using profile inheritance
 [profile.coverage]
+inherits = "ci"
 # Coverage runs execute LLVM-instrumented binaries in parallel, so exact
 # predicate regressions need more headroom than the normal CI profile while
 # still failing genuine hangs.
 failure-output = "immediate-final"
 success-output = "never"
 fail-fast = false
 retries = 0
 slow-timeout = { period = "300s", terminate-after = 1 }
-
-[profile.coverage.junit]
-path = "test-results/junit.xml"
-store-success-output = false
-store-failure-output = true
🤖 Prompt for 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.

In @.config/nextest.toml around lines 58 - 62, The [profile.coverage.junit]
block duplicates the same junit settings already defined under profile.ci.junit,
so update the nextest config to inherit from ci instead of repeating
path/store-success-output/store-failure-output values. Locate the junit profile
blocks in the TOML config and replace the duplicated coverage junit settings
with inheritance from profile.ci, keeping any coverage-specific overrides only
if they differ from ci.
🤖 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.

Nitpick comments:
In @.config/nextest.toml:
- Around line 58-62: The [profile.coverage.junit] block duplicates the same
junit settings already defined under profile.ci.junit, so update the nextest
config to inherit from ci instead of repeating
path/store-success-output/store-failure-output values. Locate the junit profile
blocks in the TOML config and replace the duplicated coverage junit settings
with inheritance from profile.ci, keeping any coverage-specific overrides only
if they differ from ci.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 4a8f1e29-8cb9-41eb-a3cd-042c8233bad8

📥 Commits

Reviewing files that changed from the base of the PR and between 403b273 and 92f7f23.

📒 Files selected for processing (6)
  • .config/nextest.toml
  • .github/workflows/codecov.yml
  • benches/allocation_hot_paths.rs
  • justfile
  • src/lib.rs
  • tests/COVERAGE.md
💤 Files with no reviewable changes (1)
  • src/lib.rs
✅ Files skipped from review due to trivial changes (1)
  • tests/COVERAGE.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • benches/allocation_hot_paths.rs

@acgetchell
acgetchell disabled auto-merge July 3, 2026 17:54
- Document `simplex_barycenter` as the topology-aware local-editing point for
  k=1 Pachner insert proposals.
- Update query-prelude, benchmark, and coverage docs to match the current
  barycenter and Codecov/nextest surfaces.
- Cover barycenter overflow, periodic lift, canonicalization, and
  point-validation error paths while inheriting CI JUnit settings for coverage.
@acgetchell
acgetchell enabled auto-merge (squash) July 3, 2026 19:00
@acgetchell
acgetchell merged commit a096ece into main Jul 3, 2026
24 checks passed
@acgetchell
acgetchell deleted the feat/420-simplex-barycenter branch July 3, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api enhancement New feature or request geometry Geometry-related issues rust Pull requests that update rust code topology

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose lift-aware simplex barycenter helper

1 participant