-
Notifications
You must be signed in to change notification settings - Fork 16
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
Sync with zarr python 3 beta 2 #388
Conversation
@@ -626,35 +603,40 @@ def supports_listing(self) -> bool: | |||
def supports_deletes(self) -> bool: | |||
return self._store.supports_deletes | |||
|
|||
def list(self) -> AsyncGenerator[str, None]: |
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.
The change from async generator to async iterator doesnt change anything on the rust side, its the same prototype
@@ -444,10 +420,6 @@ def async_ancestry(self) -> AsyncGenerator[SnapshotMetadata, None]: | |||
""" | |||
return self._store.async_ancestry() | |||
|
|||
async def empty(self) -> bool: | |||
"""Check if the store is empty.""" | |||
return await self._store.empty() |
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.
what happened here? did this disappear from the abc?
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.
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.
If the types are the same, I'd keep it, this is probably a much faster impl
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.
Its not the same, takes prefix now. gunna take a stab at it
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.
I added a simple implmenetation that just uses the rust list_dir
function. I think that is right, but there is probably a more optimized way to do it?
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.
This is great, it will get fast once we make list_dir fast. Thank you
@@ -735,7 +740,14 @@ impl Store { | |||
Key::Chunk { node_path, coords } => { | |||
let mut guard = self.repository.write().await; | |||
let repository = guard.deref_mut(); | |||
Ok(repository.set_chunk_ref(node_path, coords, None).await?) |
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.
beautiful thank you
* main: Sync with zarr python 3 beta 2 (#388)
Closes #387
This relies on a lot of the default functions from zarr's
Store
so it can most likely be further optimized in the future.