GEOPY-2590: Add validator for negative on NDV values in uncertainties#394
Open
domfournier wants to merge 4 commits intorelease/GA_4.8from
Open
GEOPY-2590: Add validator for negative on NDV values in uncertainties#394domfournier wants to merge 4 commits intorelease/GA_4.8from
domfournier wants to merge 4 commits intorelease/GA_4.8from
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds explicit validation of inversion uncertainty inputs (NaN/NDV and negative values) and corresponding regression tests to ensure invalid uncertainties fail fast with a clear error.
Changes:
- Add
BaseInversionOptions.uncertaintiesvalidation that raisesGeoAppsErrorwhen uncertainties contain NaNs (NDV) or negative values. - Add new
test_bad_uncertaintiescases for Magnetotellurics and Gravity drivers. - Adjust MT test data setup to avoid copying newly created uncertainty data entities.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
simpeg_drivers/options.py |
Adds uncertainty validation + tweaks property-group data retrieval and component data/uncertainty return shape. |
tests/run_tests/driver_mt_test.py |
Adds MT invalid-uncertainty test and adjusts uncertainty creation in synthetic setup. |
tests/run_tests/driver_grav_test.py |
Adds Gravity invalid-uncertainty test (negative uncertainty). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
20
to
21
| from geoapps_utils import GeoAppsError | ||
| from geoapps_utils.base import Options |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/GA_4.8 #394 +/- ##
==================================================
+ Coverage 90.17% 90.20% +0.03%
==================================================
Files 129 129
Lines 6474 6484 +10
Branches 817 820 +3
==================================================
+ Hits 5838 5849 +11
Misses 422 422
+ Partials 214 213 -1
🚀 New features to boost your workflow:
|
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-2590 - Add validator for negative on NDV values in uncertainties