Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2eb2b8e
feat: add buffer caches
pfackeldey Dec 18, 2025
8f585d4
fix doc string example
pfackeldey Dec 18, 2025
04d594a
add comment to clarify hdf5 finalize callback
pfackeldey Dec 18, 2025
8292c31
add lru_cache
pfackeldey Dec 19, 2025
58262c2
oops, forgot to set correct base class
pfackeldey Dec 19, 2025
978d0fc
small fixes: weakref already present, fix len hdf5 cache
pfackeldey Dec 19, 2025
f74e78b
fix type hints (ty passes)
pfackeldey Dec 22, 2025
f75265f
use collections.abc.ItemsView instead
pfackeldey Dec 22, 2025
07be554
Merge branch 'master' into pfackeldey/buffer_caches
pfackeldey Feb 9, 2026
0ccad3d
add optional dep group 'caches'
pfackeldey Feb 9, 2026
0f94741
add buffer caches to nanoevents/mapping init
pfackeldey Feb 9, 2026
8efd61e
prettify import error messages
pfackeldey Feb 10, 2026
a35ffd8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 10, 2026
a188498
Merge branch 'master' into pfackeldey/buffer_caches
pfackeldey Mar 4, 2026
8a4873f
drop auto file removal from default finalize callback
pfackeldey Mar 4, 2026
4834397
update ty ignore comments
pfackeldey Mar 4, 2026
ae1323c
add tests
pfackeldey Mar 4, 2026
251f496
CI tests should also install [caches] to properly test them...
pfackeldey Mar 4, 2026
eda10aa
change names or lru and hierarchical cache
pfackeldey Mar 4, 2026
4ccdc0f
use zict properly; simplifies whole implementation
pfackeldey Mar 9, 2026
1c1aa36
avoid tobytes roundtripping if no codec is provided
pfackeldey Mar 9, 2026
1455edc
improve doc string of BufferCache
pfackeldey Mar 9, 2026
ae958ac
Merge branch 'master' into pfackeldey/buffer_caches
lgray Mar 9, 2026
b80f929
fix doc string
pfackeldey Mar 11, 2026
80531bb
Expose in API
nsmith- Mar 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

- name: Set python test settings
run: |
echo "INSTALL_EXTRAS='[dev,parsl,dask]'" >> $GITHUB_ENV
echo "INSTALL_EXTRAS='[dev,caches,parsl,dask]'" >> $GITHUB_ENV

- name: Install dependencies (Linux)
if: startsWith( matrix.os, 'ubuntu' )
Expand All @@ -66,7 +66,7 @@ jobs:
uv pip install torch --index-url https://download.pytorch.org/whl/cpu
uv pip install xgboost
# install checked out coffea
uv pip install -q '.[dev,parsl,dask,triton]' --upgrade
uv pip install -q '.[dev,caches,parsl,dask,triton]' --upgrade
uv pip list
- name: Install dependencies (MacOS)
if: matrix.os == 'macOS-latest'
Expand All @@ -79,7 +79,7 @@ jobs:
uv pip install torch
uv pip install xgboost
# install checked out coffea
uv pip install -q '.[dev,dask]' --upgrade
uv pip install -q '.[dev,caches,dask]' --upgrade
uv pip list
- name: Install dependencies (Windows)
if: matrix.os == 'windows-latest'
Expand All @@ -90,7 +90,7 @@ jobs:
uv pip install torch
uv pip install xgboost
# install checked out coffea
uv pip install -q '.[dev,dask]' --upgrade
uv pip install -q '.[dev,caches,dask]' --upgrade
uv pip list

- name: Start triton server with example model
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ xrootd = [
triton = [
"tritonclient[grpc,http]>=2.56.0",
]
caches = [
"h5py>=3.15.1",
"numcodecs>=0.13.1",
"zict>=3.0.0",
Comment thread
ikrommyd marked this conversation as resolved.
]
dev = [
"pre-commit",
"flake8",
Expand Down
12 changes: 12 additions & 0 deletions src/coffea/nanoevents/mapping/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
from .buffer_cache import (
BufferCache,
CompressedBufferCache,
HDF5BufferCache,
NbytesAwareCache,
hierarchical_cache,
Comment thread
ikrommyd marked this conversation as resolved.
Outdated
)
Comment thread
ikrommyd marked this conversation as resolved.
Comment thread
nsmith- marked this conversation as resolved.
from .parquet import ParquetSourceMapping, TrivialParquetOpener
from .preloaded import (
PreloadedOpener,
Expand All @@ -7,6 +14,11 @@
from .uproot import TrivialUprootOpener, UprootSourceMapping

__all__ = [
"BufferCache",
"CompressedBufferCache",
"HDF5BufferCache",
"NbytesAwareCache",
"hierarchical_cache",
"TrivialUprootOpener",
"UprootSourceMapping",
"TrivialParquetOpener",
Expand Down
Loading
Loading