polars-crs 0.1.0__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.
- polars_crs-0.1.0/.github/workflows/publish_to_pypi.yml +199 -0
- polars_crs-0.1.0/.gitignore +15 -0
- polars_crs-0.1.0/Cargo.lock +3428 -0
- polars_crs-0.1.0/Cargo.toml +18 -0
- polars_crs-0.1.0/DESIGN.md +68 -0
- polars_crs-0.1.0/Makefile +29 -0
- polars_crs-0.1.0/PKG-INFO +7 -0
- polars_crs-0.1.0/README.md +154 -0
- polars_crs-0.1.0/bench.py +45 -0
- polars_crs-0.1.0/bench_full.py +128 -0
- polars_crs-0.1.0/data/cities_a.csv +9 -0
- polars_crs-0.1.0/data/cities_b.csv +9 -0
- polars_crs-0.1.0/data/cities_c.csv +9 -0
- polars_crs-0.1.0/demo_dutch.py +99 -0
- polars_crs-0.1.0/demo_why.py +74 -0
- polars_crs-0.1.0/gendata.py +35 -0
- polars_crs-0.1.0/polars_crs/__init__.py +188 -0
- polars_crs-0.1.0/polars_crs/_internal.pyi +1 -0
- polars_crs-0.1.0/polars_crs/typing.py +15 -0
- polars_crs-0.1.0/pyproject.toml +23 -0
- polars_crs-0.1.0/requirements.txt +5 -0
- polars_crs-0.1.0/run.py +42 -0
- polars_crs-0.1.0/rust-toolchain.toml +3 -0
- polars_crs-0.1.0/rustfmt.toml +3 -0
- polars_crs-0.1.0/src/crs.rs +108 -0
- polars_crs-0.1.0/src/detect.rs +93 -0
- polars_crs-0.1.0/src/expressions.rs +95 -0
- polars_crs-0.1.0/src/lib.rs +15 -0
- polars_crs-0.1.0/src/parallel.rs +66 -0
- polars_crs-0.1.0/tests/fixtures.py +84 -0
- polars_crs-0.1.0/tests/test_crs.py +178 -0
- polars_crs-0.1.0/validate.py +70 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# This file is based on the autogenerated one by maturin v1.7.8 with:
|
|
2
|
+
#
|
|
3
|
+
# maturin generate-ci github
|
|
4
|
+
#
|
|
5
|
+
# Differences are:
|
|
6
|
+
# - removed x86, armv7, s390x, ppc64le targets from Linux
|
|
7
|
+
# - removed free-threaded wheels
|
|
8
|
+
# - removed musllinux
|
|
9
|
+
# - have separate linux-just-test and linux-min-versions-just-test jobs
|
|
10
|
+
# - add the `RUSTFLAGS: "-Dwarnings"` env variable
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
name: CI
|
|
14
|
+
|
|
15
|
+
on:
|
|
16
|
+
push:
|
|
17
|
+
branches:
|
|
18
|
+
- main
|
|
19
|
+
- master
|
|
20
|
+
tags:
|
|
21
|
+
- '*'
|
|
22
|
+
pull_request:
|
|
23
|
+
workflow_dispatch:
|
|
24
|
+
|
|
25
|
+
permissions:
|
|
26
|
+
contents: read
|
|
27
|
+
|
|
28
|
+
# Superseded runs release their runners instead of queueing behind each other.
|
|
29
|
+
concurrency:
|
|
30
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
31
|
+
cancel-in-progress: true
|
|
32
|
+
|
|
33
|
+
# Make sure CI fails on all warnings, including Clippy lints
|
|
34
|
+
env:
|
|
35
|
+
RUSTFLAGS: "-Dwarnings"
|
|
36
|
+
|
|
37
|
+
jobs:
|
|
38
|
+
linux-just-test:
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
strategy:
|
|
41
|
+
matrix:
|
|
42
|
+
target: [x86_64]
|
|
43
|
+
python-version: ["3.9", "3.11", "3.13"]
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v4
|
|
46
|
+
- uses: actions/setup-python@v5
|
|
47
|
+
with:
|
|
48
|
+
python-version: ${{ matrix.python-version }}
|
|
49
|
+
|
|
50
|
+
- name: Set up Rust
|
|
51
|
+
run: rustup show
|
|
52
|
+
- uses: mozilla-actions/sccache-action@v0.0.6
|
|
53
|
+
- run: make venv
|
|
54
|
+
- run: make pre-commit
|
|
55
|
+
- run: make install
|
|
56
|
+
- run: make test
|
|
57
|
+
|
|
58
|
+
linux-min-versions-just-test:
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
strategy:
|
|
61
|
+
matrix:
|
|
62
|
+
target: [x86_64]
|
|
63
|
+
python-version: ["3.9"]
|
|
64
|
+
steps:
|
|
65
|
+
- uses: actions/checkout@v4
|
|
66
|
+
- uses: actions/setup-python@v5
|
|
67
|
+
with:
|
|
68
|
+
python-version: ${{ matrix.python-version }}
|
|
69
|
+
|
|
70
|
+
- name: Set up Rust
|
|
71
|
+
run: rustup show
|
|
72
|
+
- uses: mozilla-actions/sccache-action@v0.0.6
|
|
73
|
+
- run: make venv
|
|
74
|
+
- run: .venv/bin/python -m pip install polars==1.3.0 # min version
|
|
75
|
+
- run: make install
|
|
76
|
+
- run: make test
|
|
77
|
+
|
|
78
|
+
linux:
|
|
79
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
80
|
+
strategy:
|
|
81
|
+
matrix:
|
|
82
|
+
platform:
|
|
83
|
+
- runner: ubuntu-22.04
|
|
84
|
+
target: x86_64
|
|
85
|
+
- runner: ubuntu-22.04
|
|
86
|
+
target: aarch64
|
|
87
|
+
steps:
|
|
88
|
+
- uses: actions/checkout@v4
|
|
89
|
+
- uses: actions/setup-python@v5
|
|
90
|
+
with:
|
|
91
|
+
python-version: 3.x
|
|
92
|
+
- name: Build wheels
|
|
93
|
+
uses: PyO3/maturin-action@v1
|
|
94
|
+
with:
|
|
95
|
+
target: ${{ matrix.platform.target }}
|
|
96
|
+
args: --release --out dist
|
|
97
|
+
sccache: 'true'
|
|
98
|
+
manylinux: auto
|
|
99
|
+
- name: Upload wheels
|
|
100
|
+
uses: actions/upload-artifact@v4
|
|
101
|
+
with:
|
|
102
|
+
name: wheels-linux-${{ matrix.platform.target }}
|
|
103
|
+
path: dist
|
|
104
|
+
|
|
105
|
+
windows:
|
|
106
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
107
|
+
strategy:
|
|
108
|
+
matrix:
|
|
109
|
+
platform:
|
|
110
|
+
- runner: windows-latest
|
|
111
|
+
target: x64
|
|
112
|
+
steps:
|
|
113
|
+
- uses: actions/checkout@v4
|
|
114
|
+
- uses: actions/setup-python@v5
|
|
115
|
+
with:
|
|
116
|
+
python-version: 3.x
|
|
117
|
+
architecture: ${{ matrix.platform.target }}
|
|
118
|
+
- name: Build wheels
|
|
119
|
+
uses: PyO3/maturin-action@v1
|
|
120
|
+
with:
|
|
121
|
+
target: ${{ matrix.platform.target }}
|
|
122
|
+
args: --release --out dist
|
|
123
|
+
sccache: 'true'
|
|
124
|
+
- name: Upload wheels
|
|
125
|
+
uses: actions/upload-artifact@v4
|
|
126
|
+
with:
|
|
127
|
+
name: wheels-windows-${{ matrix.platform.target }}
|
|
128
|
+
path: dist
|
|
129
|
+
|
|
130
|
+
macos:
|
|
131
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
132
|
+
strategy:
|
|
133
|
+
matrix:
|
|
134
|
+
platform:
|
|
135
|
+
# Intel macOS is not built. Apple stopped shipping those machines in
|
|
136
|
+
# 2023 and GitHub removes the x86_64 macOS runner in 2027. Intel Mac
|
|
137
|
+
# users fall back to the sdist.
|
|
138
|
+
- runner: macos-14
|
|
139
|
+
target: aarch64
|
|
140
|
+
steps:
|
|
141
|
+
- uses: actions/checkout@v4
|
|
142
|
+
- uses: actions/setup-python@v5
|
|
143
|
+
with:
|
|
144
|
+
python-version: 3.x
|
|
145
|
+
- name: Build wheels
|
|
146
|
+
uses: PyO3/maturin-action@v1
|
|
147
|
+
with:
|
|
148
|
+
target: ${{ matrix.platform.target }}
|
|
149
|
+
args: --release --out dist
|
|
150
|
+
sccache: 'true'
|
|
151
|
+
- name: Upload wheels
|
|
152
|
+
uses: actions/upload-artifact@v4
|
|
153
|
+
with:
|
|
154
|
+
name: wheels-macos-${{ matrix.platform.target }}
|
|
155
|
+
path: dist
|
|
156
|
+
|
|
157
|
+
sdist:
|
|
158
|
+
runs-on: ubuntu-latest
|
|
159
|
+
steps:
|
|
160
|
+
- uses: actions/checkout@v4
|
|
161
|
+
- name: Build sdist
|
|
162
|
+
uses: PyO3/maturin-action@v1
|
|
163
|
+
with:
|
|
164
|
+
command: sdist
|
|
165
|
+
args: --out dist
|
|
166
|
+
- name: Upload sdist
|
|
167
|
+
uses: actions/upload-artifact@v4
|
|
168
|
+
with:
|
|
169
|
+
name: wheels-sdist
|
|
170
|
+
path: dist
|
|
171
|
+
|
|
172
|
+
release:
|
|
173
|
+
name: Release
|
|
174
|
+
runs-on: ubuntu-latest
|
|
175
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
176
|
+
needs: [linux, windows, macos, sdist]
|
|
177
|
+
environment: pypi
|
|
178
|
+
permissions:
|
|
179
|
+
# Use to sign the release artifacts
|
|
180
|
+
id-token: write
|
|
181
|
+
# Used to upload release artifacts
|
|
182
|
+
contents: write
|
|
183
|
+
# Used to generate artifact attestation
|
|
184
|
+
attestations: write
|
|
185
|
+
steps:
|
|
186
|
+
- uses: actions/download-artifact@v4
|
|
187
|
+
- name: Generate artifact attestation
|
|
188
|
+
uses: actions/attest-build-provenance@v1
|
|
189
|
+
with:
|
|
190
|
+
subject-path: 'wheels-*/*'
|
|
191
|
+
- name: Publish to PyPI
|
|
192
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
193
|
+
uses: PyO3/maturin-action@v1
|
|
194
|
+
env:
|
|
195
|
+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_ALL_PROJECTS_ACCESS }}
|
|
196
|
+
with:
|
|
197
|
+
command: upload
|
|
198
|
+
args: --non-interactive --skip-existing wheels-*/*
|
|
199
|
+
|