GEOPY-2714: Refactor mask_by_extent utilities for surfaces#865
GEOPY-2714: Refactor mask_by_extent utilities for surfaces#865domfournier merged 13 commits intodevelopfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #865 +/- ##
===========================================
+ Coverage 91.25% 91.28% +0.02%
===========================================
Files 112 112
Lines 10343 10369 +26
Branches 1908 1908
===========================================
+ Hits 9439 9465 +26
Misses 477 477
Partials 427 427
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a consistent “outer bounds” (extent) computation for grid-like objects by introducing a span concept and a shared coordinate transform (uvw_to_xyz), with new tests validating extents across several mesh types (VPModel, Octree, Grid2D, BlockModel).
Changes:
- Added
GridObject.extentbased on transformed span corner points, plus a shareduvw_to_xyztransform and an abstractspanAPI. - Implemented
spanforOctree,Grid2D,BlockModel, andVPModel; updated centroid computations to reuseuvw_to_xyz. - Added new tests for
extenton VPModel/Octree/Grid2D/BlockModel.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
geoh5py/objects/grid_object.py |
Adds shared extent computation, span abstract property, and uvw_to_xyz transform. |
geoh5py/objects/vp_model.py |
Uses uvw_to_xyz for centroids, adds VPModel-specific extent and span, and applies clockwise rotation handling. |
geoh5py/objects/octree.py |
Adds span implementation used by GridObject.extent. |
geoh5py/objects/grid2d.py |
Uses shared uvw_to_xyz and adds span for extent support. |
geoh5py/objects/block_model.py |
Uses shared uvw_to_xyz for centroids and adds span for extent support. |
tests/vp_mesh_test.py |
Adds VPModel extent test. |
tests/octree_test.py |
Adds Octree extent test. |
tests/grid_2d_test.py |
Adds Grid2D extent test. |
tests/block_model_test.py |
Adds BlockModel extent test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MatthieuCMira
left a comment
There was a problem hiding this comment.
I agree with the change.
I have the feeling we should add test for negative cell size values.
# Conflicts: # geoh5py/objects/block_model.py # geoh5py/objects/grid_object.py # tests/block_model_test.py # tests/grid_2d_test.py
# Conflicts: # geoh5py/shared/utils.py # geoh5py/ui_json/annotations.py # geoh5py/ui_json/forms.py # geoh5py/ui_json/ui_json.py # geoh5py/ui_json/validation.py
GEOPY-2714 - Refactor mask_by_extent utilities for surfaces