feat: url-pipeline core — parser, adapter ABC, registry, store hooks - #4192
feat: url-pipeline core — parser, adapter ABC, registry, store hooks#4192jhamman wants to merge 1 commit into
Conversation
10cb73b to
3aa63ac
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4192 +/- ##
==========================================
+ Coverage 94.12% 94.21% +0.09%
==========================================
Files 92 94 +2
Lines 12830 13041 +211
==========================================
+ Hits 12076 12287 +211
Misses 754 754
🚀 New features to boost your workflow:
|
effd07c to
b0e7af9
Compare
b0e7af9 to
c744f95
Compare
| def test_round_trip() -> None: | ||
| url = "s3://bucket/a.zip?v=2|zip:b/inner.zip|zip:c|zarr3:" | ||
| segments = parse_pipeline(url) | ||
| assert "|".join(s.raw for s in segments) == url |
There was a problem hiding this comment.
can we get property-based tests that create valid pipelines up to depth 8 or so, sampled from all valid root and adapter schemes, and ensure that these pipelines comply with the invariants tested for a few examples here? And if there's a convenient way to generate invalid pipelines, that would also be nice for property testing
787e785 to
6e6c2f5
Compare
|
This is great! Here's some stuff I found with Claude: 🤖 AI text below 🤖 Review of c744f95. The parser and adapter ABC look solid (the spec corpus passes, ruff/mypy are clean, no import cycles, test order doesn't leak registry state), but the store hooks introduce some regressions and there are a few contract questions worth settling before the Correctness / regressions
Spec conformance at the root
Design / API surface
Smaller things
|
|
a few more findings, this time from codex: 🤖 AI text below 🤖 A few additional findings on
For reference, the updated focused suite passes locally: |
6e6c2f5 to
d29f495
Compare
Implements URL pipeline support (https://github.com/jbms/url-pipeline): '|'-chained URLs resolve through pluggable adapters registered under the 'zarr.url_adapters' entry-point group (entry-point name = URL scheme). - zarr.abc.url_pipeline: PipelineSegment, AdapterResolution, PipelineContext, URLPipelineAdapter (single-classmethod contract) - zarr.storage._url_pipeline: parse_pipeline / resolve_pipeline; the root sub-URL delegates to make_store so existing file/memory/fsspec routing is unchanged - registry: register_url_adapter / get_url_adapter / list_url_adapter_schemes (name check only; no adapter imports) - make_store/make_store_path route strings containing '|' (or a registered root scheme) through the resolver; residual store paths combine with the user-supplied path - StorePath gains a zarr_format attribute (populated by format segments in a follow-up) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
d29f495 to
20f2ac8
Compare
Summary
This PR delivers the core infrastructure for plugable URL pipeline parsing.
Implements URL pipeline support (https://github.com/jbms/url-pipeline): '|'-chained URLs are resolves through pluggable adapters registered under the 'zarr.url_adapters' entry-point group (entry-point name = URL scheme).
zarr.abc.url_pipeline:PipelineSegment,AdapterResolution,PipelineContext,URLPipelineAdapter(single-classmethod contract)zarr.storage._url_pipeline:parse_pipeline/resolve_pipeline; the root sub-URL delegates to make_store so existing file/memory/fsspec routing is unchangedregistry:register_url_adapter/get_url_adapter/list_url_adapter_schemes(name check only; no adapter imports)make_store/make_store_pathroute strings containing '|' (or a registered root scheme) through the resolver; residual store paths combine with the user-supplied pathStorePathgains azarr_formatattribute (populated by format segments in a follow-up)For reviewers
This is PR 2 in a series towards #2943
Author attestation
TODO
docs/user-guide/*.mdchanges/