openradar / xradar

A tool to work in weather radar data in xarray
https://docs.openradarscience.org/projects/xradar
MIT License
85 stars 17 forks source link

FIX: use len(unique) to estimate unique entry #151

Closed martinpaule closed 4 months ago

martinpaule commented 4 months ago

Addressed an issue in model.py, where having multiple distances between gates (either by manually setting the radar to have varying steps or by small float inaccuracies) causes the reading of a ODIM h5 file to crash, as the "if unique" can't resolve the condition for a multiple-element array.

More details on this in issue #150.

kmuehlbauer commented 4 months ago

Thanks @martinpaule, I'll fix the linter/style errors in another PR. Just hang on a bit.

codecov[bot] commented 4 months ago

Codecov Report

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

Comparison is base (e7b7a39) 88.33% compared to head (dc29ee1) 88.33%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #151 +/- ## ======================================= Coverage 88.33% 88.33% ======================================= Files 20 20 Lines 3439 3439 ======================================= Hits 3038 3038 Misses 401 401 ``` | [Flag](https://app.codecov.io/gh/openradar/xradar/pull/151/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openradar) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/openradar/xradar/pull/151/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openradar) | `88.33% <100.00%> (ø)` | | 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=openradar#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.

kmuehlbauer commented 4 months ago

@martinpaule Looking good to me. Nothing to add for this simple fix.

Are you OK being mentioned in history.md? If so I'd merge this now and get a bug-fix release out in direct course.

martinpaule commented 4 months ago

@kmuehlbauer Of course, feel free to mention me in history.md.

Thank You for all Your communications :)