batchcorder 0.1.1__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- batchcorder-0.1.2/.github/workflows/ci-test.yaml +188 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/.gitignore +2 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/.pre-commit-config.yaml +1 -1
- {batchcorder-0.1.1 → batchcorder-0.1.2}/CLAUDE.md +1 -2
- {batchcorder-0.1.1 → batchcorder-0.1.2}/CONTRIBUTING.md +1 -2
- {batchcorder-0.1.1 → batchcorder-0.1.2}/Cargo.lock +16 -837
- {batchcorder-0.1.1 → batchcorder-0.1.2}/Cargo.toml +4 -11
- {batchcorder-0.1.1 → batchcorder-0.1.2}/PKG-INFO +11 -17
- {batchcorder-0.1.1 → batchcorder-0.1.2}/README.md +7 -14
- batchcorder-0.1.2/docs/quarto/how-to/cache-config.qmd +87 -0
- batchcorder-0.1.2/docs/quarto/how-to/eviction.qmd +84 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/docs/quarto/reference/api-overview.qmd +1 -1
- {batchcorder-0.1.1 → batchcorder-0.1.2}/docs/quarto/tutorials/getting-started.qmd +6 -5
- {batchcorder-0.1.1 → batchcorder-0.1.2}/docs/source/index.rst +2 -2
- {batchcorder-0.1.1 → batchcorder-0.1.2}/pyproject.toml +22 -8
- {batchcorder-0.1.1 → batchcorder-0.1.2}/python/batchcorder/__init__.py +28 -33
- {batchcorder-0.1.1 → batchcorder-0.1.2}/python/batchcorder/_batchcorder.pyi +5 -5
- batchcorder-0.1.2/src/cached_dataset.rs +902 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/src/lib.rs +4 -6
- {batchcorder-0.1.1 → batchcorder-0.1.2}/tests/test_as_record_batch_reader.py +12 -31
- {batchcorder-0.1.1 → batchcorder-0.1.2}/tests/test_cast.py +2 -2
- {batchcorder-0.1.1 → batchcorder-0.1.2}/tests/test_duckdb.py +6 -7
- {batchcorder-0.1.1 → batchcorder-0.1.2}/tests/test_errors.py +13 -13
- batchcorder-0.1.2/tests/test_performance.py +333 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/tests/test_stream_cache.py +125 -16
- {batchcorder-0.1.1 → batchcorder-0.1.2}/uv.lock +559 -159
- batchcorder-0.1.1/.github/workflows/ci-test.yaml +0 -74
- batchcorder-0.1.1/_typos.toml +0 -5
- batchcorder-0.1.1/docs/quarto/how-to/cache-config.qmd +0 -114
- batchcorder-0.1.1/docs/quarto/how-to/eviction.qmd +0 -107
- batchcorder-0.1.1/src/cached_dataset.rs +0 -830
- {batchcorder-0.1.1 → batchcorder-0.1.2}/.github/release-drafter.yml +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/.github/workflows/build-wheels.yaml +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/.github/workflows/ci-lint.yaml +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/.github/workflows/ci-pre-release.yaml +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/.github/workflows/ci-release.yaml +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/.github/workflows/release-drafter.yml +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/.readthedocs.yaml +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/.yamllint.yaml +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/LICENSE +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/Makefile +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/conftest.py +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/docs/quarto/.gitignore +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/docs/quarto/_quarto.yml +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/docs/quarto/how-to/duckdb.qmd +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/docs/requirements.txt +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/docs/source/api.rst +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/docs/source/conf.py +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/python/batchcorder/py.typed +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/rust-toolchain.toml +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/scripts/build-docs.sh +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/scripts/build-release.sh +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/src/bin/stub_gen.rs +0 -0
- {batchcorder-0.1.1 → batchcorder-0.1.2}/tests/test_docstrings.py +0 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
name: ci-test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
paths-ignore:
|
|
6
|
+
- "docs/**"
|
|
7
|
+
- "**/*.md"
|
|
8
|
+
- "*.md"
|
|
9
|
+
- ".envrc"
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
tags:
|
|
13
|
+
- '*'
|
|
14
|
+
pull_request:
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
linux:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
env:
|
|
24
|
+
UV_NO_SYNC: "1"
|
|
25
|
+
strategy:
|
|
26
|
+
matrix:
|
|
27
|
+
# requires-python = ">=3.10"; test the floor and the latest stable.
|
|
28
|
+
python-version: ["3.10", "3.13"]
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
|
|
32
|
+
- name: Update Rust stable
|
|
33
|
+
run: rustup update stable && rustup component add llvm-tools-preview
|
|
34
|
+
|
|
35
|
+
- uses: actions/setup-python@v5
|
|
36
|
+
with:
|
|
37
|
+
python-version: ${{ matrix.python-version }}
|
|
38
|
+
|
|
39
|
+
- uses: astral-sh/setup-uv@v5
|
|
40
|
+
with:
|
|
41
|
+
enable-cache: true
|
|
42
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
43
|
+
|
|
44
|
+
- name: Install cargo-llvm-cov
|
|
45
|
+
uses: taiki-e/install-action@v2
|
|
46
|
+
with:
|
|
47
|
+
tool: cargo-llvm-cov
|
|
48
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
49
|
+
|
|
50
|
+
- name: Cargo cache
|
|
51
|
+
uses: actions/cache@v4
|
|
52
|
+
with:
|
|
53
|
+
path: |
|
|
54
|
+
~/.cargo/registry/index/
|
|
55
|
+
~/.cargo/registry/cache/
|
|
56
|
+
~/.cargo/git/db/
|
|
57
|
+
./target/
|
|
58
|
+
# abi3-py310 produces a single binary regardless of Python version,
|
|
59
|
+
# so the cache key does not include python-version.
|
|
60
|
+
key: cargo-test-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}
|
|
61
|
+
restore-keys: cargo-test-
|
|
62
|
+
|
|
63
|
+
# --no-install-project: maturin develop handles the batchcorder install.
|
|
64
|
+
- name: Install Python dependencies
|
|
65
|
+
run: uv sync --locked --group dev --no-install-project
|
|
66
|
+
|
|
67
|
+
- name: Build and test with coverage
|
|
68
|
+
env:
|
|
69
|
+
CARGO_INCREMENTAL: "1"
|
|
70
|
+
run: |
|
|
71
|
+
eval "$(cargo llvm-cov show-env --export-prefix)"
|
|
72
|
+
cargo llvm-cov clean --workspace
|
|
73
|
+
cargo test
|
|
74
|
+
uv run maturin develop --uv
|
|
75
|
+
uv run pytest --import-mode=importlib --cov --cov-report=xml
|
|
76
|
+
cargo llvm-cov report --lcov --output-path coverage.lcov
|
|
77
|
+
|
|
78
|
+
- name: Upload coverage to Codecov
|
|
79
|
+
uses: codecov/codecov-action@v5.4.0
|
|
80
|
+
with:
|
|
81
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
82
|
+
files: coverage.xml,coverage.lcov
|
|
83
|
+
|
|
84
|
+
windows:
|
|
85
|
+
runs-on: windows-latest
|
|
86
|
+
env:
|
|
87
|
+
UV_NO_SYNC: "1"
|
|
88
|
+
strategy:
|
|
89
|
+
matrix:
|
|
90
|
+
python-version: ["3.13"]
|
|
91
|
+
steps:
|
|
92
|
+
- uses: actions/checkout@v4
|
|
93
|
+
|
|
94
|
+
- name: Update Rust stable
|
|
95
|
+
run: rustup update stable && rustup component add llvm-tools-preview
|
|
96
|
+
|
|
97
|
+
- uses: actions/setup-python@v5
|
|
98
|
+
with:
|
|
99
|
+
python-version: ${{ matrix.python-version }}
|
|
100
|
+
|
|
101
|
+
- uses: astral-sh/setup-uv@v5
|
|
102
|
+
with:
|
|
103
|
+
enable-cache: true
|
|
104
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
105
|
+
|
|
106
|
+
- name: Install cargo-llvm-cov
|
|
107
|
+
uses: taiki-e/install-action@v2
|
|
108
|
+
with:
|
|
109
|
+
tool: cargo-llvm-cov
|
|
110
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
111
|
+
|
|
112
|
+
- name: Cargo cache
|
|
113
|
+
uses: actions/cache@v4
|
|
114
|
+
with:
|
|
115
|
+
path: |
|
|
116
|
+
~/.cargo/registry/index/
|
|
117
|
+
~/.cargo/registry/cache/
|
|
118
|
+
~/.cargo/git/db/
|
|
119
|
+
./target/
|
|
120
|
+
key: cargo-test-windows-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}
|
|
121
|
+
restore-keys: cargo-test-windows-
|
|
122
|
+
|
|
123
|
+
- name: Install Python dependencies
|
|
124
|
+
run: uv sync --locked --group dev --no-install-project
|
|
125
|
+
|
|
126
|
+
- name: Build and test with coverage
|
|
127
|
+
shell: bash
|
|
128
|
+
env:
|
|
129
|
+
CARGO_INCREMENTAL: "1"
|
|
130
|
+
run: |
|
|
131
|
+
eval "$(cargo llvm-cov show-env --export-prefix)"
|
|
132
|
+
cargo llvm-cov clean --workspace
|
|
133
|
+
cargo test
|
|
134
|
+
uv run maturin develop --uv
|
|
135
|
+
uv run pytest --import-mode=importlib --cov --cov-report=xml
|
|
136
|
+
cargo llvm-cov report --lcov --output-path coverage.lcov
|
|
137
|
+
|
|
138
|
+
- name: Upload coverage to Codecov
|
|
139
|
+
uses: codecov/codecov-action@v5.4.0
|
|
140
|
+
with:
|
|
141
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
142
|
+
files: coverage.xml,coverage.lcov
|
|
143
|
+
|
|
144
|
+
macos:
|
|
145
|
+
runs-on: macos-latest
|
|
146
|
+
env:
|
|
147
|
+
UV_NO_SYNC: "1"
|
|
148
|
+
strategy:
|
|
149
|
+
matrix:
|
|
150
|
+
python-version: ["3.10", "3.13"]
|
|
151
|
+
steps:
|
|
152
|
+
- uses: actions/checkout@v4
|
|
153
|
+
|
|
154
|
+
- name: Update Rust stable
|
|
155
|
+
run: rustup update stable
|
|
156
|
+
|
|
157
|
+
- uses: actions/setup-python@v5
|
|
158
|
+
with:
|
|
159
|
+
python-version: ${{ matrix.python-version }}
|
|
160
|
+
|
|
161
|
+
- uses: astral-sh/setup-uv@v5
|
|
162
|
+
with:
|
|
163
|
+
enable-cache: true
|
|
164
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
165
|
+
|
|
166
|
+
- name: Cargo cache
|
|
167
|
+
uses: actions/cache@v4
|
|
168
|
+
with:
|
|
169
|
+
path: |
|
|
170
|
+
~/.cargo/registry/index/
|
|
171
|
+
~/.cargo/registry/cache/
|
|
172
|
+
~/.cargo/git/db/
|
|
173
|
+
./target/
|
|
174
|
+
key: cargo-test-macos-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}
|
|
175
|
+
restore-keys: cargo-test-macos-
|
|
176
|
+
|
|
177
|
+
- name: Install Python dependencies
|
|
178
|
+
run: uv sync --locked --group dev --no-install-project
|
|
179
|
+
|
|
180
|
+
- name: Build extension
|
|
181
|
+
uses: PyO3/maturin-action@v1
|
|
182
|
+
with:
|
|
183
|
+
command: develop
|
|
184
|
+
args: --release --strip --uv
|
|
185
|
+
sccache: 'true'
|
|
186
|
+
|
|
187
|
+
- name: Run tests
|
|
188
|
+
run: uv run pytest --import-mode=importlib
|
|
@@ -110,7 +110,7 @@ repos:
|
|
|
110
110
|
- id: mypy-stubtest
|
|
111
111
|
name: mypy stubtest
|
|
112
112
|
description: Validate _batchcorder.pyi matches the compiled extension at runtime.
|
|
113
|
-
entry: .venv/bin/python -m mypy.stubtest batchcorder._batchcorder
|
|
113
|
+
entry: .venv/bin/python -m mypy.stubtest --mypy-config-file pyproject.toml batchcorder._batchcorder
|
|
114
114
|
language: system
|
|
115
115
|
pass_filenames: false
|
|
116
116
|
types_or: [python, pyi]
|
|
@@ -13,7 +13,7 @@ The project consists of:
|
|
|
13
13
|
|
|
14
14
|
The Rust core implements the `StreamCache` functionality using:
|
|
15
15
|
- Arrow C Stream interface for compatibility
|
|
16
|
-
-
|
|
16
|
+
- Arrow IPC stream format for on-disk serialisation
|
|
17
17
|
- PyO3 for Python interoperability
|
|
18
18
|
|
|
19
19
|
## 🚀 Getting Started
|
|
@@ -306,7 +306,6 @@ Where:
|
|
|
306
306
|
|
|
307
307
|
- [Arrow Documentation](https://arrow.apache.org/docs/)
|
|
308
308
|
- [PyO3 Documentation](https://pyo3.rs/)
|
|
309
|
-
- [Foyer Documentation](https://foyer.readthedocs.io/)
|
|
310
309
|
- [Rust Documentation](https://doc.rust-lang.org/)
|
|
311
310
|
- [Python Documentation](https://docs.python.org/3/)
|
|
312
311
|
- [Quarto Documentation](https://quarto.org/docs/)
|
|
@@ -13,7 +13,7 @@ The project consists of:
|
|
|
13
13
|
|
|
14
14
|
The Rust core implements the `StreamCache` functionality using:
|
|
15
15
|
- Arrow C Stream interface for compatibility
|
|
16
|
-
-
|
|
16
|
+
- Arrow IPC stream format for on-disk serialisation
|
|
17
17
|
- PyO3 for Python interoperability
|
|
18
18
|
|
|
19
19
|
## 🚀 Getting Started
|
|
@@ -306,7 +306,6 @@ Where:
|
|
|
306
306
|
|
|
307
307
|
- [Arrow Documentation](https://arrow.apache.org/docs/)
|
|
308
308
|
- [PyO3 Documentation](https://pyo3.rs/)
|
|
309
|
-
- [Foyer Documentation](https://foyer.readthedocs.io/)
|
|
310
309
|
- [Rust Documentation](https://doc.rust-lang.org/)
|
|
311
310
|
- [Python Documentation](https://docs.python.org/3/)
|
|
312
311
|
- [Quarto Documentation](https://quarto.org/docs/)
|