py-alpha-lib 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.
Files changed (51) hide show
  1. py_alpha_lib-0.1.0/.agent/skills/add_algo.md +21 -0
  2. py_alpha_lib-0.1.0/.github/workflows/CI.yml +154 -0
  3. py_alpha_lib-0.1.0/.gitignore +77 -0
  4. py_alpha_lib-0.1.0/Cargo.lock +371 -0
  5. py_alpha_lib-0.1.0/Cargo.toml +23 -0
  6. py_alpha_lib-0.1.0/LICENSE +22 -0
  7. py_alpha_lib-0.1.0/PKG-INFO +188 -0
  8. py_alpha_lib-0.1.0/README.md +174 -0
  9. py_alpha_lib-0.1.0/build.rs +1530 -0
  10. py_alpha_lib-0.1.0/examples/wq101/al/__init__.py +80 -0
  11. py_alpha_lib-0.1.0/examples/wq101/al/alpha101.py +1367 -0
  12. py_alpha_lib-0.1.0/examples/wq101/al/alpha101_context.py +95 -0
  13. py_alpha_lib-0.1.0/examples/wq101/alpha101.txt +101 -0
  14. py_alpha_lib-0.1.0/examples/wq101/main.py +81 -0
  15. py_alpha_lib-0.1.0/examples/wq101/pd_/__init__.py +81 -0
  16. py_alpha_lib-0.1.0/examples/wq101/pd_/alpha101_adjusted.py +1104 -0
  17. py_alpha_lib-0.1.0/examples/wq101/result.md +17 -0
  18. py_alpha_lib-0.1.0/pyproject.toml +34 -0
  19. py_alpha_lib-0.1.0/python/alpha/__init__.py +8 -0
  20. py_alpha_lib-0.1.0/python/alpha/algo/__init__.py +3 -0
  21. py_alpha_lib-0.1.0/python/alpha/algo/algo.md +98 -0
  22. py_alpha_lib-0.1.0/python/alpha/algo/algo.py +29 -0
  23. py_alpha_lib-0.1.0/python/alpha/algo/algo_gen.py +456 -0
  24. py_alpha_lib-0.1.0/python/alpha/algo.md +30 -0
  25. py_alpha_lib-0.1.0/python/alpha/lang/__init__.py +1 -0
  26. py_alpha_lib-0.1.0/python/alpha/lang/__main__.py +17 -0
  27. py_alpha_lib-0.1.0/python/alpha/lang/alpha.lark +49 -0
  28. py_alpha_lib-0.1.0/python/alpha/lang/parser.py +3572 -0
  29. py_alpha_lib-0.1.0/python/alpha/lang/to_python.py +239 -0
  30. py_alpha_lib-0.1.0/python/conftest.py +0 -0
  31. py_alpha_lib-0.1.0/python/tests/test_grammar.py +28 -0
  32. py_alpha_lib-0.1.0/python/tests/test_rank.py +14 -0
  33. py_alpha_lib-0.1.0/python/tests/test_talib.py +50 -0
  34. py_alpha_lib-0.1.0/python/tests/test_to_python.py +73 -0
  35. py_alpha_lib-0.1.0/rustfmt.toml +1 -0
  36. py_alpha_lib-0.1.0/src/algo/context.rs +89 -0
  37. py_alpha_lib-0.1.0/src/algo/cross.rs +409 -0
  38. py_alpha_lib-0.1.0/src/algo/ema.rs +351 -0
  39. py_alpha_lib-0.1.0/src/algo/error.rs +18 -0
  40. py_alpha_lib-0.1.0/src/algo/extremum.rs +360 -0
  41. py_alpha_lib-0.1.0/src/algo/ma.rs +431 -0
  42. py_alpha_lib-0.1.0/src/algo/mod.rs +54 -0
  43. py_alpha_lib-0.1.0/src/algo/rank.rs +262 -0
  44. py_alpha_lib-0.1.0/src/algo/series.rs +280 -0
  45. py_alpha_lib-0.1.0/src/algo/skip_nan_window.rs +139 -0
  46. py_alpha_lib-0.1.0/src/algo/stats.rs +580 -0
  47. py_alpha_lib-0.1.0/src/algo/stddev.rs +236 -0
  48. py_alpha_lib-0.1.0/src/algo/sum.rs +263 -0
  49. py_alpha_lib-0.1.0/src/lib.rs +183 -0
  50. py_alpha_lib-0.1.0/tests/rank.py +16 -0
  51. py_alpha_lib-0.1.0/tests/usage.py +24 -0
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: add_algo
3
+ description: Add new algorithm to the library.
4
+ ---
5
+
6
+
7
+ # Add New Algorithm
8
+
9
+ 1. algorithm should be added to `algo` module
10
+ 2. algorithm function should has prefix `ta_`
11
+ 3. numeric type should be generic as `NumT: Float + Send + Sync`
12
+ 4. conditional type should be `bool`
13
+ 5. first argument should be `ctx: &Context`, handle `ctx.flags`
14
+ 6. second argument should be `r: &mut [NumT]` or `r: &mut [bool]` by algorithm type, output buffer
15
+ 7. implement template can be referenced from `ta_ma` from `algo/ma.rs`
16
+ 1. check input/output buffer length matches
17
+ 2. fast return if no calculation needed
18
+ 3. parallel calculation with `ctx.groups`
19
+ 8. add document for the new algorithm
20
+ 9. add test for the new algorithm
21
+
@@ -0,0 +1,154 @@
1
+ # This file is autogenerated by maturin v1.10.2
2
+ # To update, run
3
+ #
4
+ # maturin generate-ci github
5
+ #
6
+ name: CI
7
+
8
+ on:
9
+ push:
10
+ tags:
11
+ - 'v*'
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ linux:
18
+ runs-on: ${{ matrix.platform.runner }}
19
+ strategy:
20
+ matrix:
21
+ platform:
22
+ - runner: ubuntu-22.04
23
+ target: x86_64
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ - uses: actions/setup-python@v5
27
+ with:
28
+ python-version: 3.x
29
+ - name: Build wheels
30
+ uses: PyO3/maturin-action@v1
31
+ env:
32
+ RUSTFLAGS: "-C target-feature=+sse4.2 -C target-feature=+avx2 -C target-feature=+pclmulqdq"
33
+ with:
34
+ target: ${{ matrix.platform.target }}
35
+ args: --release --out dist --find-interpreter
36
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
37
+ manylinux: auto
38
+ - name: Upload wheels
39
+ uses: actions/upload-artifact@v4
40
+ with:
41
+ name: wheels-linux-${{ matrix.platform.target }}
42
+ path: dist
43
+
44
+ musllinux:
45
+ runs-on: ${{ matrix.platform.runner }}
46
+ strategy:
47
+ matrix:
48
+ platform:
49
+ - runner: ubuntu-22.04
50
+ target: x86_64
51
+ steps:
52
+ - uses: actions/checkout@v4
53
+ - uses: actions/setup-python@v5
54
+ with:
55
+ python-version: 3.x
56
+ - name: Build wheels
57
+ uses: PyO3/maturin-action@v1
58
+ env:
59
+ RUSTFLAGS: "-C target-feature=+sse4.2 -C target-feature=+avx2 -C target-feature=+pclmulqdq"
60
+ with:
61
+ target: ${{ matrix.platform.target }}
62
+ args: --release --out dist --find-interpreter
63
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
64
+ manylinux: musllinux_1_2
65
+ - name: Upload wheels
66
+ uses: actions/upload-artifact@v4
67
+ with:
68
+ name: wheels-musllinux-${{ matrix.platform.target }}
69
+ path: dist
70
+
71
+ windows:
72
+ runs-on: ${{ matrix.platform.runner }}
73
+ strategy:
74
+ matrix:
75
+ platform:
76
+ - runner: windows-latest
77
+ target: x64
78
+ steps:
79
+ - uses: actions/checkout@v4
80
+ - uses: actions/setup-python@v5
81
+ with:
82
+ python-version: 3.x
83
+ architecture: ${{ matrix.platform.target }}
84
+ - name: Build wheels
85
+ uses: PyO3/maturin-action@v1
86
+ env:
87
+ RUSTFLAGS: "-C target-feature=+sse4.2 -C target-feature=+avx2 -C target-feature=+pclmulqdq"
88
+ with:
89
+ target: ${{ matrix.platform.target }}
90
+ args: --release --out dist --find-interpreter
91
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
92
+ - name: Upload wheels
93
+ uses: actions/upload-artifact@v4
94
+ with:
95
+ name: wheels-windows-${{ matrix.platform.target }}
96
+ path: dist
97
+
98
+ macos:
99
+ runs-on: ${{ matrix.platform.runner }}
100
+ strategy:
101
+ matrix:
102
+ platform:
103
+ - runner: macos-latest
104
+ target: aarch64
105
+ steps:
106
+ - uses: actions/checkout@v4
107
+ - uses: actions/setup-python@v5
108
+ with:
109
+ python-version: 3.x
110
+ - name: Build wheels
111
+ uses: PyO3/maturin-action@v1
112
+ with:
113
+ target: ${{ matrix.platform.target }}
114
+ args: --release --out dist --find-interpreter
115
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
116
+ - name: Upload wheels
117
+ uses: actions/upload-artifact@v4
118
+ with:
119
+ name: wheels-macos-${{ matrix.platform.target }}
120
+ path: dist
121
+
122
+ sdist:
123
+ runs-on: ubuntu-latest
124
+ steps:
125
+ - uses: actions/checkout@v4
126
+ - name: Build sdist
127
+ uses: PyO3/maturin-action@v1
128
+ with:
129
+ command: sdist
130
+ args: --out dist
131
+ - name: Upload sdist
132
+ uses: actions/upload-artifact@v4
133
+ with:
134
+ name: wheels-sdist
135
+ path: dist
136
+
137
+ release:
138
+ name: Release
139
+ runs-on: ubuntu-latest
140
+ if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
141
+ needs: [linux, musllinux, windows, macos, sdist]
142
+ permissions:
143
+ # Use to sign the release artifacts
144
+ id-token: write
145
+ # Used to upload release artifacts
146
+ contents: write
147
+ steps:
148
+ - name: Download wheels
149
+ uses: actions/download-artifact@v7
150
+ with:
151
+ path: ./dist
152
+ merge-multiple: true
153
+ - name: upload release to PyPI
154
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,77 @@
1
+ /target
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ .pytest_cache/
6
+ *.py[cod]
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ .venv/
14
+ env/
15
+ bin/
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ include/
26
+ man/
27
+ venv/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+
32
+ # Installer logs
33
+ pip-log.txt
34
+ pip-delete-this-directory.txt
35
+ pip-selfcheck.json
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .coverage
41
+ .cache
42
+ nosetests.xml
43
+ coverage.xml
44
+
45
+ # Translations
46
+ *.mo
47
+
48
+ # Mr Developer
49
+ .mr.developer.cfg
50
+ .project
51
+ .pydevproject
52
+
53
+ # Rope
54
+ .ropeproject
55
+
56
+ # Django stuff:
57
+ *.log
58
+ *.pot
59
+
60
+ .DS_Store
61
+
62
+ # Sphinx documentation
63
+ docs/_build/
64
+
65
+ # PyCharm
66
+ .idea/
67
+
68
+ # VSCode
69
+ .vscode/
70
+
71
+ # Pyenv
72
+ .python-version
73
+
74
+ uv.lock
75
+ dataPerformance.*
76
+
77
+ .cargo/
@@ -0,0 +1,371 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "alpha"
7
+ version = "0.1.0"
8
+ dependencies = [
9
+ "anyhow",
10
+ "log",
11
+ "num-traits",
12
+ "numpy",
13
+ "pyo3",
14
+ "pyo3-log",
15
+ "rayon",
16
+ "thiserror",
17
+ ]
18
+
19
+ [[package]]
20
+ name = "anyhow"
21
+ version = "1.0.100"
22
+ source = "registry+https://github.com/rust-lang/crates.io-index"
23
+ checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
24
+
25
+ [[package]]
26
+ name = "arc-swap"
27
+ version = "1.8.0"
28
+ source = "registry+https://github.com/rust-lang/crates.io-index"
29
+ checksum = "51d03449bb8ca2cc2ef70869af31463d1ae5ccc8fa3e334b307203fbf815207e"
30
+ dependencies = [
31
+ "rustversion",
32
+ ]
33
+
34
+ [[package]]
35
+ name = "autocfg"
36
+ version = "1.5.0"
37
+ source = "registry+https://github.com/rust-lang/crates.io-index"
38
+ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
39
+
40
+ [[package]]
41
+ name = "crossbeam-deque"
42
+ version = "0.8.6"
43
+ source = "registry+https://github.com/rust-lang/crates.io-index"
44
+ checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
45
+ dependencies = [
46
+ "crossbeam-epoch",
47
+ "crossbeam-utils",
48
+ ]
49
+
50
+ [[package]]
51
+ name = "crossbeam-epoch"
52
+ version = "0.9.18"
53
+ source = "registry+https://github.com/rust-lang/crates.io-index"
54
+ checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
55
+ dependencies = [
56
+ "crossbeam-utils",
57
+ ]
58
+
59
+ [[package]]
60
+ name = "crossbeam-utils"
61
+ version = "0.8.21"
62
+ source = "registry+https://github.com/rust-lang/crates.io-index"
63
+ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
64
+
65
+ [[package]]
66
+ name = "either"
67
+ version = "1.15.0"
68
+ source = "registry+https://github.com/rust-lang/crates.io-index"
69
+ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
70
+
71
+ [[package]]
72
+ name = "heck"
73
+ version = "0.5.0"
74
+ source = "registry+https://github.com/rust-lang/crates.io-index"
75
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
76
+
77
+ [[package]]
78
+ name = "indoc"
79
+ version = "2.0.7"
80
+ source = "registry+https://github.com/rust-lang/crates.io-index"
81
+ checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
82
+ dependencies = [
83
+ "rustversion",
84
+ ]
85
+
86
+ [[package]]
87
+ name = "libc"
88
+ version = "0.2.180"
89
+ source = "registry+https://github.com/rust-lang/crates.io-index"
90
+ checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc"
91
+
92
+ [[package]]
93
+ name = "log"
94
+ version = "0.4.29"
95
+ source = "registry+https://github.com/rust-lang/crates.io-index"
96
+ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
97
+
98
+ [[package]]
99
+ name = "matrixmultiply"
100
+ version = "0.3.10"
101
+ source = "registry+https://github.com/rust-lang/crates.io-index"
102
+ checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08"
103
+ dependencies = [
104
+ "autocfg",
105
+ "rawpointer",
106
+ ]
107
+
108
+ [[package]]
109
+ name = "memoffset"
110
+ version = "0.9.1"
111
+ source = "registry+https://github.com/rust-lang/crates.io-index"
112
+ checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
113
+ dependencies = [
114
+ "autocfg",
115
+ ]
116
+
117
+ [[package]]
118
+ name = "ndarray"
119
+ version = "0.17.2"
120
+ source = "registry+https://github.com/rust-lang/crates.io-index"
121
+ checksum = "520080814a7a6b4a6e9070823bb24b4531daac8c4627e08ba5de8c5ef2f2752d"
122
+ dependencies = [
123
+ "matrixmultiply",
124
+ "num-complex",
125
+ "num-integer",
126
+ "num-traits",
127
+ "portable-atomic",
128
+ "portable-atomic-util",
129
+ "rawpointer",
130
+ ]
131
+
132
+ [[package]]
133
+ name = "num-complex"
134
+ version = "0.4.6"
135
+ source = "registry+https://github.com/rust-lang/crates.io-index"
136
+ checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
137
+ dependencies = [
138
+ "num-traits",
139
+ ]
140
+
141
+ [[package]]
142
+ name = "num-integer"
143
+ version = "0.1.46"
144
+ source = "registry+https://github.com/rust-lang/crates.io-index"
145
+ checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
146
+ dependencies = [
147
+ "num-traits",
148
+ ]
149
+
150
+ [[package]]
151
+ name = "num-traits"
152
+ version = "0.2.19"
153
+ source = "registry+https://github.com/rust-lang/crates.io-index"
154
+ checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
155
+ dependencies = [
156
+ "autocfg",
157
+ ]
158
+
159
+ [[package]]
160
+ name = "numpy"
161
+ version = "0.27.1"
162
+ source = "registry+https://github.com/rust-lang/crates.io-index"
163
+ checksum = "7aac2e6a6e4468ffa092ad43c39b81c79196c2bb773b8db4085f695efe3bba17"
164
+ dependencies = [
165
+ "libc",
166
+ "ndarray",
167
+ "num-complex",
168
+ "num-integer",
169
+ "num-traits",
170
+ "pyo3",
171
+ "pyo3-build-config",
172
+ "rustc-hash",
173
+ ]
174
+
175
+ [[package]]
176
+ name = "once_cell"
177
+ version = "1.21.3"
178
+ source = "registry+https://github.com/rust-lang/crates.io-index"
179
+ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
180
+
181
+ [[package]]
182
+ name = "portable-atomic"
183
+ version = "1.13.0"
184
+ source = "registry+https://github.com/rust-lang/crates.io-index"
185
+ checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950"
186
+
187
+ [[package]]
188
+ name = "portable-atomic-util"
189
+ version = "0.2.4"
190
+ source = "registry+https://github.com/rust-lang/crates.io-index"
191
+ checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507"
192
+ dependencies = [
193
+ "portable-atomic",
194
+ ]
195
+
196
+ [[package]]
197
+ name = "proc-macro2"
198
+ version = "1.0.105"
199
+ source = "registry+https://github.com/rust-lang/crates.io-index"
200
+ checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7"
201
+ dependencies = [
202
+ "unicode-ident",
203
+ ]
204
+
205
+ [[package]]
206
+ name = "pyo3"
207
+ version = "0.27.2"
208
+ source = "registry+https://github.com/rust-lang/crates.io-index"
209
+ checksum = "ab53c047fcd1a1d2a8820fe84f05d6be69e9526be40cb03b73f86b6b03e6d87d"
210
+ dependencies = [
211
+ "indoc",
212
+ "libc",
213
+ "memoffset",
214
+ "once_cell",
215
+ "portable-atomic",
216
+ "pyo3-build-config",
217
+ "pyo3-ffi",
218
+ "pyo3-macros",
219
+ "unindent",
220
+ ]
221
+
222
+ [[package]]
223
+ name = "pyo3-build-config"
224
+ version = "0.27.2"
225
+ source = "registry+https://github.com/rust-lang/crates.io-index"
226
+ checksum = "b455933107de8642b4487ed26d912c2d899dec6114884214a0b3bb3be9261ea6"
227
+ dependencies = [
228
+ "target-lexicon",
229
+ ]
230
+
231
+ [[package]]
232
+ name = "pyo3-ffi"
233
+ version = "0.27.2"
234
+ source = "registry+https://github.com/rust-lang/crates.io-index"
235
+ checksum = "1c85c9cbfaddf651b1221594209aed57e9e5cff63c4d11d1feead529b872a089"
236
+ dependencies = [
237
+ "libc",
238
+ "pyo3-build-config",
239
+ ]
240
+
241
+ [[package]]
242
+ name = "pyo3-log"
243
+ version = "0.13.2"
244
+ source = "registry+https://github.com/rust-lang/crates.io-index"
245
+ checksum = "2f8bae9ad5ba08b0b0ed2bb9c2bdbaeccc69cafca96d78cf0fbcea0d45d122bb"
246
+ dependencies = [
247
+ "arc-swap",
248
+ "log",
249
+ "pyo3",
250
+ ]
251
+
252
+ [[package]]
253
+ name = "pyo3-macros"
254
+ version = "0.27.2"
255
+ source = "registry+https://github.com/rust-lang/crates.io-index"
256
+ checksum = "0a5b10c9bf9888125d917fb4d2ca2d25c8df94c7ab5a52e13313a07e050a3b02"
257
+ dependencies = [
258
+ "proc-macro2",
259
+ "pyo3-macros-backend",
260
+ "quote",
261
+ "syn",
262
+ ]
263
+
264
+ [[package]]
265
+ name = "pyo3-macros-backend"
266
+ version = "0.27.2"
267
+ source = "registry+https://github.com/rust-lang/crates.io-index"
268
+ checksum = "03b51720d314836e53327f5871d4c0cfb4fb37cc2c4a11cc71907a86342c40f9"
269
+ dependencies = [
270
+ "heck",
271
+ "proc-macro2",
272
+ "pyo3-build-config",
273
+ "quote",
274
+ "syn",
275
+ ]
276
+
277
+ [[package]]
278
+ name = "quote"
279
+ version = "1.0.43"
280
+ source = "registry+https://github.com/rust-lang/crates.io-index"
281
+ checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a"
282
+ dependencies = [
283
+ "proc-macro2",
284
+ ]
285
+
286
+ [[package]]
287
+ name = "rawpointer"
288
+ version = "0.2.1"
289
+ source = "registry+https://github.com/rust-lang/crates.io-index"
290
+ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
291
+
292
+ [[package]]
293
+ name = "rayon"
294
+ version = "1.11.0"
295
+ source = "registry+https://github.com/rust-lang/crates.io-index"
296
+ checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f"
297
+ dependencies = [
298
+ "either",
299
+ "rayon-core",
300
+ ]
301
+
302
+ [[package]]
303
+ name = "rayon-core"
304
+ version = "1.13.0"
305
+ source = "registry+https://github.com/rust-lang/crates.io-index"
306
+ checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
307
+ dependencies = [
308
+ "crossbeam-deque",
309
+ "crossbeam-utils",
310
+ ]
311
+
312
+ [[package]]
313
+ name = "rustc-hash"
314
+ version = "2.1.1"
315
+ source = "registry+https://github.com/rust-lang/crates.io-index"
316
+ checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
317
+
318
+ [[package]]
319
+ name = "rustversion"
320
+ version = "1.0.22"
321
+ source = "registry+https://github.com/rust-lang/crates.io-index"
322
+ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
323
+
324
+ [[package]]
325
+ name = "syn"
326
+ version = "2.0.114"
327
+ source = "registry+https://github.com/rust-lang/crates.io-index"
328
+ checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a"
329
+ dependencies = [
330
+ "proc-macro2",
331
+ "quote",
332
+ "unicode-ident",
333
+ ]
334
+
335
+ [[package]]
336
+ name = "target-lexicon"
337
+ version = "0.13.4"
338
+ source = "registry+https://github.com/rust-lang/crates.io-index"
339
+ checksum = "b1dd07eb858a2067e2f3c7155d54e929265c264e6f37efe3ee7a8d1b5a1dd0ba"
340
+
341
+ [[package]]
342
+ name = "thiserror"
343
+ version = "2.0.17"
344
+ source = "registry+https://github.com/rust-lang/crates.io-index"
345
+ checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8"
346
+ dependencies = [
347
+ "thiserror-impl",
348
+ ]
349
+
350
+ [[package]]
351
+ name = "thiserror-impl"
352
+ version = "2.0.17"
353
+ source = "registry+https://github.com/rust-lang/crates.io-index"
354
+ checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913"
355
+ dependencies = [
356
+ "proc-macro2",
357
+ "quote",
358
+ "syn",
359
+ ]
360
+
361
+ [[package]]
362
+ name = "unicode-ident"
363
+ version = "1.0.22"
364
+ source = "registry+https://github.com/rust-lang/crates.io-index"
365
+ checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
366
+
367
+ [[package]]
368
+ name = "unindent"
369
+ version = "0.2.4"
370
+ source = "registry+https://github.com/rust-lang/crates.io-index"
371
+ checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
@@ -0,0 +1,23 @@
1
+ [package]
2
+ name = "alpha"
3
+ version = "0.1.0"
4
+ edition = "2024"
5
+ readme = "README.md"
6
+
7
+ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8
+ [lib]
9
+ name = "alpha"
10
+ crate-type = ["cdylib", "rlib"]
11
+
12
+ [dependencies]
13
+ pyo3 = {version = "0.27.0", features = ["abi3"]}
14
+ pyo3-log = "0.13"
15
+ thiserror = "2"
16
+ numpy = "0.27.0"
17
+ num-traits = "0.2"
18
+ rayon = "1.11"
19
+ log = "0.4"
20
+
21
+
22
+ [build-dependencies]
23
+ anyhow = "1"
@@ -0,0 +1,22 @@
1
+ # BSD 2-Clause License
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions are met:
5
+
6
+ 1. Redistributions of source code must retain the above copyright notice,
7
+ this list of conditions and the following disclaimer.
8
+
9
+ 2. Redistributions in binary form must reproduce the above copyright notice,
10
+ this list of conditions and the following disclaimer in the documentation
11
+ and/or other materials provided with the distribution.
12
+
13
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
17
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
20
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
21
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.