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

Tileserver: handle timezone-aware request parameters #808

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pont-us
Copy link
Member

@pont-us pont-us commented Feb 10, 2023

Fixes #807.

With this PR, the xcube tileserver now handles timezone-aware timestamps in requests by converting them to timezone-naive timestamps before passing them to numpy. This avoids the warning

xcube/xcube/core/_tile2.py:659: DeprecationWarning: parsing timezone aware datetimes is deprecated; this will raise an error in the future

and, in future, the numpy error which will replace the warning.

Checklist:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/source/*
  • Changes documented in CHANGES.md
  • AppVeyor CI passes
  • Test coverage remains or increases (target 100%)

Before trying to remove the timezone from a label, check that the
relevant dimension is actually a datetime64.

Addresses #807.
@codecov-commenter
Copy link

Codecov Report

Base: 92.86% // Head: 92.86% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (b3a0169) compared to base (02632ef).
Patch coverage: 80.00% of modified lines in pull request are covered.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #808      +/-   ##
==========================================
- Coverage   92.86%   92.86%   -0.01%     
==========================================
  Files         410      410              
  Lines       32605    32610       +5     
==========================================
+ Hits        30279    30283       +4     
- Misses       2326     2327       +1     
Impacted Files Coverage Δ
xcube/core/_tile2.py 94.03% <80.00%> (-0.24%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@forman
Copy link
Member

forman commented Feb 27, 2023

Note, test coverage dropped.

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.

Avoid numpy "parsing timezone aware datetimes is deprecated" warning in tile server
3 participants