-
Notifications
You must be signed in to change notification settings - Fork 10
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
Use nested chunk store for labels #82
Changes from all commits
60ab61a
52bd467
56d8b17
3dc087c
896cdd8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import time | ||
|
||
from zarr.storage import FSStore | ||
|
||
|
||
def print_status(t0: int, t: int, count: int, total: int) -> None: | ||
"""Prints percent done and ETA. | ||
|
@@ -18,3 +20,16 @@ def print_status(t0: int, t: int, count: int, total: int) -> None: | |
eta = "NA" | ||
status = f"{percent_done:.2f}% done, ETA: {eta}" | ||
print(status, end="\r", flush=True) | ||
|
||
|
||
def open_store(name: str) -> FSStore: | ||
""" | ||
Create an FSStore instance that supports nested storage of chunks. | ||
""" | ||
return FSStore( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume this logic could be delegated to Immediate caveat looking at https://github.com/ome/ome-zarr-py/blob/62b49da4b7200384dac8dec8d9fce48bd727a967/ome_zarr/format.py#L101-L125 is that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was set to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That may have been because upstream was doing something wonky. Again, I think that's all settled: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I want this repo to depend on that fix There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Happy for it to happen in either as long as we eventually unify. fwiw, zarr is now at 2.10.* |
||
name, | ||
auto_mkdir=True, | ||
key_separator="/", | ||
normalize_keys=False, | ||
mode="w", | ||
) |
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.
Generally ok with this refactoring, but if it's going public we need to keep ome/ome-zarr-py#110 and similar in mind. i.e. we may not want to control this in the future.