-
-
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
Implement load_dataset() and load_dataarray() #2917
Conversation
Updates formatting to use .format() instead of % operator. Changed all instances of % to .format() and added test for using tuple as key, which errored using % operator.
This reverts commit f17f3ad.
What do you think un-deprecating |
Seems like undeprecating it makes sense as a function with identical functionality is being added here. What if we just imported the new |
|
Forgive me, I don't understand what you mean by download vs open. I see that Lines 92 to 107 in 6d93a95
|
The difference I was referring to is that # in tutorial.py
def load_dataset(*args, **kwargs):
# this calls tutorial.open_dataset, not xarray.open_dataset
with open_dataset(*args, **kwargs) as ds:
return ds.load() |
Got it, thanks. I can make this change, assuming the dask argument used for deprecating it in the first place isn't stronger than maintaining this consistency. |
I think the dask argument is really an argument that |
Sounds good. This latest commit un-deprecates |
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.
Can you add this to api.rst
, after open_dataset
/open_dataarray
?
BUG: Fixes pydata#2887 by adding @shoyer solution for load_dataset and load_dataarray, wrappers around open_dataset and open_dataarray which open, load, and close the file and return the Dataset/DataArray TST: Add tests for sequentially opening and writing to files using new functions DOC: Add to whats-new.rst. Also a tiny change to the open_dataset docstring Update docstrings and check for cache in kwargs Undeprecate load_dataset Add to api.rst, fix whats-new.rst typo, raise error instead of warning
543b72f
to
cf99361
Compare
LGTM. Thanks @dnowacki-usgs |
LGTM, too. Thanks @dnowacki-usgs ! |
* upstream/master: cfgrib is now part of conda-forge (pydata#2992) Add fill_value for concat and auto_combine (pydata#2964) Remove deprecated pytest.config usages (pydata#2988) Add transpose_coords option to DataArray.transpose (pydata#2556) Fix rolling.constuct() example (pydata#2967) Implement load_dataset() and load_dataarray() (pydata#2917)
whats-new.rst
Implement load_dataset() and load_dataarray()
BUG: Fixes #2887 by adding @shoyer solution for load_dataset and load_dataarray, wrappers around open_dataset and open_dataarray which open, load, and close the file and return the Dataset/DataArray
TST: Add tests for sequentially opening and writing to files using new functions
DOC: Add to whats-new.rst. Also a tiny change to the open_dataset docstring