pifeat 0.1.1__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,57 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ workflow_dispatch:
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ rust-tests:
15
+ name: Rust Unit & Zero-Alloc Tests
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - uses: dtolnay/rust-toolchain@stable
20
+ - uses: Swatinem/rust-cache@v2
21
+ - name: Run pure-Rust unit tests
22
+ run: cargo test --no-default-features --lib
23
+ - name: Run zero-allocation & latency verification
24
+ run: cargo test --no-default-features --release --test bench_native -- --nocapture
25
+
26
+ python-scientific-tests:
27
+ name: Scientific Validation (${{ matrix.os }} / ${{ matrix.arch_label }})
28
+ runs-on: ${{ matrix.os }}
29
+ strategy:
30
+ fail-fast: false
31
+ matrix:
32
+ include:
33
+ - os: ubuntu-latest
34
+ arch_label: x86_64
35
+ - os: ubuntu-24.04-arm
36
+ arch_label: aarch64-rpi4-rpi5
37
+ - os: windows-latest
38
+ arch_label: windows-x64
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+ - uses: actions/setup-python@v5
42
+ with:
43
+ python-version: "3.12"
44
+ - uses: dtolnay/rust-toolchain@stable
45
+ - uses: Swatinem/rust-cache@v2
46
+ - name: Install maturin & scientific reference dependencies (pre-built wheels)
47
+ run: |
48
+ python -m pip install --upgrade pip
49
+ pip install --only-binary=:all: maturin numpy scipy pytest
50
+ - name: Build & install pifeat wheel
51
+ run: |
52
+ maturin build --release --out dist -i python
53
+ pip install --no-index --find-links=dist pifeat
54
+ - name: Run zero-dependency stdlib suite
55
+ run: python tests/test_stdlib_zero_dep.py
56
+ - name: Run full scientific reference suite (vs SciPy & NumPy)
57
+ run: pytest -v
@@ -0,0 +1,133 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ rust-tests:
14
+ name: Rust Unit & Zero-Alloc Tests
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: dtolnay/rust-toolchain@stable
19
+ - uses: Swatinem/rust-cache@v2
20
+ - name: Run pure-Rust unit tests
21
+ run: cargo test --no-default-features --lib
22
+ - name: Run zero-allocation verification
23
+ run: cargo test --no-default-features --release --test bench_native -- --nocapture
24
+
25
+ linux:
26
+ runs-on: ubuntu-latest
27
+ strategy:
28
+ fail-fast: false
29
+ matrix:
30
+ target: [x86_64, aarch64, armv7]
31
+ steps:
32
+ - uses: actions/checkout@v4
33
+ - uses: actions/setup-python@v5
34
+ with:
35
+ python-version: "3.12"
36
+ - name: Build wheels
37
+ uses: PyO3/maturin-action@v1
38
+ with:
39
+ target: ${{ matrix.target }}
40
+ args: --release --out dist --interpreter 3.10 3.11 3.12 3.13
41
+ manylinux: auto
42
+ - name: Test x86_64 wheel against SciPy & NumPy
43
+ if: matrix.target == 'x86_64'
44
+ run: |
45
+ pip install --only-binary=:all: numpy scipy pytest
46
+ pip install --no-index --find-links=dist pifeat
47
+ python tests/test_stdlib_zero_dep.py
48
+ pytest -v
49
+ - name: Set up QEMU for Raspberry Pi (ARMv7 / AArch64) container test
50
+ if: matrix.target != 'x86_64'
51
+ uses: docker/setup-qemu-action@v3
52
+ with:
53
+ platforms: arm,arm64
54
+ - name: Test ARMv7 wheel in 32-bit Raspberry Pi container (zero-dependency stdlib)
55
+ if: matrix.target == 'armv7'
56
+ run: |
57
+ docker run --rm --platform linux/arm/v7 \
58
+ -v "${{ github.workspace }}:/work" -w /work \
59
+ arm32v7/python:3.12-slim-bookworm \
60
+ sh -c "pip install --no-index --find-links=dist pifeat && python tests/test_stdlib_zero_dep.py"
61
+ - name: Test AArch64 wheel in 64-bit Raspberry Pi container (zero-dependency stdlib)
62
+ if: matrix.target == 'aarch64'
63
+ run: |
64
+ docker run --rm --platform linux/arm64 \
65
+ -v "${{ github.workspace }}:/work" -w /work \
66
+ arm64v8/python:3.12-slim-bookworm \
67
+ sh -c "pip install --no-index --find-links=dist pifeat && python tests/test_stdlib_zero_dep.py"
68
+ - uses: actions/upload-artifact@v4
69
+ with:
70
+ name: wheels-linux-${{ matrix.target }}
71
+ path: dist
72
+
73
+ windows:
74
+ runs-on: windows-latest
75
+ strategy:
76
+ fail-fast: false
77
+ matrix:
78
+ target: [x64]
79
+ steps:
80
+ - uses: actions/checkout@v4
81
+ - uses: actions/setup-python@v5
82
+ with:
83
+ python-version: "3.12"
84
+ architecture: ${{ matrix.target }}
85
+ - name: Build wheels
86
+ uses: PyO3/maturin-action@v1
87
+ with:
88
+ target: ${{ matrix.target }}
89
+ args: --release --out dist --interpreter 3.10 3.11 3.12 3.13
90
+ - name: Test Windows x64 wheel against SciPy & NumPy
91
+ run: |
92
+ pip install --only-binary=:all: numpy scipy pytest
93
+ pip install --no-index --find-links=dist pifeat
94
+ python tests/test_stdlib_zero_dep.py
95
+ pytest -v
96
+ - uses: actions/upload-artifact@v4
97
+ with:
98
+ name: wheels-windows-${{ matrix.target }}
99
+ path: dist
100
+
101
+ sdist:
102
+ runs-on: ubuntu-latest
103
+ steps:
104
+ - uses: actions/checkout@v4
105
+ - name: Build sdist
106
+ uses: PyO3/maturin-action@v1
107
+ with:
108
+ command: sdist
109
+ args: --out dist
110
+ - uses: actions/upload-artifact@v4
111
+ with:
112
+ name: wheels-sdist
113
+ path: dist
114
+
115
+ release:
116
+ name: Publish to PyPI
117
+ runs-on: ubuntu-latest
118
+ needs: [rust-tests, linux, windows, sdist]
119
+ if: startsWith(github.ref, 'refs/tags/v')
120
+ environment:
121
+ name: pypi
122
+ url: https://pypi.org/p/pifeat
123
+ permissions:
124
+ id-token: write # Trusted Publishing (OIDC)
125
+ steps:
126
+ - uses: actions/download-artifact@v4
127
+ with:
128
+ path: dist
129
+ merge-multiple: true
130
+ - name: Publish to PyPI
131
+ uses: pypa/gh-action-pypi-publish@release/v1
132
+ with:
133
+ packages-dir: dist
@@ -0,0 +1,11 @@
1
+ /target
2
+ /dist
3
+ *.egg-info
4
+ __pycache__/
5
+ .pytest_cache/
6
+ *.pyd
7
+ *.pdb
8
+ *.so
9
+ *.dylib
10
+ .venv/
11
+ venv/
@@ -0,0 +1,288 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "autocfg"
7
+ version = "1.5.1"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
10
+
11
+ [[package]]
12
+ name = "cc"
13
+ version = "1.11.2"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "33ef9e3e8154a45c7a95cff4c1299702106ad94062d7bb85fdc5d3a5afd91d45"
16
+ dependencies = [
17
+ "find-msvc-tools",
18
+ "shlex",
19
+ ]
20
+
21
+ [[package]]
22
+ name = "cfg-if"
23
+ version = "1.0.5"
24
+ source = "registry+https://github.com/rust-lang/crates.io-index"
25
+ checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
26
+
27
+ [[package]]
28
+ name = "find-msvc-tools"
29
+ version = "0.1.15"
30
+ source = "registry+https://github.com/rust-lang/crates.io-index"
31
+ checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48"
32
+
33
+ [[package]]
34
+ name = "heck"
35
+ version = "0.5.0"
36
+ source = "registry+https://github.com/rust-lang/crates.io-index"
37
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
38
+
39
+ [[package]]
40
+ name = "indoc"
41
+ version = "2.0.8"
42
+ source = "registry+https://github.com/rust-lang/crates.io-index"
43
+ checksum = "a37b2691796cffeb8a8cd305ac66e65841559f147f4e63231d0eafa4db5384d1"
44
+ dependencies = [
45
+ "rustversion",
46
+ ]
47
+
48
+ [[package]]
49
+ name = "libc"
50
+ version = "0.2.191"
51
+ source = "registry+https://github.com/rust-lang/crates.io-index"
52
+ checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
53
+
54
+ [[package]]
55
+ name = "memoffset"
56
+ version = "0.9.1"
57
+ source = "registry+https://github.com/rust-lang/crates.io-index"
58
+ checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
59
+ dependencies = [
60
+ "autocfg",
61
+ ]
62
+
63
+ [[package]]
64
+ name = "num-complex"
65
+ version = "0.4.6"
66
+ source = "registry+https://github.com/rust-lang/crates.io-index"
67
+ checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
68
+ dependencies = [
69
+ "num-traits",
70
+ ]
71
+
72
+ [[package]]
73
+ name = "num-integer"
74
+ version = "0.1.47"
75
+ source = "registry+https://github.com/rust-lang/crates.io-index"
76
+ checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b"
77
+ dependencies = [
78
+ "num-traits",
79
+ ]
80
+
81
+ [[package]]
82
+ name = "num-traits"
83
+ version = "0.2.19"
84
+ source = "registry+https://github.com/rust-lang/crates.io-index"
85
+ checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
86
+ dependencies = [
87
+ "autocfg",
88
+ ]
89
+
90
+ [[package]]
91
+ name = "once_cell"
92
+ version = "1.21.4"
93
+ source = "registry+https://github.com/rust-lang/crates.io-index"
94
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
95
+
96
+ [[package]]
97
+ name = "pifeat"
98
+ version = "0.1.1"
99
+ dependencies = [
100
+ "pyo3",
101
+ "realfft",
102
+ ]
103
+
104
+ [[package]]
105
+ name = "portable-atomic"
106
+ version = "1.15.0"
107
+ source = "registry+https://github.com/rust-lang/crates.io-index"
108
+ checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
109
+
110
+ [[package]]
111
+ name = "primal-check"
112
+ version = "0.3.4"
113
+ source = "registry+https://github.com/rust-lang/crates.io-index"
114
+ checksum = "dc0d895b311e3af9902528fbb8f928688abbd95872819320517cc24ca6b2bd08"
115
+ dependencies = [
116
+ "num-integer",
117
+ ]
118
+
119
+ [[package]]
120
+ name = "proc-macro2"
121
+ version = "1.0.107"
122
+ source = "registry+https://github.com/rust-lang/crates.io-index"
123
+ checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
124
+ dependencies = [
125
+ "unicode-ident",
126
+ ]
127
+
128
+ [[package]]
129
+ name = "pyo3"
130
+ version = "0.22.6"
131
+ source = "registry+https://github.com/rust-lang/crates.io-index"
132
+ checksum = "f402062616ab18202ae8319da13fa4279883a2b8a9d9f83f20dbade813ce1884"
133
+ dependencies = [
134
+ "cfg-if",
135
+ "indoc",
136
+ "libc",
137
+ "memoffset",
138
+ "once_cell",
139
+ "portable-atomic",
140
+ "pyo3-build-config",
141
+ "pyo3-ffi",
142
+ "pyo3-macros",
143
+ "unindent",
144
+ ]
145
+
146
+ [[package]]
147
+ name = "pyo3-build-config"
148
+ version = "0.22.6"
149
+ source = "registry+https://github.com/rust-lang/crates.io-index"
150
+ checksum = "b14b5775b5ff446dd1056212d778012cbe8a0fbffd368029fd9e25b514479c38"
151
+ dependencies = [
152
+ "once_cell",
153
+ "python3-dll-a",
154
+ "target-lexicon",
155
+ ]
156
+
157
+ [[package]]
158
+ name = "pyo3-ffi"
159
+ version = "0.22.6"
160
+ source = "registry+https://github.com/rust-lang/crates.io-index"
161
+ checksum = "9ab5bcf04a2cdcbb50c7d6105de943f543f9ed92af55818fd17b660390fc8636"
162
+ dependencies = [
163
+ "libc",
164
+ "pyo3-build-config",
165
+ ]
166
+
167
+ [[package]]
168
+ name = "pyo3-macros"
169
+ version = "0.22.6"
170
+ source = "registry+https://github.com/rust-lang/crates.io-index"
171
+ checksum = "0fd24d897903a9e6d80b968368a34e1525aeb719d568dba8b3d4bfa5dc67d453"
172
+ dependencies = [
173
+ "proc-macro2",
174
+ "pyo3-macros-backend",
175
+ "quote",
176
+ "syn",
177
+ ]
178
+
179
+ [[package]]
180
+ name = "pyo3-macros-backend"
181
+ version = "0.22.6"
182
+ source = "registry+https://github.com/rust-lang/crates.io-index"
183
+ checksum = "36c011a03ba1e50152b4b394b479826cad97e7a21eb52df179cd91ac411cbfbe"
184
+ dependencies = [
185
+ "heck",
186
+ "proc-macro2",
187
+ "pyo3-build-config",
188
+ "quote",
189
+ "syn",
190
+ ]
191
+
192
+ [[package]]
193
+ name = "python3-dll-a"
194
+ version = "0.2.15"
195
+ source = "registry+https://github.com/rust-lang/crates.io-index"
196
+ checksum = "d80ba7540edb18890d444c5aa8e1f1f99b1bdf26fb26ae383135325f4a36042b"
197
+ dependencies = [
198
+ "cc",
199
+ ]
200
+
201
+ [[package]]
202
+ name = "quote"
203
+ version = "1.0.47"
204
+ source = "registry+https://github.com/rust-lang/crates.io-index"
205
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
206
+ dependencies = [
207
+ "proc-macro2",
208
+ ]
209
+
210
+ [[package]]
211
+ name = "realfft"
212
+ version = "3.5.1"
213
+ source = "registry+https://github.com/rust-lang/crates.io-index"
214
+ checksum = "538895ccf2006b473aafbe8d72770e21038961ab67aae34f3c577485fc703a7d"
215
+ dependencies = [
216
+ "rustfft",
217
+ ]
218
+
219
+ [[package]]
220
+ name = "rustfft"
221
+ version = "6.4.1"
222
+ source = "registry+https://github.com/rust-lang/crates.io-index"
223
+ checksum = "21db5f9893e91f41798c88680037dba611ca6674703c1a18601b01a72c8adb89"
224
+ dependencies = [
225
+ "num-complex",
226
+ "num-integer",
227
+ "num-traits",
228
+ "primal-check",
229
+ "strength_reduce",
230
+ "transpose",
231
+ ]
232
+
233
+ [[package]]
234
+ name = "rustversion"
235
+ version = "1.0.23"
236
+ source = "registry+https://github.com/rust-lang/crates.io-index"
237
+ checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
238
+
239
+ [[package]]
240
+ name = "shlex"
241
+ version = "2.0.1"
242
+ source = "registry+https://github.com/rust-lang/crates.io-index"
243
+ checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
244
+
245
+ [[package]]
246
+ name = "strength_reduce"
247
+ version = "0.2.4"
248
+ source = "registry+https://github.com/rust-lang/crates.io-index"
249
+ checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82"
250
+
251
+ [[package]]
252
+ name = "syn"
253
+ version = "2.0.119"
254
+ source = "registry+https://github.com/rust-lang/crates.io-index"
255
+ checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
256
+ dependencies = [
257
+ "proc-macro2",
258
+ "quote",
259
+ "unicode-ident",
260
+ ]
261
+
262
+ [[package]]
263
+ name = "target-lexicon"
264
+ version = "0.12.16"
265
+ source = "registry+https://github.com/rust-lang/crates.io-index"
266
+ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
267
+
268
+ [[package]]
269
+ name = "transpose"
270
+ version = "0.2.3"
271
+ source = "registry+https://github.com/rust-lang/crates.io-index"
272
+ checksum = "1ad61aed86bc3faea4300c7aee358b4c6d0c8d6ccc36524c96e4c92ccf26e77e"
273
+ dependencies = [
274
+ "num-integer",
275
+ "strength_reduce",
276
+ ]
277
+
278
+ [[package]]
279
+ name = "unicode-ident"
280
+ version = "1.0.27"
281
+ source = "registry+https://github.com/rust-lang/crates.io-index"
282
+ checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
283
+
284
+ [[package]]
285
+ name = "unindent"
286
+ version = "0.2.4"
287
+ source = "registry+https://github.com/rust-lang/crates.io-index"
288
+ checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
@@ -0,0 +1,25 @@
1
+ [package]
2
+ name = "pifeat"
3
+ version = "0.1.1"
4
+ edition = "2021"
5
+ description = "Zero-dependency, high-performance EEG and biosignal feature extraction engine in Rust with Python bindings"
6
+ license = "AGPL-3.0-or-later"
7
+ readme = "README.md"
8
+
9
+ [lib]
10
+ name = "pifeat"
11
+ crate-type = ["cdylib", "rlib"]
12
+
13
+ [dependencies]
14
+ pyo3 = { version = "0.22", features = ["extension-module", "generate-import-lib"], optional = true }
15
+ realfft = "3.4"
16
+
17
+ [features]
18
+ default = ["python"]
19
+ python = ["dep:pyo3"]
20
+
21
+ [profile.release]
22
+ opt-level = 3
23
+ lto = "fat"
24
+ codegen-units = 1
25
+ strip = true