Skip to content

Conversation

@abidsikder
Copy link

@abidsikder abidsikder commented Nov 21, 2024

This incorporates the latest changes from py-hamt, which made for significant changes to the library since the library previously had to wrap over unsupported features of the hamt. This PR also updates the project environment tooling to use uv.

This is currently a draft pull request since documentation through pdoc has still to be added, but the code itself is ready to review and be tested. There is 100% code coverage.

CAR support was previously unsupported and it still is unimplemented in this PR, but we will leave this as a future PR to work off of this new base.

@abidsikder abidsikder changed the title Refactor Refactor to incorporate latest py-hamt changes Nov 21, 2024

return data

def __setitem__(self, key: str, value: bytes):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious here, if the code is set to read_only, it seems like it will still write just without a lock. maybe it should be

if self.read_only return

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right Phil, this missed my notice, I'll do like in py-hamt and raise an exception if a read only ipldstore is being modified

shutil.rmtree(temp_dir)


def test_upload_then_read(random_zarr_dataset: tuple[str, xr.Dataset]):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we add a read only test

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, I'll add some pytest.with_exceptions and then try to modify the ipldstore

@abidsikder
Copy link
Author

This PR is being closed since py-hamt, which ipldstore wraps over, is a MutableMapping and now has testing to guarantee that it works on its own as a zarr backing store. See this PR dClimate/py-hamt#7

@abidsikder abidsikder closed this Nov 25, 2024
@abidsikder abidsikder deleted the refactor branch November 25, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants