openradar / xradar

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

FIX: Cast boolean string to int in rainbow dictionary #113

Closed egouden closed 1 year ago

egouden commented 1 year ago

Currently a boolean string value of "0" in the Rainbow file (e.g. antdirection) is converted to True instead of False.

bool("0") => True

codecov[bot] commented 1 year ago

Codecov Report

Merging #113 (c12d895) into main (6fe2ea0) will decrease coverage by 0.03%. The diff coverage is 100.00%.

:exclamation: Current head c12d895 differs from pull request most recent head b3e952e. Consider uploading reports for the commit b3e952e to get more accurate results

@@            Coverage Diff             @@
##             main     #113      +/-   ##
==========================================
- Coverage   88.08%   88.05%   -0.03%     
==========================================
  Files          19       19              
  Lines        3297     3299       +2     
==========================================
+ Hits         2904     2905       +1     
- Misses        393      394       +1     
Flag Coverage Δ
unittests 88.05% <100.00%> (-0.03%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
xradar/io/backends/rainbow.py 92.10% <100.00%> (-0.21%) :arrow_down:
kmuehlbauer commented 1 year ago

@egouden Thanks, to which issue does this refer? Where does that issue manifest for your workflow? At least a short code example showing the issue would be great.

egouden commented 1 year ago

The bug is now described.

egouden commented 1 year ago

The diff coverage is 100 %.

kmuehlbauer commented 1 year ago

Thanks @egouden for this fix. I've added an entry to the changelog (history.md) and will merge after the CI is happy.

kmuehlbauer commented 1 year ago

I'll merge this one now, unittests are good. I'll get my hands dirty on the failing notebooks later (see #115).