GEOPY-2714: Refactor extent property calculation for all grid objects#369
Merged
GEOPY-2714: Refactor extent property calculation for all grid objects#369
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates extent/windowing utilities used when masking vertices/cells (notably for topography windowing against mesh bounds), removes the now-unused octree_extents helper, and aligns unit tests with the new extent representation.
Changes:
- Remove
octree_extentsutility and its associated test. - Update
mask_vertices_and_cellsto rely ongeoh5py.shared.utils.mask_by_extentand accept an extent array (as used bymesh.entity.extent). - Update topography masking to pass
mesh.entity.extentdirectly, and adjust tests accordingly.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
simpeg_drivers/utils/utils.py |
Reworks extent masking implementation and removes octree_extents. |
simpeg_drivers/components/topography.py |
Switches topography windowing to use mesh.entity.extent directly. |
tests/utils_test.py |
Drops octree_extents test and updates extent shape in mask_vertices_and_cells tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #369 +/- ##
===========================================
- Coverage 89.86% 89.85% -0.01%
===========================================
Files 125 125
Lines 6425 6419 -6
Branches 793 793
===========================================
- Hits 5774 5768 -6
Misses 448 448
Partials 203 203
🚀 New features to boost your workflow:
|
benk-mira
approved these changes
Apr 1, 2026
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.
GEOPY-2714 - Refactor extent property calculation for all grid objects