Skip to content

feat: url-pipeline core — parser, adapter ABC, registry, store hooks - #4192

Draft
jhamman wants to merge 1 commit into
zarr-developers:mainfrom
jhamman:feature/url-pipeline-core
Draft

feat: url-pipeline core — parser, adapter ABC, registry, store hooks#4192
jhamman wants to merge 1 commit into
zarr-developers:mainfrom
jhamman:feature/url-pipeline-core

Conversation

@jhamman

@jhamman jhamman commented Jul 28, 2026

Copy link
Copy Markdown
Member

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 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)

For reviewers

This is PR 2 in a series towards #2943

Author attestation

  • I am a human, these are my changes, and I have reviewed and understood every change and can explain why each is correct.

TODO

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/user-guide/*.md
  • Changes documented as a new file in changes/
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

"""
Abstract base class and data model for URL pipeline adapters.

A URL pipeline is a `|`-separated chain of sub-URLs, read outer-to-inner,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

probably need a link to jbms/url-pipeline so people can see the actual spec

@jhamman
jhamman force-pushed the feature/url-pipeline-core branch 2 times, most recently from 10cb73b to 3aa63ac Compare July 28, 2026 14:52
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 48.48485% with 68 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.40%. Comparing base (0b72757) to head (3aa63ac).

Files with missing lines Patch % Lines
src/zarr/storage/_url_pipeline.py 32.25% 42 Missing ⚠️
src/zarr/registry.py 28.57% 15 Missing ⚠️
src/zarr/storage/_common.py 46.66% 8 Missing ⚠️
src/zarr/abc/url_pipeline.py 90.90% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4192      +/-   ##
==========================================
- Coverage   93.87%   93.40%   -0.47%     
==========================================
  Files          91       93       +2     
  Lines       12594    12725     +131     
==========================================
+ Hits        11822    11886      +64     
- Misses        772      839      +67     
Files with missing lines Coverage Δ
src/zarr/errors.py 100.00% <100.00%> (ø)
src/zarr/abc/url_pipeline.py 90.90% <90.90%> (ø)
src/zarr/storage/_common.py 89.30% <46.66%> (-3.24%) ⬇️
src/zarr/registry.py 82.08% <28.57%> (-7.40%) ⬇️
src/zarr/storage/_url_pipeline.py 32.25% <32.25%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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>
@jhamman
jhamman force-pushed the feature/url-pipeline-core branch from 3aa63ac to 151be2d Compare July 28, 2026 15:02
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.

2 participants