-
-
Notifications
You must be signed in to change notification settings - Fork 358
feat: Implement ZEP 8 URL syntax support for zarr-python #3369
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
base: main
Are you sure you want to change the base?
Conversation
- Add comprehensive ZEP 8 URL parsing and resolution system - Implement StoreAdapter ABC for extensible storage adapters - Add built-in adapters for file, memory, S3, GCS, HTTPS schemes - Support pipe-chained URLs like s3://bucket/data.zip|zip:|zarr3: - Add URLSegment parsing with validation - Integrate with zarr.open_group and zarr.open_array APIs - Include demo script and comprehensive test suite - Pass all existing tests + 35 new ZEP 8-specific tests
…into feature/zep8-url-support
|
||
@classmethod | ||
def get_supported_schemes(cls) -> list[str]: | ||
return ["s3"] |
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.
Historically, "s3a" has also existed. I think it was a spark/hadoop implementation detail (i.e,. another codebase/driver for the same storage backend), so it might not be relevant any more, but I thought I would mention it.
adapter_name = "gcs" | ||
|
||
@classmethod | ||
def get_supported_schemes(cls) -> list[str]: |
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.
It would be better, I think, to avoid supporting "gcs" in addition to "gs" since that will create implementation divergence.
return ["http", "https"] | ||
|
||
|
||
class S3Adapter(RemoteAdapter): |
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.
Neuroglancer also supports "s3+http://endpoint/path" and "s3+https://endpoint/path" syntax to allow custom s3 endpoints (rather than AWS) to be used. The plain "s3://" syntax always refers to the real AWS endpoints, not a custom s3-compatible server.
This PR implements support for the ZEP 8 URL syntax in Zarr Python.
Some examples of what now works:
TODO:
docs/user-guide/*.rst
changes/
closes #2943
fixes #2831
xref: zarr-developers/zeps#48
cc @jbms