Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle ValueError in get_onc_ctd salinity resampling #278

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

douglatornell
Copy link
Member

xarray version 2023.05.0 introduced a ValueError exception raised when a
DataArray being resampled is empty. We previously handled that condition by
catching an IndexError. Now we catch ValueError too.

The change to ValueError for an empty salinity DataArray didn't show up in
production until the 14jun24 update of the production environment brought xarray
version 2024.06.0 into use.

A couple of typos were found in the logging messages in the get_onc_ctd worker.
Specifically, the word "exclude" was mistyped as "exlude". This has now been
corrected.
xarray version 2023.05.0 introduced a ValueError exception raised when a
DataArray being resampled is empty. We previously handled that condition by
catching an IndexError. Now we catch ValueError too.

The change to ValueError for an empty salinity DataArray didn't show up in
production until the 14jun24 update of the production environment brought xarray
version 2024.06.0 into use.
@douglatornell douglatornell added bug Something isn't working Workers labels Jun 20, 2024
@douglatornell douglatornell added this to the v24.2 milestone Jun 20, 2024
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 77.65%. Comparing base (f191688) to head (2a3b6c8).
Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
nowcast/workers/get_onc_ctd.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #278   +/-   ##
=======================================
  Coverage   77.65%   77.65%           
=======================================
  Files         133      133           
  Lines       18695    18695           
  Branches     1910     1910           
=======================================
  Hits        14517    14517           
  Misses       4111     4111           
  Partials       67       67           
Flag Coverage Δ
unittests 77.65% <0.00%> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@douglatornell douglatornell merged commit d9f5fbf into main Jun 20, 2024
7 of 8 checks passed
@douglatornell douglatornell deleted the get_onc_ctd-ValueError branch June 20, 2024 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Workers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant