Repository navigation
fix(cvfdutil): preserve conforming shared faces during grid conversion - #2867
Merged
jlarsen-usgs merged 1 commit intoOct 16, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2867 +/- ##
===========================================
+ Coverage 55.5% 73.8% +18.2%
===========================================
Files 644 659 +15
Lines 124135 132511 +8376
===========================================
+ Hits 68947 97816 +28869
+ Misses 55188 34695 -20493
🚀 New features to boost your workflow:
|
jlarsen-usgs
self-requested a review
October 16, 2026 16:12
jlarsen-usgs
approved these changes
Oct 16, 2026
Contributor
|
@oscarfasanchez |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
to_cvfd()can add spurious hanging nodes to conforming Voronoi cells, changing the connection geometry passed to DISV. This also affects meshes imported throughshapefile_to_cvfd(), which delegates toto_cvfd().shared_face()compares a one-element slice with the two vertex IDs of an edge, so it always returnsFalse. Read both consecutive IDs to restore the existing guard that skips segmentation when cells already share a complete face.Add regression coverage for shared edges (including the closing edge), vertex-only contact, and disjoint cells in both argument orders. A four-cell conforming Voronoi fixture with a legitimate 0.205 m edge checks that every cell's complete coordinate ring is preserved. Before the fix, two cells incorrectly gain an extra vertex (6 → 7 and 5 → 6).
Validation:
test_grid.py,test_gridutil.py, andtest_lgrutil.py: 115 passed, 2 xfailed, 1 failed. The failure is the existingtest_voronoi_grid[voronoi_polygon]Triangle cell-count mismatch (3737 versus expected 3803); it also reproduces with the originalshared_face()implementation.ruff checkandruff format --checkpass; spelling and whitespace checks pass for the patch.Full-suite validation remains incomplete locally. The initial attempt stopped at 463 passed, 90 skipped, 2 xfailed, and 6 failures: five unavailable notebook commands in the temporary test environment and the same baseline Triangle mismatch. A subsequent broader non-notebook run was interrupted after further failures and did not produce a completed report.