Skip to content

refactor(data)!: implement IndexedTarArchive independently of zarr-python - #194

Open
janickm wants to merge 1 commit into
mainfrom
stack/zarr3/01-itar
Open

janickm wants to merge 1 commit into
mainfrom
stack/zarr3/01-itar

Conversation

@janickm

@janickm janickm commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Separate the record storage of indexed tar archives (itar.py) from zarr-python, in preparation of supporting multiple zarr-python versions:

  • IndexedTarArchive provides raw access to the records of an archive (mapping interface), stores.ZarrIndexedTarStore adapts it to zarr-python's store interface
  • Read local archives via positional reads (os.pread), which don't serialize reads of multiple threads, and close their file descriptors also when stores are dropped without closing them
  • Serve records starting within the index tail read from memory
  • Look up the record index decoder / encoder by index type, and share the CBOR + LZMA document encoding of the record index and the compressed consolidated metadata (encoding.py)

Archives are byte-identical to archives written by ncore 19.8 (tested via the sha256 of a fixed hierarchy written by ncore 19.8).

BREAKING CHANGE: IndexedTarArchive is no longer a zarr-python store, wrap it via stores.ZarrIndexedTarStore to access zarr hierarchies of archives directly with zarr-python.

@copy-pr-bot

copy-pr-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@janickm
janickm added this pull request to stack #201 October 14, 2026 07:28
@janickm

janickm commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test 2bf2534

@janickm
janickm marked this pull request as ready for review October 14, 2026 07:43
@janickm
janickm force-pushed the stack/zarr3/01-itar branch from 2bf2534 to 279593b Compare October 14, 2026 07:45
@janickm janickm changed the title refactor(data): implement IndexedTarStore independently of zarr-python refactor(data)!: implement IndexedTarStore independently of zarr-python Oct 14, 2026
@janickm

janickm commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test 279593b

@janickm
janickm force-pushed the stack/zarr3/01-itar branch 2 times, most recently from 56ad15c to b33ba3b Compare October 14, 2026 10:02
@janickm

janickm commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test b33ba3b

@janickm
janickm force-pushed the stack/zarr3/01-itar branch 2 times, most recently from 77b8da2 to 9613402 Compare October 14, 2026 10:09
@janickm

janickm commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test 9613402

@janickm
janickm force-pushed the stack/zarr3/01-itar branch from 9613402 to dd1c1cd Compare October 15, 2026 13:58
@janickm

janickm commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test dd1c1cd

@janickm
janickm force-pushed the stack/zarr3/01-itar branch from dd1c1cd to 5ccf35e Compare October 15, 2026 14:33
@janickm

janickm commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test 5ccf35e

@janickm
janickm force-pushed the stack/zarr3/01-itar branch from 5ccf35e to 2d96893 Compare October 15, 2026 18:04
@janickm

janickm commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test 2d96893

@janickm
janickm force-pushed the stack/zarr3/01-itar branch from 2d96893 to 7a10d69 Compare October 16, 2026 13:23
@janickm

janickm commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test 7a10d69

@janickm janickm changed the title refactor(data)!: implement IndexedTarStore independently of zarr-python refactor(data)!: implement IndexedTarArchive independently of zarr-python Oct 16, 2026
@janickm
janickm force-pushed the stack/zarr3/01-itar branch from 7a10d69 to c490040 Compare October 16, 2026 13:37
@janickm

janickm commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test c490040

@janickm
janickm force-pushed the stack/zarr3/01-itar branch from c490040 to b114832 Compare October 19, 2026 08:56
@janickm

janickm commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test b114832

@janickm
janickm force-pushed the stack/zarr3/01-itar branch from b114832 to fbab0ff Compare October 19, 2026 11:52
@janickm

janickm commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test fbab0ff

@janickm
janickm force-pushed the stack/zarr3/01-itar branch from fbab0ff to e880c2f Compare October 19, 2026 11:58
@janickm

janickm commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test e880c2f

@janickm
janickm force-pushed the stack/zarr3/01-itar branch from e880c2f to ed41973 Compare October 21, 2026 08:37
@janickm

janickm commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test ed41973

@janickm
janickm force-pushed the stack/zarr3/01-itar branch from ed41973 to e7ce191 Compare October 21, 2026 08:53
@janickm

janickm commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test e7ce191

@janickm
janickm force-pushed the stack/zarr3/01-itar branch from e7ce191 to eacc8fa Compare October 21, 2026 09:11
…thon

Separate the record storage of indexed tar archives (itar.py) from
zarr-python, in preparation of supporting multiple zarr-python versions:

- IndexedTarArchive provides raw access to the records of an archive:
  read() reads a record synchronously (also via the mapping interface,
  archive[key]), stores.ZarrIndexedTarStore adapts the archive to
  zarr-python's store interface; archives are context managers (closing
  them on exit, typed to return the archive, also of subclasses)
- Read local archives via positional reads (os.pread), which don't
  serialize reads of multiple threads, and close their file descriptors
  also when archives are dropped without closing them
- Serve records starting within the index tail read, and empty records,
  from memory
- Look up the record index decoder / encoder by index type, and share
  the CBOR + LZMA document encoding of the record index and the
  compressed consolidated metadata (encoding.py)

Archives are byte-identical to archives written by ncore 19.8 (tested
via the sha256 of a fixed hierarchy written by ncore 19.8).

BREAKING CHANGE: IndexedTarArchive (formerly stores.IndexedTarStore) is
no longer a zarr-python store, wrap it via stores.ZarrIndexedTarStore to
access zarr hierarchies of archives directly with zarr-python.
@janickm
janickm force-pushed the stack/zarr3/01-itar branch from eacc8fa to 76cad78 Compare October 21, 2026 14:15
@janickm

janickm commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test 76cad78

1 similar comment
@janickm

janickm commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test 76cad78

This branch has not been deployed

No deployments
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.

1 participant