The ZipStore contains a close method that ensures that the file is flushed on the OS, and ready for the next line of code to use.
It wouild be nice to have noop methods for the DirectoryStore (and N5Store) to ensure that we don't have to use the following code downstream
if hasattr(store, 'close'):
store.close()
Minimal, reproducible code sample, a copy-pastable example if possible
import zarr
dstore = zarr.DirectoryStore('test.dir')
dstore.close()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-a0f668fd8b50> in <module>
----> 1 dstore.close()
AttributeError: 'DirectoryStore' object has no attribute 'close'
import zarr
zstore = zarr.ZipStore('test.zip')
zstore.close()
# All good
Version and installation information
Please provide the following:
-
Value of zarr.__version__: 2.4.1.dev15+dirty
-
Value of numcodecs.__version__: 0.6.4
-
Version of Python interpreter: 3.8.5
-
Operating system (Linux/Windows/Mac) Linux
-
How Zarr was installed (e.g., "using pip into virtual environment", or "using conda"): conda-forge
The ZipStore contains a
closemethod that ensures that the file is flushed on the OS, and ready for the next line of code to use.It wouild be nice to have noop methods for the
DirectoryStore(andN5Store) to ensure that we don't have to use the following code downstreamMinimal, reproducible code sample, a copy-pastable example if possible
Version and installation information
Please provide the following:
Value of
zarr.__version__:2.4.1.dev15+dirtyValue of
numcodecs.__version__:0.6.4Version of Python interpreter: 3.8.5
Operating system (Linux/Windows/Mac) Linux
How Zarr was installed (e.g., "using pip into virtual environment", or "using conda"): conda-forge