equinor / xtgeo

XTGeo Python class library for subsurface Surfaces, Cubes, Wells, Grids, Points, etc
https://xtgeo.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
109 stars 56 forks source link

ENH: issue warning or error if output surface is empty or near empty #1156

Closed jcrivenaes closed 5 months ago

jcrivenaes commented 5 months ago

If too few active map nodes, less than 4, a warning will be given when to_file() is called. In addition a new key error_if_near_empty is added, and if this is True, an error will be raised in stead.

Closes #797

codecov-commenter commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (5bd5e34) 80.06% compared to head (feaebad) 80.08%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1156 +/- ## ========================================== + Coverage 80.06% 80.08% +0.02% ========================================== Files 97 97 Lines 13601 13606 +5 Branches 2183 2185 +2 ========================================== + Hits 10889 10896 +7 + Misses 1981 1980 -1 + Partials 731 730 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.