aodn / python-aodntools

Repository for templates and code relating to generating standard NetCDF files for the Australia Ocean Data Network
GNU Lesser General Public License v3.0
10 stars 3 forks source link

Fix velocity hourly IndexError #165

Closed mhidas closed 2 years ago

mhidas commented 2 years ago

This is an error that occurs when the time_deployment_start/end attributes in an input file represent a longer time span than what is actually covered by the data. Previously this could lead to the code trying to select and process an empty subset of the data.

codecov[bot] commented 2 years ago

Codecov Report

Merging #165 (7ee2483) into master (35e0167) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #165   +/-   ##
=======================================
  Coverage   84.86%   84.86%           
=======================================
  Files          12       12           
  Lines        1130     1130           
  Branches      156      156           
=======================================
  Hits          959      959           
  Misses        152      152           
  Partials       19       19           
Impacted Files Coverage Δ
.../timeseries_products/velocity_hourly_timeseries.py 95.15% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 35e0167...7ee2483. Read the comment docs.

mhidas commented 2 years ago

@bpasquer @lbesnard My usual reviewer Leo is away, but this is just a very quick fix that should be pretty easy to review based on my explanation above. Any chance one of you could do a quick review?

mhidas commented 2 years ago

Thanks @bpasquer !