equinor / ert

ERT - Ensemble based Reservoir Tool - is designed for running ensembles of dynamical models such as reservoir models, in order to do sensitivity analysis and data assimilation. ERT supports data assimilation using the Ensemble Smoother (ES), Ensemble Smoother with Multiple Data Assimilation (ES-MDA) and Iterative Ensemble Smoother (IES).
https://ert.readthedocs.io/en/latest/
GNU General Public License v3.0
99 stars 104 forks source link

Simplify PlotLimits #8132

Closed eivindjahren closed 1 month ago

eivindjahren commented 1 month ago

The PlotLimits class implements runtime typechecking in a very magical way. The type checking isn't really used for anything so it is more useful to implement it in a such a way that it can be type checked by mypy.

All functionality of the "undostack" setting the plotlimits in the custmization panel seems to still work as expected:

image

The DEPTH_AXIS seems to be unused, and index axis makes the corresponding customization field not accept "-" so the minimum is enforced by the text field:

image

When applicable

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 98.70130% with 1 line in your changes missing coverage. Please review.

Project coverage is 86.53%. Comparing base (37c4d20) to head (01b6c3e). Report is 1 commits behind head on main.

Files Patch % Lines
.../tools/plot/customize/limits_customization_view.py 66.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #8132 +/- ## ========================================== + Coverage 86.51% 86.53% +0.02% ========================================== Files 383 383 Lines 23742 23714 -28 Branches 629 634 +5 ========================================== - Hits 20540 20522 -18 + Misses 3126 3117 -9 + Partials 76 75 -1 ```

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