Zarr version
v2.13.3
Numcodecs version
N/A
Python Version
3.9.15
Operating System
macOS
Installation
Pip + venv
Description
When using zarr.group with the path kwarg, Zarr will still register .zgroups at the root of the store, all the way down to the specified path. I'm fairly new to Zarr (so I may be missing something) but this feels unexpected to me, I feel like inuitively zarr.group(…, path=…) should only register a .zgroup at the path specified
Steps to reproduce
from pprint import pprint
import zarr
store = {
"myKey/test.zarr/.zgroup": b'existing content!',
}
try:
root = zarr.group(store=store, path="myKey/test.zarr", overwrite=False)
except Exception as exc:
print(exc, "\n")
pprint(store)
Output:
path 'myKey/test.zarr' contains a group
{'.zgroup': b'{\n "zarr_format": 2\n}',
'myKey/.zgroup': b'{\n "zarr_format": 2\n}',
'myKey/test.zarr/.zgroup': b'existing content!'}
There are two things to note here I think:
- Zarr successfully detects that there is already a group registered at that path in the store
- Despite this check, it still registers extra
.zgroups from the root of the store down to the specified path
Additional output
No response
Zarr version
v2.13.3
Numcodecs version
N/A
Python Version
3.9.15
Operating System
macOS
Installation
Pip + venv
Description
When using
zarr.groupwith thepathkwarg, Zarr will still register.zgroups at the root of the store, all the way down to the specified path. I'm fairly new to Zarr (so I may be missing something) but this feels unexpected to me, I feel like inuitivelyzarr.group(…, path=…)should only register a.zgroupat the path specifiedSteps to reproduce
Output:
There are two things to note here I think:
.zgroups from the root of the store down to the specified pathAdditional output
No response