Skip to content

GEOPY-2786: add a mthode to access the reshaped values in geoh5py for 2d grid and 3dgrid#863

Merged
domfournier merged 4 commits intodevelopfrom
GEOPY-2786
Mar 30, 2026
Merged

GEOPY-2786: add a mthode to access the reshaped values in geoh5py for 2d grid and 3dgrid#863
domfournier merged 4 commits intodevelopfrom
GEOPY-2786

Conversation

@MatthieuCMira
Copy link
Copy Markdown
Contributor

@MatthieuCMira MatthieuCMira commented Mar 26, 2026

GEOPY-2786 - add a mthode to access the reshaped values in geoh5py for 2d grid and 3dgrid
add a method on grid2d and block model to access shaped data

Copilot AI review requested due to automatic review settings March 26, 2026 15:23
@github-actions github-actions bot changed the title GEOPY-2786 GEOPY-2786: add a mthode to access the reshaped values in geoh5py for 2d grid and 3dgrid Mar 26, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds convenience APIs on Grid2D and BlockModel to retrieve cell-associated data reshaped into grid-aligned numpy arrays, with accompanying unit tests.

Changes:

  • Add shaped_data_values(...) to Grid2D and BlockModel.
  • Add shared _get_unique_data(...) helper on GridObject to resolve a unique Data entity and validate its association.
  • Add tests covering reshaping behavior and basic error cases.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
geoh5py/objects/grid_object.py Introduces _get_unique_data helper for resolving/validating Data references.
geoh5py/objects/grid2d.py Adds Grid2D.shaped_data_values returning 2D-shaped cell data (with V-axis flip).
geoh5py/objects/block_model.py Adds BlockModel.shaped_data_values returning 3D-shaped cell data using Fortran ordering.
tests/grid_2d_test.py Adds tests for Grid2D.shaped_data_values and error handling.
tests/block_model_test.py Adds test for BlockModel.shaped_data_values.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.18%. Comparing base (61d64e0) to head (790b4cf).
⚠️ Report is 5 commits behind head on develop.

Files with missing lines Patch % Lines
geoh5py/objects/grid_object.py 76.92% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #863      +/-   ##
===========================================
+ Coverage    91.14%   91.18%   +0.03%     
===========================================
  Files          115      115              
  Lines        10332    10353      +21     
  Branches      1911     1915       +4     
===========================================
+ Hits          9417     9440      +23     
+ Misses         490      487       -3     
- Partials       425      426       +1     
Files with missing lines Coverage Δ
geoh5py/objects/block_model.py 98.50% <100.00%> (+0.09%) ⬆️
geoh5py/objects/grid2d.py 89.65% <100.00%> (+0.29%) ⬆️
geoh5py/objects/grid_object.py 96.00% <76.92%> (-4.00%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@domfournier domfournier merged commit a4d8267 into develop Mar 30, 2026
20 checks passed
@domfournier domfournier deleted the GEOPY-2786 branch March 30, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants