Skip to content

Move creation of KV store dictionary to python layer #93

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

Merged
merged 6 commits into from
May 27, 2025

Conversation

krisfed
Copy link
Member

@krisfed krisfed commented May 22, 2025

Instead of creating a MATLAB dictionary and then converting it to Python dictionary, use a new function in ZarrPy to create a KV store in Python directly.

Fixes #67

@krisfed krisfed requested a review from jhughes-mw May 23, 2025 13:46
Copy link
Member

@jhughes-mw jhughes-mw left a comment

Choose a reason for hiding this comment

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

Looks Good

@@ -5,25 +5,25 @@ on:
branches:
- main
- branch-bug
- update-test-branch
- test-branch7
Copy link
Member

Choose a reason for hiding this comment

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

What is branch 7? Is that a placeholder name, or a test for some specific number branch.

Copy link
Member

Choose a reason for hiding this comment

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

@krisfed if you are not using any of these branches (branch-bug and test-branch7), please remove them. I think Abhi was using one of them but I don't see any pending changes.

@@ -198,14 +198,12 @@ function makeZarrGroups(existingParentPath, newGroupsPath)
% Extract the S3 bucket name and path
[bucketName, objectPath] = obj.extractS3BucketNameAndPath(obj.Path);
% Create a Python dictionary for the KV store driver
RemoteStoreSchema = dictionary(["driver", "bucket", "path"], ["s3", bucketName, objectPath]);
Copy link
Member

Choose a reason for hiding this comment

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

Less is more. Nice.

Copy link
Member

@jm9176 jm9176 left a comment

Choose a reason for hiding this comment

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

Rest looks good. Thanks for working on this.

@@ -5,25 +5,25 @@ on:
branches:
- main
- branch-bug
- update-test-branch
- test-branch7
Copy link
Member

Choose a reason for hiding this comment

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

@krisfed if you are not using any of these branches (branch-bug and test-branch7), please remove them. I think Abhi was using one of them but I don't see any pending changes.


jobs:
test:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
matlab-version: ['R2023b','R2024a']
Copy link
Member

Choose a reason for hiding this comment

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

If 23b is working fine after your fix, please make sure to update this section: https://github.com/mathworks/MATLAB-support-for-Zarr-files?tab=readme-ov-file#mathworks-products-httpswwwmathworkscom

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point! Will check once we are able to run the tests on multiple releases, and update then (if no issues surface in the tests)

- isRemote (bool): whether the resource to be accessed with this
KV store is remote (s3) or local
- objPath (str): path to local Zarr file or to s3 object
- bucketName (str): If file is remote, this should be the S3 bucket
Copy link
Member

Choose a reason for hiding this comment

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

consistency for using "S3" or "s3"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point - updating to "S3" for consistency


jobs:
test:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
matlab-version: ['R2023b','R2024a']

steps:
- name: Checkout code
uses: actions/checkout@v2
Copy link
Member

Choose a reason for hiding this comment

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

Could you please update this to "v4" instead of "v2"?
https://github.com/actions/checkout?tab=readme-ov-file#checkout-v4

@jm9176
Copy link
Member

jm9176 commented May 23, 2025

The test failure is due to the ongoing outage, so this can be ignored for now:
matlab-actions/setup-matlab#146

Copy link
Member

@jm9176 jm9176 left a comment

Choose a reason for hiding this comment

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

Thanks.

- update-test-branch
- test-branch7
- test-branch8
#on:
Copy link
Member

Choose a reason for hiding this comment

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

Approving as a temporary change due to the ongoing outage, but the tests were qualified locally.

@krisfed krisfed marked this pull request as ready for review May 27, 2025 09:06
@krisfed krisfed merged commit dee8321 into main May 27, 2025
@krisfed krisfed deleted the test-branch-pyDict branch May 27, 2025 09:07
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.

Error when using zarrread in R2023b due to unsupported dictionary conversion (mat->py)
3 participants