Skip to content

GEOPY-2590: B#403

Merged
domfournier merged 2 commits intorelease/GA_4.8from
GEOPY-2590B
May 8, 2026
Merged

GEOPY-2590: B#403
domfournier merged 2 commits intorelease/GA_4.8from
GEOPY-2590B

Conversation

@domfournier
Copy link
Copy Markdown
Collaborator

@domfournier domfournier commented May 8, 2026

GEOPY-2590 - Add validator for negative on NDV values in uncertainties

Copilot AI review requested due to automatic review settings May 8, 2026 20:25
@github-actions github-actions Bot changed the title GEOPY-2590B GEOPY-2590: B May 8, 2026
Copy link
Copy Markdown
Contributor

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

Updates inversion uncertainty validation to ignore NDV/invalid uncertainty entries where the corresponding data are also NDV (NaN), and extends the MT regression test to cover this behavior.

Changes:

  • Refine BaseInversionOptions.uncertainties validation to only flag NaN/negative uncertainties where data are finite.
  • Extend MT test to include an uncertainty NDV case that should be ignored because the paired data are also NDV.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
simpeg_drivers/options.py Masks uncertainty validation by data NaNs to avoid flagging uncertainties on NDV data.
tests/run_tests/driver_mt_test.py Adds a regression case ensuring uncertainties with NDV are not flagged when the corresponding data are also NDV.

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

Comment thread simpeg_drivers/options.py
Comment on lines +635 to +638
for uncert, data in zip(
out[k].values(), self.component_data(k).values(), strict=True
):
if np.any((np.isnan(uncert) | (uncert < 0)) & ~np.isnan(data)):
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Na, we know they always have the same lenght

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.36%. Comparing base (b3f9021) to head (f51773e).

Additional details and impacted files
@@                Coverage Diff                 @@
##           release/GA_4.8     #403      +/-   ##
==================================================
+ Coverage           90.34%   90.36%   +0.01%     
==================================================
  Files                 110      110              
  Lines                6527     6527              
  Branches              826      826              
==================================================
+ Hits                 5897     5898       +1     
  Misses                416      416              
+ Partials              214      213       -1     
Files with missing lines Coverage Δ
simpeg_drivers/options.py 95.34% <100.00%> (ø)

... and 1 file 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 28e347e into release/GA_4.8 May 8, 2026
21 checks passed
@domfournier domfournier deleted the GEOPY-2590B branch May 8, 2026 20:40
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