-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
deprecate cftime_range() in favor of date_range(use_cftime=True) #10024
base: main
Are you sure you want to change the base?
Conversation
Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient. |
- update other examples that call cftime_range to use date_range(use_cftime=True) instead Issue pydata#9886
…array into cftime_deprecation merging with head.
Fix typo in pull request number
for more information, see https://pre-commit.ci
…array into cftime_deprecation merging what's new changes
- Fix bug in copy/paste bug in cftime_offsets.
type checking is enabled - change the example for cftime_range to use date_range(use_cftime) instead to get around deprecation warnings
per code review issue pydata#9886 Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, @Maddogghoek! Small change, big impact, thanks for tackling this!
Just one question and one suggestion. Hope this attracts more reviewers.
Fix typo in (s/true/True) in what's new for issue pydata#9886 change. Co-authored-by: Kai Mühlbauer <kmuehlbauer@wradlib.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking this on @Maddogghoek! It took me a moment to follow the additional refactoring within _cftime_range
, but generally I think those changes are incremental improvements, so I am OK to leave them in. I have a few nits and some documentation suggestions, but otherwise this is looking good.
Update documentation to steer users to xarray.date_range rather than deprecated xarray.cftime_range. Co-authored-by: Spencer Clark <spencerkclark@gmail.com>
for more information, see https://pre-commit.ci
listed under deprecations instead Co-authored-by: Spencer Clark <spencerkclark@gmail.com>
Co-authored-by: Spencer Clark <spencerkclark@gmail.com>
…ls.emit_user_level_warning rather than warnings.warn
Co-authored-by: Spencer Clark <spencerkclark@gmail.com>
…array into cftime_deprecation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Maddogghoek! I appreciate your careful attention to detail on this. A couple more minor suggestions, but otherwise this looks good to me.
|
||
warn( | ||
emit_user_level_warning( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks for updating this in the contributing guide!
Co-authored-by: Spencer Clark <spencerkclark@gmail.com>
(pydata#9886) Co-authored-by: Spencer Clark <spencerkclark@gmail.com>
(pydata#9886) Co-authored-by: Spencer Clark <spencerkclark@gmail.com>
be more explicit about the valid combinations of start, end, periods, and freq. Co-authored-by: Spencer Clark <spencerkclark@gmail.com>
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Maddogghoek 🎉 Only one minor nit.
pydata#9886 Co-authored-by: Kai Mühlbauer <kmuehlbauer@wradlib.org>
xr.cftime_range
in favor ofxr.date_range
#9886whats-new.rst
No functional changes beyond a deprecation warning, so no test changes.