-
Notifications
You must be signed in to change notification settings - Fork 41
Automatically close files using open_datatree context manager #93
Comments
Could there be a |
Sure, once we have a Though currently we haven't implemented dask-specific methods yet. |
@aurghs, @alexamici and @malmans2 - this issue and related backends issues seem like a good place for you guys to contribute if you wanted. You have expertise on xarray's backends, I don't, and they are pretty separable. There are likely to be subtleties with respect to tracking multiple open file handles, and be aware that this will need to be done explicitly via a |
Sure - we are on it! |
Is there any update on this issue or context manager? The file becomes occupied after |
I am also interested in having this fixed. Can we exploit the logic done in |
Closed in favour of: pydata/xarray#9337 |
In xarray it's possible to automatically close a dataset after opening by opening it using a context manager. From the documentation:
We currently don't have a
DataTree.close()
method, or any context manager behaviour foropen_datatree
. To add them presumably we would need to iterate over all file handles (i.e. groups) and close them one by one.Related to #90 @jhamman @thewtex
The text was updated successfully, but these errors were encountered: