-
-
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
Preserve base
and loffset
arguments in resample
#7444
Conversation
While pandas is getting set to remove these, we have not had a chance to emit a deprecation warning yet for them in xarray. This should hopefully give users some extra time to adapt.
base and
loffset arguments in
resample`base
and loffset
arguments in resample
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.
I think the checks on base
are backwards? It's raising a warning when base is None
which makes the doctests fail.
Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
both the failing upstream-dev CI and the failing docs CI seem to be unrelated to this. The So considering that, how much do you think is needed until we can merge this? And can I help with anything? |
The version in that PR is just a container for the factorize method. I'm waiting for this to get merged before continuing |
Shall we merge? AFAICT all groupby and resample tests now pass on
|
base
and loffset
arguments in resample
base
and loffset
arguments in resample
the docs failure is real, I think we need to update xarray/doc/user-guide/weather-climate.rst Line 236 in 821dc24
|
Thanks @keewis -- I pushed a fix. The documentation build succeeded. The other build failures look unrelated. |
I agree, those do indeed seem unrelated, and I have no idea why the python 3.11 macos CI takes that long to run. |
deprecated and will be removed in a future version of xarray. Using the | ||
``origin`` or ``offset`` parameters is recommended as a replacement for using | ||
the ``base`` parameter and using time offset arithmetic is recommended as a | ||
replacement for using the ``loffset`` parameter (:pull:`8459`). By `Spencer |
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.
I was going to suggest adding an example of time offset arithmetic here. But then thought we could just link to docs. But turns out we have no docs on this AFAICT! I'll open an issue (see #7596)
* main: Preserve `base` and `loffset` arguments in `resample` (pydata#7444) ignore the `pkg_resources` deprecation warning (pydata#7594) Update contains_cftime_datetimes to avoid loading entire variable array (pydata#7494) Support first, last with dask arrays (pydata#7562) update the docs environment (pydata#7442) Add xCDAT to list of Xarray related projects (pydata#7579) [pre-commit.ci] pre-commit autoupdate (pydata#7565) fix nczarr when libnetcdf>4.8.1 (pydata#7575) use numpys SupportsDtype (pydata#7521)
While pandas is getting set to remove the
base
andloffset
arguments inresample
, we have not had a chance to emit a deprecation warning for them yet in xarray (#7420). This PR preserves their functionality in xarray and should hopefully give users some extra time to adapt. Deprecation warnings for each are added so that we can eventually remove them.I've taken the liberty to define a
TimeResampleGrouper
object, since we need some way to carry theloffset
argument through theresample
chain, even though it will no longer be allowed on thepd.Grouper
object. Currently it is not particularly complicated, so hopefully it would be straightforward to adapt to what is envisioned in #6610 (comment).pandas
removed deprecated keyword arguments #7266whats-new.rst