ecmwf / earthkit-data

A format-agnostic Python interface for geospatial data
Apache License 2.0
57 stars 17 forks source link

Prevent calling eccodes.codes_set_key_vals with an empty dict #530

Closed sandorkertesz closed 1 week ago

sandorkertesz commented 1 week ago

This PR prevents eccodes from printing to LOG.error when eccodes.codes_set_key_vals() is called with an empty dictionary.

Originally this error message was generated:

gribapi.errors.InvalidKeyValueError: Empty key/values argument
Failed to set metadata at once: Empty key/values argument
codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 33.33333% with 6 lines in your changes missing coverage. Please review.

Project coverage is 90.43%. Comparing base (e65b9c1) to head (8c319b7).

Files with missing lines Patch % Lines
tests/sources/test_mars.py 33.33% 6 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #530 +/- ## =========================================== - Coverage 90.48% 90.43% -0.05% =========================================== Files 148 148 Lines 10782 10791 +9 Branches 511 511 =========================================== + Hits 9756 9759 +3 - Misses 862 868 +6 Partials 164 164 ```

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


🚨 Try these New Features: