batchcorder 0.1.1__tar.gz → 0.1.3__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.
Files changed (61) hide show
  1. batchcorder-0.1.3/.github/workflows/ci-test.yaml +188 -0
  2. {batchcorder-0.1.1 → batchcorder-0.1.3}/.gitignore +7 -0
  3. {batchcorder-0.1.1 → batchcorder-0.1.3}/.pre-commit-config.yaml +4 -1
  4. {batchcorder-0.1.1 → batchcorder-0.1.3}/CLAUDE.md +1 -2
  5. {batchcorder-0.1.1 → batchcorder-0.1.3}/CONTRIBUTING.md +1 -2
  6. {batchcorder-0.1.1 → batchcorder-0.1.3}/Cargo.lock +23 -837
  7. {batchcorder-0.1.1 → batchcorder-0.1.3}/Cargo.toml +7 -11
  8. {batchcorder-0.1.1 → batchcorder-0.1.3}/PKG-INFO +23 -17
  9. {batchcorder-0.1.1 → batchcorder-0.1.3}/README.md +19 -14
  10. batchcorder-0.1.3/docs/quarto/how-to/cache-config.qmd +125 -0
  11. batchcorder-0.1.3/docs/quarto/how-to/eviction.qmd +129 -0
  12. {batchcorder-0.1.1 → batchcorder-0.1.3}/docs/quarto/reference/api-overview.qmd +2 -2
  13. {batchcorder-0.1.1 → batchcorder-0.1.3}/docs/quarto/tutorials/getting-started.qmd +6 -5
  14. {batchcorder-0.1.1 → batchcorder-0.1.3}/docs/source/index.rst +2 -2
  15. {batchcorder-0.1.1 → batchcorder-0.1.3}/pyproject.toml +44 -10
  16. {batchcorder-0.1.1 → batchcorder-0.1.3}/python/batchcorder/__init__.py +114 -44
  17. {batchcorder-0.1.1 → batchcorder-0.1.3}/python/batchcorder/_batchcorder.pyi +7 -5
  18. batchcorder-0.1.3/src/cached_dataset.rs +1946 -0
  19. {batchcorder-0.1.1 → batchcorder-0.1.3}/src/lib.rs +4 -6
  20. batchcorder-0.1.3/tests/helpers.py +11 -0
  21. batchcorder-0.1.3/tests/strategies.py +244 -0
  22. {batchcorder-0.1.1 → batchcorder-0.1.3}/tests/test_as_record_batch_reader.py +31 -46
  23. {batchcorder-0.1.1 → batchcorder-0.1.3}/tests/test_cast.py +29 -17
  24. batchcorder-0.1.3/tests/test_construction_properties.py +138 -0
  25. {batchcorder-0.1.1 → batchcorder-0.1.3}/tests/test_duckdb.py +6 -7
  26. batchcorder-0.1.3/tests/test_errors.py +358 -0
  27. batchcorder-0.1.3/tests/test_max_readers.py +229 -0
  28. batchcorder-0.1.3/tests/test_max_readers_properties.py +171 -0
  29. batchcorder-0.1.3/tests/test_performance.py +344 -0
  30. {batchcorder-0.1.1 → batchcorder-0.1.3}/tests/test_stream_cache.py +247 -36
  31. batchcorder-0.1.3/tests/test_write_policy.py +172 -0
  32. {batchcorder-0.1.1 → batchcorder-0.1.3}/uv.lock +583 -159
  33. batchcorder-0.1.1/.github/workflows/ci-test.yaml +0 -74
  34. batchcorder-0.1.1/_typos.toml +0 -5
  35. batchcorder-0.1.1/docs/quarto/how-to/cache-config.qmd +0 -114
  36. batchcorder-0.1.1/docs/quarto/how-to/eviction.qmd +0 -107
  37. batchcorder-0.1.1/src/cached_dataset.rs +0 -830
  38. batchcorder-0.1.1/tests/test_errors.py +0 -148
  39. {batchcorder-0.1.1 → batchcorder-0.1.3}/.github/release-drafter.yml +0 -0
  40. {batchcorder-0.1.1 → batchcorder-0.1.3}/.github/workflows/build-wheels.yaml +0 -0
  41. {batchcorder-0.1.1 → batchcorder-0.1.3}/.github/workflows/ci-lint.yaml +0 -0
  42. {batchcorder-0.1.1 → batchcorder-0.1.3}/.github/workflows/ci-pre-release.yaml +0 -0
  43. {batchcorder-0.1.1 → batchcorder-0.1.3}/.github/workflows/ci-release.yaml +0 -0
  44. {batchcorder-0.1.1 → batchcorder-0.1.3}/.github/workflows/release-drafter.yml +0 -0
  45. {batchcorder-0.1.1 → batchcorder-0.1.3}/.readthedocs.yaml +0 -0
  46. {batchcorder-0.1.1 → batchcorder-0.1.3}/.yamllint.yaml +0 -0
  47. {batchcorder-0.1.1 → batchcorder-0.1.3}/LICENSE +0 -0
  48. {batchcorder-0.1.1 → batchcorder-0.1.3}/Makefile +0 -0
  49. {batchcorder-0.1.1 → batchcorder-0.1.3}/conftest.py +0 -0
  50. {batchcorder-0.1.1 → batchcorder-0.1.3}/docs/quarto/.gitignore +0 -0
  51. {batchcorder-0.1.1 → batchcorder-0.1.3}/docs/quarto/_quarto.yml +0 -0
  52. {batchcorder-0.1.1 → batchcorder-0.1.3}/docs/quarto/how-to/duckdb.qmd +0 -0
  53. {batchcorder-0.1.1 → batchcorder-0.1.3}/docs/requirements.txt +0 -0
  54. {batchcorder-0.1.1 → batchcorder-0.1.3}/docs/source/api.rst +0 -0
  55. {batchcorder-0.1.1 → batchcorder-0.1.3}/docs/source/conf.py +0 -0
  56. {batchcorder-0.1.1 → batchcorder-0.1.3}/python/batchcorder/py.typed +0 -0
  57. {batchcorder-0.1.1 → batchcorder-0.1.3}/rust-toolchain.toml +0 -0
  58. {batchcorder-0.1.1 → batchcorder-0.1.3}/scripts/build-docs.sh +0 -0
  59. {batchcorder-0.1.1 → batchcorder-0.1.3}/scripts/build-release.sh +0 -0
  60. {batchcorder-0.1.1 → batchcorder-0.1.3}/src/bin/stub_gen.rs +0 -0
  61. {batchcorder-0.1.1 → batchcorder-0.1.3}/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
@@ -88,3 +88,10 @@ docs/source/_autoapi/
88
88
  !src/bin
89
89
 
90
90
  site
91
+
92
+ drafts
93
+
94
+ # cargo-llvm-cov output
95
+ coverage.lcov
96
+
97
+ .claude
@@ -12,6 +12,9 @@ repos:
12
12
  args: ["--maxkb=500"]
13
13
  - id: name-tests-test
14
14
  args: ["--pytest-test-first"]
15
+ # strategies.py (shared Hypothesis strategies) and helpers.py (shared
16
+ # test constants) are support modules, not test files.
17
+ exclude: ^tests/(strategies|helpers)\.py$
15
18
 
16
19
  - repo: https://github.com/abravalheri/validate-pyproject
17
20
  rev: v0.25
@@ -110,7 +113,7 @@ repos:
110
113
  - id: mypy-stubtest
111
114
  name: mypy stubtest
112
115
  description: Validate _batchcorder.pyi matches the compiled extension at runtime.
113
- entry: .venv/bin/python -m mypy.stubtest batchcorder._batchcorder
116
+ entry: .venv/bin/python -m mypy.stubtest --mypy-config-file pyproject.toml batchcorder._batchcorder
114
117
  language: system
115
118
  pass_filenames: false
116
119
  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
- - Foyer for hybrid memory/disk caching
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
- - Foyer for hybrid memory/disk caching
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/)