Skip to content

Commit b221cff

Browse files
author
Vladimir Vilimaitis
committed
Harden release compatibility checks
1 parent e771ac1 commit b221cff

5 files changed

Lines changed: 18 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ jobs:
4848
- name: Python tests
4949
run: uv run --extra dev pytest
5050

51+
- name: Lower-bound Polars smoke
52+
run: |
53+
uv pip install --reinstall "polars==1.29.0"
54+
uv run --no-sync python scripts/smoke_public_api.py
55+
5156
- name: Rust and lint gates
5257
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
5358
run: |

.github/workflows/release.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
with:
3030
platforms: arm64
3131

32-
- uses: PyO3/maturin-action@v1
32+
- uses: PyO3/maturin-action@423a6347767a8b16e65c2a7a7042e4a921528da8
3333
with:
3434
maturin-version: v1.11.5
3535
target: ${{ matrix.target }}
@@ -69,7 +69,7 @@ jobs:
6969
with:
7070
python-version: ${{ matrix.python-version }}
7171

72-
- uses: PyO3/maturin-action@v1
72+
- uses: PyO3/maturin-action@423a6347767a8b16e65c2a7a7042e4a921528da8
7373
with:
7474
maturin-version: v1.11.5
7575
target: x64
@@ -110,7 +110,7 @@ jobs:
110110
with:
111111
python-version: ${{ matrix.python-version }}
112112

113-
- uses: PyO3/maturin-action@v1
113+
- uses: PyO3/maturin-action@423a6347767a8b16e65c2a7a7042e4a921528da8
114114
with:
115115
maturin-version: v1.11.5
116116
target: ${{ matrix.platform.target }}
@@ -134,7 +134,7 @@ jobs:
134134
steps:
135135
- uses: actions/checkout@v4
136136

137-
- uses: PyO3/maturin-action@v1
137+
- uses: PyO3/maturin-action@423a6347767a8b16e65c2a7a7042e4a921528da8
138138
with:
139139
command: sdist
140140
maturin-version: v1.11.5
@@ -176,6 +176,8 @@ jobs:
176176
.smoke/bin/python -m pip install --upgrade pip
177177
.smoke/bin/python -m pip install --find-links dist polars-janitor==0.1.0
178178
.smoke/bin/python scripts/smoke_public_api.py
179+
.smoke/bin/python -m pip install --force-reinstall "polars==1.29.0"
180+
.smoke/bin/python scripts/smoke_public_api.py
179181
180182
publish:
181183
name: Publish to PyPI
@@ -193,6 +195,6 @@ jobs:
193195
path: dist
194196
merge-multiple: true
195197

196-
- uses: pypa/gh-action-pypi-publish@release/v1
198+
- uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b
197199
with:
198200
packages-dir: dist

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ import polars_janitor as pj
2323
pip install polars-janitor
2424
```
2525

26+
`polars-janitor` supports Python Polars `1.29.0` and newer. Older Polars `1.x` wheels do not expose the data exchange API this extension uses.
27+
2628
From a local checkout:
2729

2830
```powershell
@@ -228,6 +230,8 @@ Those may be useful in R, but in Polars they either duplicate existing APIs or p
228230

229231
LazyFrame support is deliberately conservative. `clean_names`, `remove_empty(..., axis="rows")`, and `get_dupes` can build lazy plans without collecting data. Column-removing helpers that need to inspect values are eager-only.
230232

233+
The package supports Python Polars `1.29.0` and newer. Compatibility tests run against that lower bound and the current lockfile version.
234+
231235
The project favors broad Python Polars compatibility over direct Rust deserialization of Python lazy plans. Eager frames cross through `pyo3-polars`; lazy frames keep their plans in Python Polars, with Rust deciding what public Polars plan to build.
232236

233237
The compiled extension is CPython-version-specific. If `import polars_janitor` fails after changing Python versions, rebuild with `maturin develop --release` or reinstall from the wheel for that interpreter.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ classifiers = [
4141
"Typing :: Typed",
4242
]
4343
dependencies = [
44-
"polars>=1.0",
44+
"polars>=1.29.0",
4545
]
4646

4747
[project.urls]

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)