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: prevent integer overflow when calculating azimuth in FURUNO scn files #138

Closed kmuehlbauer closed 8 months ago

kmuehlbauer commented 8 months ago
kmuehlbauer commented 8 months ago

We can't really test this without having a file which contains that issue. Or we would need to think to refactor the code into functions we can test. Until now we just might have to live with the current state of affairs.

codecov[bot] commented 8 months ago

Codecov Report

Merging #138 (a6f85fb) into main (2bbb5cd) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #138   +/-   ##
=======================================
  Coverage   88.32%   88.32%           
=======================================
  Files          20       20           
  Lines        3436     3436           
=======================================
  Hits         3035     3035           
  Misses        401      401           
Flag Coverage Δ
unittests 88.32% <ø> (ø)

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

Files Coverage Δ
xradar/io/backends/furuno.py 91.41% <ø> (ø)
kmuehlbauer commented 8 months ago

@mgrover1 I'll go ahead and merge tomorrow. Will also do a new release then.

giacant commented 8 months ago

We can't really test this without having a file which contains that issue. Or we would need to think to refactor the code into functions we can test. Until now we just might have to live with the current state of affairs.

I can give you more files with this problem if you need

kmuehlbauer commented 8 months ago

No worries @giacant, I was thinking about that refactor for some while now.

No need to have a file for this right now.

BTW, would you mind testing that branch? Just in case. 😀

giacant commented 8 months ago

Yes, if you explain me how😀

kmuehlbauer commented 8 months ago

https://docs.openradarscience.org/projects/xradar/en/stable/installation.html

Section: From sources. Just clone from my fork and check out this very branch.

giacant commented 8 months ago

I'm using anaconda 3, no matters?

kmuehlbauer commented 8 months ago

Yep, just create a new environment for that test. You can throw it away after that.

giacant commented 8 months ago

Ok, I think i do that, now the versione of xradar is xradar 0.4.1.dev3+g2bbb5cd

But i still have the error when plot snc file

kmuehlbauer commented 8 months ago

@giacant That version is the latest version on main.

Try that, it should directly install this branch.

python -m pip install git+https://github.com/kmuehlbauer/xradar.git@fix-137

giacant commented 8 months ago

OK, now it works!