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

Remove old auto combine #3926

Merged
merged 11 commits into from
Jun 24, 2020
Merged

Conversation

TomNicholas
Copy link
Member

  • Finishes deprecation cycle started in API for N-dimensional combine #2616 (was supposed to have been done in 0.15)
  • Passes isort -rc . && black . && mypy . && flake8
  • Fully documented, including whats-new.rst for all changes and api.rst for new API

I've set combine='by_coords' as the default argument to open_mfdataset. Technically we could go for either, as the deprecation warning just told users to make it explicit from now on, but going for by_coords rather than nested means that:

  • The concat_dim argument is not needed by default,
  • The default behaviour of the function is the "magic" one - users have to opt-in to the more explicit behaviour.

@pep8speaks
Copy link

pep8speaks commented Apr 2, 2020

Hello @TomNicholas! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-06-24 14:38:55 UTC

@TomNicholas
Copy link
Member Author

It would also be good to include any improvement to the relevant docs (e.g. #3830) in the same release.

Copy link
Collaborator

@keewis keewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make the docs CI pass, remove auto_combine from api-hidden.rst and api.rst (but see below). We also seem to have a new group of failing cftime tests that probably deserve their own issue.

Shouldn't we change the FutureWarning to a DeprecationWarning before removing auto_combine? Both your entry to whats-new.rst and the message of the warning read that way... I'm not sure what the rules for deprecations are, though.

doc/whats-new.rst Outdated Show resolved Hide resolved
@max-sixty
Copy link
Collaborator

max-sixty commented Apr 2, 2020

I think FutureWarning and DeprecationWarning are pretty similar — mostly focused on whether the behavior will change or the API is going away.
FutureDeprecationWarning PendingDeprecationWarning is generally lower visibility IIRC.

So maybe this should have been DeprecationWarning but no need to go through another cycle imo.

@dcherian
Copy link
Contributor

dcherian commented Apr 2, 2020

There was a case I ran in to where the old auto_combine was needed and none of the newer options worked.

Let me see if I can dig it up.

@TomNicholas
Copy link
Member Author

TomNicholas commented Apr 2, 2020

To make the docs CI pass

Thanks @keewis .

Shouldn't we change the FutureWarning to a DeprecationWarning before removing auto_combine?

I wasn't even aware that there were two types of warnings I could have used for this. I was taking "deprecating" to mean "removed" and "starting the deprecation cycle" to mean "start warning people it will soon be removed". The warning messages said "will no longer accept" and "will require" in "version 0.15" - that's probably authoritative enough isn't it?

There was a case I ran in to where the old auto_combine was needed and none of the newer options worked.

I think that was always a possible edge case - I would very much like to see it though @dcherian , if only so that we can put a "what to do if" section in the docs.

@keewis
Copy link
Collaborator

keewis commented Apr 2, 2020

The warning messages said "will no longer accept" and "will require" in "version 0.15" - that's probably authoritative enough isn't it?

I'd think so, yes. Rereading what the warnings are intended for, FutureWarning is indeed the same as DeprecationWarning, the only difference is the intended target audience. I seem to have confused FutureWarning with PendingDeprecationWarning.

Then my only issue is with the whats-new.rst entry. I'd explicitly state that auto_combine was removed.

Edit: sorry, you also mentioned that. The way I understood "deprecating" was what you meant with "starting the deprecation cycle", so that's where the confusion came from.

@keewis
Copy link
Collaborator

keewis commented Apr 2, 2020

thanks, @TomNicholas, looks good to me.

I opened #3928 for the upstream-dev failures.

@TomNicholas
Copy link
Member Author

Just noticed there's a section of the API reference for Deprecated/Pending Deprecation, but auto_combine was never added to it...

@TomNicholas TomNicholas mentioned this pull request Apr 19, 2020
4 tasks
@dcherian dcherian mentioned this pull request May 5, 2020
23 tasks
TomNicholas and others added 2 commits May 13, 2020 16:49
…o-combine

* 'master' of github.com:pydata/xarray: (81 commits)
  use builtin python types instead of the numpy alias (pydata#4170)
  Revise pull request template (pydata#4039)
  pint support for Dataset (pydata#3975)
  drop eccodes in docs (pydata#4162)
  Update issue templates inspired/based on dask (pydata#4154)
  Fix failing upstream-dev build & remove docs build (pydata#4160)
  Improve typehints of xr.Dataset.__getitem__ (pydata#4144)
  provide a error summary for assert_allclose (pydata#3847)
  built-in accessor documentation (pydata#3988)
  Recommend installing cftime when time decoding fails. (pydata#4134)
  parameter documentation for DataArray.sel (pydata#4150)
  speed up map_blocks (pydata#4149)
  Remove outdated note from datetime accessor docstring (pydata#4148)
  Fix the upstream-dev pandas build failure (pydata#4138)
  map_blocks: Allow passing dask-backed objects in args (pydata#3818)
  keep attrs in reset_index (pydata#4103)
  Fix open_rasterio() for WarpedVRT with specified src_crs (pydata#4104)
  Allow non-unique and non-monotonic coordinates in get_clean_interp_index and polyfit (pydata#4099)
  update numpy's intersphinx url (pydata#4117)
  xr.infer_freq (pydata#4033)
  ...
Copy link
Contributor

@dcherian dcherian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @TomNicholas

@dcherian dcherian merged commit 3088de2 into pydata:master Jun 24, 2020
dcherian added a commit to raphaeldussin/xarray that referenced this pull request Jul 1, 2020
* upstream/master: (21 commits)
  fix typo in error message in plot.py (pydata#4188)
  Support multiple dimensions in DataArray.argmin() and DataArray.argmax() methods (pydata#3936)
  Show data by default in HTML repr for DataArray (pydata#4182)
  Blackdoc (pydata#4177)
  Add CONTRIBUTING.md for the benefit of GitHub
  Correct dask handling for 1D idxmax/min on ND data (pydata#4135)
  use assert_allclose in the aggregation-with-units tests (pydata#4174)
  Remove old auto combine (pydata#3926)
  Fix 4009 (pydata#4173)
  Limit length of dataarray reprs (pydata#3905)
  Remove <pre> from nested HTML repr (pydata#4171)
  Proposal for better error message about in-place operation (pydata#3976)
  use builtin python types instead of the numpy alias (pydata#4170)
  Revise pull request template (pydata#4039)
  pint support for Dataset (pydata#3975)
  drop eccodes in docs (pydata#4162)
  Update issue templates inspired/based on dask (pydata#4154)
  Fix failing upstream-dev build & remove docs build (pydata#4160)
  Improve typehints of xr.Dataset.__getitem__ (pydata#4144)
  provide a error summary for assert_allclose (pydata#3847)
  ...
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.

5 participants