MESMER-group / mesmer

spatially-resolved ESM-specific multi-scenario initial-condition ensemble emulator
https://mesmer-emulator.readthedocs.io/en/latest/
GNU General Public License v3.0
23 stars 17 forks source link

MESMER-X: decorator to supress warnings #467

Closed mathause closed 3 months ago

mathause commented 3 months ago

Created a decorator to suppress the warnings. This allows to avoid a level of indentation, unfortunately there is not much that is unwrapped. But should become slightly easier to read anyway. We absolutely need to be more specific which warnings we suppress, because currently we also miss deprecations and other warnings we want to see - but have to defer that until we have some running tests to see what warnings there are. github does not seem to get the correct diff...

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 0% with 50 lines in your changes missing coverage. Please review.

Project coverage is 51.74%. Comparing base (9b0b76b) to head (df160c4). Report is 97 commits behind head on main.

Files with missing lines Patch % Lines
mesmer/mesmer_x/train_l_distrib_mesmerx.py 0.00% 50 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #467 +/- ## =========================================== - Coverage 87.90% 51.74% -36.16% =========================================== Files 40 50 +10 Lines 1745 3231 +1486 =========================================== + Hits 1534 1672 +138 - Misses 211 1559 +1348 ``` | [Flag](https://app.codecov.io/gh/MESMER-group/mesmer/pull/467/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=MESMER-group) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/MESMER-group/mesmer/pull/467/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=MESMER-group) | `51.74% <0.00%> (-36.16%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=MESMER-group#carryforward-flags-in-the-pull-request-comment) to find out more.

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

mathause commented 3 months ago

The diff works better if whitespace differences are ignored

image

merging