pyhyperminhash 0.1.2__tar.gz → 0.1.5__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.
@@ -0,0 +1,285 @@
1
+ # This file is autogenerated by maturin v1.10.2
2
+ # To update, run
3
+ #
4
+ # maturin generate-ci --pytest github
5
+ #
6
+ name: CI
7
+
8
+ on:
9
+ push:
10
+ branches:
11
+ - main
12
+ - master
13
+ - pyo3ci
14
+ tags:
15
+ - '*'
16
+ pull_request:
17
+ workflow_dispatch:
18
+
19
+ permissions:
20
+ contents: read
21
+
22
+ jobs:
23
+ linux:
24
+ runs-on: ${{ matrix.platform.runner }}
25
+ strategy:
26
+ matrix:
27
+ platform:
28
+ - runner: ubuntu-22.04
29
+ target: x86_64
30
+ - runner: ubuntu-22.04
31
+ target: x86
32
+ - runner: ubuntu-22.04
33
+ target: aarch64
34
+ - runner: ubuntu-22.04
35
+ target: armv7
36
+ - runner: ubuntu-22.04
37
+ target: s390x
38
+ - runner: ubuntu-22.04
39
+ target: ppc64le
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+ - uses: actions/setup-python@v5
43
+ with:
44
+ python-version: 3.x
45
+ - name: Build wheels
46
+ uses: PyO3/maturin-action@v1
47
+ with:
48
+ target: ${{ matrix.platform.target }}
49
+ args: --release --out dist
50
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
51
+ manylinux: auto
52
+ - name: Build free-threaded wheels
53
+ uses: PyO3/maturin-action@v1
54
+ with:
55
+ target: ${{ matrix.platform.target }}
56
+ args: --release --out dist -i python3.13t
57
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
58
+ manylinux: auto
59
+ - name: Upload wheels
60
+ uses: actions/upload-artifact@v4
61
+ with:
62
+ name: wheels-linux-${{ matrix.platform.target }}
63
+ path: dist
64
+ - name: pytest
65
+ if: ${{ startsWith(matrix.platform.target, 'x86_64') }}
66
+ shell: bash
67
+ run: |
68
+ set -e
69
+ python3 -m venv .venv
70
+ source .venv/bin/activate
71
+ pip install pyhyperminhash --find-links dist --force-reinstall
72
+ pip install pytest
73
+ pytest
74
+ - name: pytest
75
+ if: ${{ !startsWith(matrix.platform.target, 'x86') && matrix.platform.target != 'ppc64' }}
76
+ uses: uraimo/run-on-arch-action@v2
77
+ with:
78
+ arch: ${{ matrix.platform.target }}
79
+ distro: ubuntu22.04
80
+ githubToken: ${{ github.token }}
81
+ install: |
82
+ apt-get update
83
+ apt-get install -y --no-install-recommends python3 python3-pip
84
+ pip3 install -U pip pytest
85
+ run: |
86
+ set -e
87
+ pip3 install pyhyperminhash --find-links dist --force-reinstall
88
+ pytest
89
+
90
+ musllinux:
91
+ runs-on: ${{ matrix.platform.runner }}
92
+ strategy:
93
+ matrix:
94
+ platform:
95
+ - runner: ubuntu-22.04
96
+ target: x86_64
97
+ - runner: ubuntu-22.04
98
+ target: x86
99
+ - runner: ubuntu-22.04
100
+ target: aarch64
101
+ - runner: ubuntu-22.04
102
+ target: armv7
103
+ steps:
104
+ - uses: actions/checkout@v4
105
+ - uses: actions/setup-python@v5
106
+ with:
107
+ python-version: 3.x
108
+ - name: Build wheels
109
+ uses: PyO3/maturin-action@v1
110
+ with:
111
+ target: ${{ matrix.platform.target }}
112
+ args: --release --out dist
113
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
114
+ manylinux: musllinux_1_2
115
+ - name: Build free-threaded wheels
116
+ uses: PyO3/maturin-action@v1
117
+ with:
118
+ target: ${{ matrix.platform.target }}
119
+ args: --release --out dist -i python3.13t
120
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
121
+ manylinux: musllinux_1_2
122
+ - name: Upload wheels
123
+ uses: actions/upload-artifact@v4
124
+ with:
125
+ name: wheels-musllinux-${{ matrix.platform.target }}
126
+ path: dist
127
+ - name: pytest
128
+ if: ${{ startsWith(matrix.platform.target, 'x86_64') }}
129
+ uses: addnab/docker-run-action@v3
130
+ with:
131
+ image: alpine:latest
132
+ options: -v ${{ github.workspace }}:/io -w /io
133
+ run: |
134
+ set -e
135
+ apk add py3-pip py3-virtualenv
136
+ python3 -m virtualenv .venv
137
+ source .venv/bin/activate
138
+ pip install pyhyperminhash --no-index --find-links dist --force-reinstall
139
+ pip install pytest
140
+ pytest
141
+ - name: pytest
142
+ if: ${{ !startsWith(matrix.platform.target, 'x86') }}
143
+ uses: uraimo/run-on-arch-action@v2
144
+ with:
145
+ arch: ${{ matrix.platform.target }}
146
+ distro: alpine_latest
147
+ githubToken: ${{ github.token }}
148
+ install: |
149
+ apk add py3-virtualenv
150
+ run: |
151
+ set -e
152
+ python3 -m virtualenv .venv
153
+ source .venv/bin/activate
154
+ pip install pytest
155
+ pip install pyhyperminhash --find-links dist --force-reinstall
156
+ pytest
157
+
158
+ windows:
159
+ runs-on: ${{ matrix.platform.runner }}
160
+ strategy:
161
+ matrix:
162
+ platform:
163
+ - runner: windows-latest
164
+ target: x64
165
+ - runner: windows-latest
166
+ target: x86
167
+ steps:
168
+ - uses: actions/checkout@v4
169
+ - uses: actions/setup-python@v5
170
+ with:
171
+ python-version: 3.x
172
+ architecture: ${{ matrix.platform.target }}
173
+ - name: Build wheels
174
+ uses: PyO3/maturin-action@v1
175
+ with:
176
+ target: ${{ matrix.platform.target }}
177
+ args: --release --out dist
178
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
179
+ - uses: actions/setup-python@v5
180
+ with:
181
+ python-version: 3.13t
182
+ architecture: ${{ matrix.platform.target }}
183
+ - name: Build free-threaded wheels
184
+ uses: PyO3/maturin-action@v1
185
+ with:
186
+ target: ${{ matrix.platform.target }}
187
+ args: --release --out dist -i python3.13t
188
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
189
+ - name: Upload wheels
190
+ uses: actions/upload-artifact@v4
191
+ with:
192
+ name: wheels-windows-${{ matrix.platform.target }}
193
+ path: dist
194
+ - name: pytest
195
+ if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
196
+ shell: bash
197
+ run: |
198
+ set -e
199
+ python3 -m venv .venv
200
+ source .venv/Scripts/activate
201
+ pip install pyhyperminhash --find-links dist --force-reinstall
202
+ pip install pytest
203
+ pytest
204
+
205
+ macos:
206
+ runs-on: ${{ matrix.platform.runner }}
207
+ strategy:
208
+ matrix:
209
+ platform:
210
+ - runner: macos-15-intel
211
+ target: x86_64
212
+ - runner: macos-15
213
+ target: aarch64
214
+ steps:
215
+ - uses: actions/checkout@v4
216
+ - uses: actions/setup-python@v5
217
+ with:
218
+ python-version: 3.x
219
+ - name: Build wheels
220
+ uses: PyO3/maturin-action@v1
221
+ with:
222
+ target: ${{ matrix.platform.target }}
223
+ args: --release --out dist
224
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
225
+ - name: Build free-threaded wheels
226
+ uses: PyO3/maturin-action@v1
227
+ with:
228
+ target: ${{ matrix.platform.target }}
229
+ args: --release --out dist -i python3.13t
230
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
231
+ - name: Upload wheels
232
+ uses: actions/upload-artifact@v4
233
+ with:
234
+ name: wheels-macos-${{ matrix.platform.target }}
235
+ path: dist
236
+ - name: pytest
237
+ run: |
238
+ set -e
239
+ python3 -m venv .venv
240
+ source .venv/bin/activate
241
+ pip install pyhyperminhash --find-links dist --force-reinstall
242
+ pip install pytest
243
+ pytest
244
+
245
+ sdist:
246
+ runs-on: ubuntu-latest
247
+ steps:
248
+ - uses: actions/checkout@v4
249
+ - name: Build sdist
250
+ uses: PyO3/maturin-action@v1
251
+ with:
252
+ command: sdist
253
+ args: --out dist
254
+ - name: Upload sdist
255
+ uses: actions/upload-artifact@v4
256
+ with:
257
+ name: wheels-sdist
258
+ path: dist
259
+
260
+ release:
261
+ name: Release
262
+ runs-on: ubuntu-latest
263
+ if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
264
+ needs: [linux, musllinux, windows, macos, sdist]
265
+ permissions:
266
+ # Use to sign the release artifacts
267
+ id-token: write
268
+ # Used to upload release artifacts
269
+ contents: write
270
+ # Used to generate artifact attestation
271
+ attestations: write
272
+ steps:
273
+ - uses: actions/download-artifact@v4
274
+ - name: Generate artifact attestation
275
+ uses: actions/attest-build-provenance@v2
276
+ with:
277
+ subject-path: 'wheels-*/*'
278
+ - name: Publish to PyPI
279
+ if: ${{ startsWith(github.ref, 'refs/tags/') }}
280
+ uses: PyO3/maturin-action@v1
281
+ env:
282
+ MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
283
+ with:
284
+ command: upload
285
+ args: --non-interactive --skip-existing wheels-*/*
@@ -0,0 +1,68 @@
1
+ name: Clippy, Format
2
+
3
+ on: [pull_request, push, workflow_dispatch]
4
+
5
+ jobs:
6
+ fmt:
7
+ name: rustfmt
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v4
11
+ - uses: dtolnay/rust-toolchain@stable
12
+ with:
13
+ components: rustfmt
14
+ - run: cargo fmt --all -- --check
15
+
16
+ clippy:
17
+ name: cargo clippy
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ - uses: dtolnay/rust-toolchain@stable
22
+ with:
23
+ components: clippy
24
+ - run: cargo clippy --all --tests -- -D warnings
25
+
26
+ pytest:
27
+ name: pytest
28
+ runs-on: ubuntu-latest
29
+ strategy:
30
+ matrix:
31
+ pyver: ["3.9", "3.13", "3.14"]
32
+ steps:
33
+ - uses: actions/checkout@v6
34
+ - uses: actions/setup-python@v5
35
+ with:
36
+ python-version: ${{ matrix.pyver }}
37
+ - name: Create venv
38
+ run: python3 -m venv .venv
39
+ - name: Run ruff
40
+ run: |
41
+ set -e
42
+ source .venv/bin/activate
43
+ pip install --upgrade pip
44
+ pip install ruff
45
+ ruff check --verbose
46
+ ruff format --check --diff
47
+ - uses: dtolnay/rust-toolchain@stable
48
+ with:
49
+ components: clippy
50
+ - name: Build wheels
51
+ uses: PyO3/maturin-action@v1
52
+ with:
53
+ args: --out dist
54
+ - name: Run pytest
55
+ run: |
56
+ set -e
57
+ source .venv/bin/activate
58
+ pip install pyhyperminhash --find-links dist --force-reinstall
59
+ pip install pytest
60
+ RUST_BACKTRACE=1 pytest -v
61
+ - name: Run examples
62
+ run: |
63
+ set -e
64
+ source .venv/bin/activate
65
+ python3 examples/simple.py
66
+ python3 examples/sqlite_agg.py
67
+ python3 examples/large_file.py
68
+ python3 examples/unique_files.py tests examples
@@ -0,0 +1,3 @@
1
+ /dist
2
+ /target
3
+ demo_file.txt