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

Fix xarray warning #1505

Closed
wants to merge 8 commits into from
Closed

Fix xarray warning #1505

wants to merge 8 commits into from

Conversation

thorbjoernl
Copy link
Collaborator

Change Summary

Missed an xarray warning in #1502 which didn't surface in the tests surprisingly enough.

FutureWarning: In a future version of xarray decode_timedelta will default to False rather than None. To silence this warning, set decode_timedelta to True, False, or a 'CFTimedeltaCoder' instance.
  with xr.open_mfdataset(list(UEMEP_PATH.glob("*.nc")), engine="netcdf4") as dt:

This sets decode_timedelta to true for all opendataset calls, which maintains the old behaviour.

Related issue number

#1066

Checklist

  • Start with a draft-PR
  • The PR title is a good summary of the changes
  • PR is set to AeroTools and a tentative milestone
  • Documentation reflects the changes where applicable
  • Tests for the changes exist where applicable
  • Tests pass locally
  • Tests pass on CI
  • At least 1 reviewer is selected
  • Make PR ready to review

@thorbjoernl thorbjoernl marked this pull request as ready for review February 6, 2025 09:54
@thorbjoernl thorbjoernl added this to the m2025-02 milestone Feb 6, 2025
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 48.21429% with 58 lines in your changes missing coverage. Please review.

Project coverage is 78.34%. Comparing base (d90ad0f) to head (c27e575).
Report is 65 commits behind head on main-dev.

Files with missing lines Patch % Lines
pyaerocom/io/pyaro/postprocess.py 47.16% 56 Missing ⚠️
pyaerocom/colocation/colocation_utils.py 0.00% 1 Missing ⚠️
pyaerocom/io/cams2_83/reader.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           main-dev    #1505      +/-   ##
============================================
- Coverage     78.49%   78.34%   -0.16%     
============================================
  Files           140      140              
  Lines         21299    21405     +106     
============================================
+ Hits          16719    16769      +50     
- Misses         4580     4636      +56     
Flag Coverage Δ
unittests 78.34% <48.21%> (-0.16%) ⬇️

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.

@thorbjoernl thorbjoernl marked this pull request as draft February 6, 2025 10:04
@thorbjoernl thorbjoernl closed this Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants