perpetual 0.9.1__tar.gz → 0.9.3__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.

Potentially problematic release.


This version of perpetual might be problematic. Click here for more details.

Files changed (104) hide show
  1. {perpetual-0.9.1 → perpetual-0.9.3}/.github/workflows/CI.yml +221 -244
  2. {perpetual-0.9.1 → perpetual-0.9.3}/.github/workflows/cargo-build-publish.yml +31 -31
  3. {perpetual-0.9.1 → perpetual-0.9.3}/.github/workflows/docs.yml +30 -28
  4. perpetual-0.9.3/.github/workflows/release.yml +173 -0
  5. {perpetual-0.9.1 → perpetual-0.9.3}/.gitignore +11 -11
  6. {perpetual-0.9.1 → perpetual-0.9.3}/.pre-commit-config.yaml +19 -19
  7. {perpetual-0.9.1 → perpetual-0.9.3}/CONTRIBUTING.md +110 -110
  8. {perpetual-0.9.1 → perpetual-0.9.3}/Cargo.toml +2 -2
  9. {perpetual-0.9.1 → perpetual-0.9.3}/LICENSE +673 -673
  10. {perpetual-0.9.1 → perpetual-0.9.3}/PKG-INFO +131 -130
  11. {perpetual-0.9.1/python-package → perpetual-0.9.3}/README.md +130 -129
  12. {perpetual-0.9.1 → perpetual-0.9.3}/benches/perpetual_benchmarks.rs +168 -168
  13. {perpetual-0.9.1 → perpetual-0.9.3}/examples/cal_housing.rs +150 -150
  14. {perpetual-0.9.1 → perpetual-0.9.3}/examples/cover_types.rs +182 -182
  15. {perpetual-0.9.1 → perpetual-0.9.3}/examples/titanic.rs +61 -61
  16. {perpetual-0.9.1 → perpetual-0.9.3}/pyproject.toml +3 -3
  17. {perpetual-0.9.1 → perpetual-0.9.3}/python/perpetual/__init__.py +6 -6
  18. {perpetual-0.9.1 → perpetual-0.9.3}/python/perpetual/booster.py +1066 -1064
  19. {perpetual-0.9.1 → perpetual-0.9.3}/python/perpetual/data.py +25 -25
  20. {perpetual-0.9.1/python-package → perpetual-0.9.3}/python/perpetual/serialize.py +74 -74
  21. {perpetual-0.9.1 → perpetual-0.9.3}/python/perpetual/types.py +150 -150
  22. {perpetual-0.9.1/python-package → perpetual-0.9.3}/python/perpetual/utils.py +217 -217
  23. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/.gitignore +71 -71
  24. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/Cargo.lock +52 -46
  25. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/Cargo.toml +5 -5
  26. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/LICENSE +673 -673
  27. {perpetual-0.9.1 → perpetual-0.9.3/python-package}/README.md +130 -129
  28. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/docs/index.md +39 -39
  29. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/examples/benchmark_lgbm.py +134 -134
  30. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/examples/benchmark_perpetual.py +63 -63
  31. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/examples/categorical_data.ipynb +398 -398
  32. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/examples/categorical_data_diamonds.ipynb +392 -392
  33. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/examples/categorical_data_titanic.ipynb +286 -286
  34. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/examples/fetch_openml.ipynb +101 -101
  35. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/examples/lgbm_openml_sensory.ipynb +141 -141
  36. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/examples/openml.ipynb +178 -178
  37. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/examples/openml_mnist.ipynb +86 -86
  38. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/examples/performance_benchmark.ipynb +339 -339
  39. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/examples/santander.ipynb +197 -197
  40. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/examples/toy_datasets.ipynb +101 -101
  41. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/mkdocs.yml +47 -47
  42. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/python/perpetual/__init__.py +6 -6
  43. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/python/perpetual/booster.py +1066 -1064
  44. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/python/perpetual/data.py +25 -25
  45. {perpetual-0.9.1 → perpetual-0.9.3/python-package}/python/perpetual/serialize.py +74 -74
  46. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/python/perpetual/types.py +150 -150
  47. {perpetual-0.9.1 → perpetual-0.9.3/python-package}/python/perpetual/utils.py +217 -217
  48. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/src/booster.rs +503 -503
  49. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/src/lib.rs +22 -22
  50. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/src/multi_output.rs +428 -428
  51. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/src/utils.rs +53 -53
  52. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/tests/test_booster.py +724 -724
  53. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/tests/test_multi_output.py +22 -22
  54. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/tests/test_save_load.py +186 -186
  55. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/tests/test_serialize.py +63 -63
  56. {perpetual-0.9.1 → perpetual-0.9.3}/python-package/uv.lock +1980 -1980
  57. {perpetual-0.9.1 → perpetual-0.9.3}/rust-toolchain +1 -1
  58. {perpetual-0.9.1 → perpetual-0.9.3}/scripts/make_resources.py +102 -102
  59. {perpetual-0.9.1 → perpetual-0.9.3}/scripts/remove-optional-deps.py +18 -18
  60. {perpetual-0.9.1 → perpetual-0.9.3}/scripts/run-python-tests.ps1 +6 -6
  61. {perpetual-0.9.1 → perpetual-0.9.3}/scripts/run-python-tests.sh +6 -6
  62. {perpetual-0.9.1 → perpetual-0.9.3}/scripts/run-single-python-test.ps1 +6 -6
  63. {perpetual-0.9.1 → perpetual-0.9.3}/scripts/uv_script.ps1 +6 -6
  64. {perpetual-0.9.1 → perpetual-0.9.3}/scripts/uv_script.sh +6 -6
  65. {perpetual-0.9.1 → perpetual-0.9.3}/src/bin.rs +158 -158
  66. {perpetual-0.9.1 → perpetual-0.9.3}/src/binning.rs +237 -237
  67. {perpetual-0.9.1 → perpetual-0.9.3}/src/booster/booster.rs +1256 -1098
  68. {perpetual-0.9.1 → perpetual-0.9.3}/src/booster/mod.rs +4 -4
  69. {perpetual-0.9.1 → perpetual-0.9.3}/src/booster/multi_output.rs +758 -758
  70. {perpetual-0.9.1 → perpetual-0.9.3}/src/booster/predict.rs +213 -213
  71. {perpetual-0.9.1 → perpetual-0.9.3}/src/booster/setters.rs +168 -168
  72. {perpetual-0.9.1 → perpetual-0.9.3}/src/conformal/cqr.rs +178 -178
  73. {perpetual-0.9.1 → perpetual-0.9.3}/src/conformal/mod.rs +1 -1
  74. {perpetual-0.9.1 → perpetual-0.9.3}/src/constants.rs +9 -9
  75. {perpetual-0.9.1 → perpetual-0.9.3}/src/constraints.rs +11 -11
  76. {perpetual-0.9.1 → perpetual-0.9.3}/src/data.rs +381 -381
  77. {perpetual-0.9.1 → perpetual-0.9.3}/src/errors.rs +18 -18
  78. {perpetual-0.9.1 → perpetual-0.9.3}/src/grower.rs +46 -46
  79. {perpetual-0.9.1 → perpetual-0.9.3}/src/histogram.rs +567 -567
  80. {perpetual-0.9.1 → perpetual-0.9.3}/src/lib.rs +29 -29
  81. perpetual-0.9.3/src/metrics/classification/metrics.rs +75 -0
  82. perpetual-0.9.3/src/metrics/classification/mod.rs +2 -0
  83. perpetual-0.9.1/src/metric.rs → perpetual-0.9.3/src/metrics/mod.rs +179 -314
  84. perpetual-0.9.3/src/metrics/regression/metrics.rs +76 -0
  85. perpetual-0.9.3/src/metrics/regression/mod.rs +2 -0
  86. {perpetual-0.9.1 → perpetual-0.9.3}/src/node.rs +287 -287
  87. perpetual-0.9.3/src/objective_functions/adaptive_huber_loss.rs +140 -0
  88. perpetual-0.9.3/src/objective_functions/huber_loss.rs +115 -0
  89. perpetual-0.9.3/src/objective_functions/log_loss.rs +87 -0
  90. perpetual-0.9.3/src/objective_functions/mod.rs +165 -0
  91. perpetual-0.9.3/src/objective_functions/quantile_loss.rs +121 -0
  92. perpetual-0.9.3/src/objective_functions/squared_loss.rs +73 -0
  93. {perpetual-0.9.1 → perpetual-0.9.3}/src/partial_dependence.rs +151 -151
  94. {perpetual-0.9.1 → perpetual-0.9.3}/src/prune.rs +381 -381
  95. {perpetual-0.9.1 → perpetual-0.9.3}/src/sampler.rs +43 -43
  96. {perpetual-0.9.1 → perpetual-0.9.3}/src/shapley.rs +221 -221
  97. {perpetual-0.9.1 → perpetual-0.9.3}/src/splitter.rs +2256 -2256
  98. {perpetual-0.9.1 → perpetual-0.9.3}/src/tree/mod.rs +2 -2
  99. {perpetual-0.9.1 → perpetual-0.9.3}/src/tree/predict.rs +292 -292
  100. {perpetual-0.9.1 → perpetual-0.9.3}/src/tree/tree.rs +833 -833
  101. {perpetual-0.9.1 → perpetual-0.9.3}/src/utils.rs +1354 -1354
  102. perpetual-0.9.1/src/objective.rs +0 -400
  103. {perpetual-0.9.1 → perpetual-0.9.3}/resources/perp_logo.png +0 -0
  104. {perpetual-0.9.1 → perpetual-0.9.3}/rustfmt.toml +0 -0
@@ -1,244 +1,221 @@
1
- name: Test and Deploy
2
- on: [pull_request]
3
-
4
- jobs:
5
- windows-build-test:
6
- strategy:
7
- matrix:
8
- pyversion: ["3.9", "3.10", "3.11", "3.12", "3.13"]
9
- runs-on: "windows-latest"
10
- steps:
11
- - uses: actions/checkout@v4
12
- - name: Install latests stable Rust
13
- uses: dtolnay/rust-toolchain@stable
14
- with:
15
- toolchain: stable
16
- - uses: actions/setup-python@v5
17
- with:
18
- python-version: ${{ matrix.pyversion }}
19
- architecture: x64
20
- - name: Install deps
21
- run: pip install numpy pandas seaborn scikit-learn toml
22
- - run: |
23
- cp README.md python-package/README.md
24
- cp LICENSE python-package/LICENSE
25
- - name: Build test data
26
- run: |
27
- cd python-package
28
- python -m pip install -e .[dev]
29
- cd ..
30
- python scripts/make_resources.py
31
- - name: Build wheels with maturin
32
- uses: PyO3/maturin-action@v1
33
- with:
34
- target: x86_64
35
- command: build
36
- args: --release --strip --interpreter python --manifest-path python-package/Cargo.toml --out dist --sdist
37
- - name: Install wheel
38
- run: pip install perpetual --no-index --find-links dist --no-deps --force-reinstall
39
- - name: Run Package Tests
40
- run: |
41
- pip install pytest pytest-cov black ruff setuptools --upgrade
42
- cd python-package
43
- ruff check .
44
- black --check .
45
- pytest --cov-fail-under=90 tests
46
- cd ..
47
- - name: Save Artifacts
48
- uses: actions/upload-artifact@v4
49
- with:
50
- name: dist-windows-${{ matrix.pyversion }}
51
- path: dist
52
-
53
- macos-build-test:
54
- strategy:
55
- matrix:
56
- pyversion: ["3.11", "3.12", "3.13"]
57
- os: [macos-latest, macos-latest-large]
58
- runs-on: ${{ matrix.os }}
59
- steps:
60
- - uses: actions/checkout@v4
61
- - name: Install latest stable Rust
62
- uses: dtolnay/rust-toolchain@stable
63
- with:
64
- toolchain: stable
65
- - uses: actions/setup-python@v5
66
- with:
67
- python-version: ${{ matrix.pyversion }}
68
- - name: Install deps
69
- run: pip install numpy pandas seaborn scikit-learn toml
70
- - run: |
71
- cp README.md python-package/README.md
72
- cp LICENSE python-package/LICENSE
73
- - name: Build test data
74
- run: |
75
- cd python-package
76
- python -m pip install -e .[dev]
77
- cd ..
78
- python scripts/make_resources.py
79
- - name: Build wheels with maturin
80
- uses: PyO3/maturin-action@v1
81
- with:
82
- command: build
83
- args: --release --strip --interpreter python --manifest-path python-package/Cargo.toml --out dist --sdist
84
- - name: Install wheel
85
- run: pip install perpetual --no-index --find-links dist --no-deps --force-reinstall
86
- - name: Run Package Tests
87
- run: |
88
- pip install pytest pytest-cov black ruff setuptools --upgrade
89
- cd python-package
90
- ruff check .
91
- black --check .
92
- pytest --cov-fail-under=90 tests
93
- cd ..
94
- - name: Save Artifacts
95
- uses: actions/upload-artifact@v4
96
- with:
97
- name: dist-${{ matrix.os }}-${{ matrix.pyversion }}
98
- path: dist
99
-
100
- linux-build-test:
101
- runs-on: ubuntu-latest
102
- strategy:
103
- matrix:
104
- pyversion: ["3.9", "3.10", "3.11", "3.12", "3.13"]
105
- steps:
106
- - uses: actions/checkout@v4
107
- - name: Install latests stable Rust
108
- uses: dtolnay/rust-toolchain@stable
109
- with:
110
- toolchain: stable
111
- - uses: actions/setup-python@v5
112
- with:
113
- python-version: ${{ matrix.pyversion }}
114
- architecture: x64
115
- - name: Install deps
116
- run: pip install numpy pandas seaborn scikit-learn toml
117
- - run: |
118
- cp README.md python-package/README.md
119
- cp LICENSE python-package/LICENSE
120
- - name: Build test data
121
- run: |
122
- cd python-package
123
- python -m pip install -e .[dev]
124
- cd ..
125
- python scripts/make_resources.py
126
- - name: Build wheels with maturin
127
- uses: PyO3/maturin-action@v1
128
- with:
129
- target: x86_64
130
- manylinux: auto
131
- command: build
132
- args: --release --strip --interpreter python${{ matrix.pyversion }} --manifest-path python-package/Cargo.toml --out dist --sdist
133
- - name: Install wheel
134
- run: pip install perpetual --no-index --find-links dist --no-deps --force-reinstall
135
- - name: Run Package Tests
136
- run: |
137
- pip install pytest pytest-cov black ruff setuptools --upgrade
138
- cd python-package
139
- ruff check .
140
- black --check .
141
- pytest --cov-fail-under=90 tests
142
- cd ..
143
- - name: Save Artifacts
144
- uses: actions/upload-artifact@v4
145
- with:
146
- name: dist-linux-${{ matrix.pyversion }}
147
- path: dist
148
-
149
- linux-arm-build-test:
150
- runs-on: ubuntu-24.04-arm
151
- strategy:
152
- matrix:
153
- pyversion: ["3.9", "3.10", "3.11", "3.12", "3.13"]
154
- steps:
155
- - uses: actions/checkout@v4
156
- - name: Install latests stable Rust
157
- uses: dtolnay/rust-toolchain@stable
158
- with:
159
- toolchain: stable
160
- - uses: actions/setup-python@v5
161
- with:
162
- python-version: ${{ matrix.pyversion }}
163
- architecture: arm64
164
- - name: Install deps
165
- run: pip install numpy pandas seaborn scikit-learn toml
166
- - run: |
167
- cp README.md python-package/README.md
168
- cp LICENSE python-package/LICENSE
169
- - name: Build test data
170
- run: |
171
- cd python-package
172
- python -m pip install -e .[dev]
173
- cd ..
174
- python scripts/make_resources.py
175
- - name: Build wheels with maturin
176
- uses: PyO3/maturin-action@v1
177
- with:
178
- manylinux: auto
179
- command: build
180
- args: --release --strip --interpreter python${{ matrix.pyversion }} --manifest-path python-package/Cargo.toml --out dist --sdist
181
- - name: Install wheel
182
- run: pip install perpetual --no-index --find-links dist --no-deps --force-reinstall
183
- - name: Run Package Tests
184
- run: |
185
- pip install pytest pytest-cov black ruff setuptools --upgrade
186
- cd python-package
187
- ruff check .
188
- black --check .
189
- pytest --cov-fail-under=90 tests
190
- cd ..
191
- - name: Save Artifacts
192
- uses: actions/upload-artifact@v4
193
- with:
194
- name: dist-linux-arm-${{ matrix.pyversion }}
195
- path: dist
196
-
197
- cargo-build-test:
198
- runs-on: ubuntu-latest
199
- needs: ["linux-build-test"]
200
- steps:
201
- - uses: actions/checkout@v4
202
- - name: Install latest stable Rust
203
- uses: dtolnay/rust-toolchain@stable
204
- with:
205
- toolchain: stable
206
- - uses: actions/setup-python@v5
207
- with:
208
- python-version: "3.11"
209
- architecture: x64
210
- - name: Install deps
211
- run: pip install numpy pandas seaborn scikit-learn toml
212
- - run: |
213
- cp README.md python-package/README.md
214
- cp LICENSE python-package/LICENSE
215
- - name: Build test data
216
- run: |
217
- cd python-package
218
- python -m pip install -e .[dev]
219
- cd ..
220
- python scripts/make_resources.py
221
- - name: Run tests
222
- run: cargo test --verbose
223
- - name: Publish Crate
224
- run: cargo publish --token ${CRATES_TOKEN} --allow-dirty
225
- env:
226
- CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
227
-
228
- pypi-publish:
229
- runs-on: ubuntu-latest
230
- needs: ["windows-build-test", "macos-build-test", "linux-build-test"]
231
- environment:
232
- name: Test and Deploy
233
- url: https://pypi.org/p/perpetual
234
- permissions:
235
- id-token: write
236
- steps:
237
- - name: Retrieve release distributions
238
- uses: actions/download-artifact@v4
239
- with:
240
- pattern: dist-*
241
- merge-multiple: true
242
- path: dist
243
- - name: Publish release distributions to PyPI
244
- uses: pypa/gh-action-pypi-publish@release/v1
1
+ name: Test and Deploy
2
+ on: [pull_request]
3
+
4
+ jobs:
5
+ windows-build-test:
6
+ strategy:
7
+ matrix:
8
+ pyversion: ["3.9", "3.10", "3.11", "3.12", "3.13"]
9
+ runs-on: "windows-latest"
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - name: Install latests stable Rust
13
+ uses: dtolnay/rust-toolchain@stable
14
+ with:
15
+ toolchain: stable
16
+ - uses: actions/setup-python@v5
17
+ with:
18
+ python-version: ${{ matrix.pyversion }}
19
+ architecture: x64
20
+ - name: Install deps
21
+ run: pip install numpy pandas seaborn scikit-learn toml
22
+ - run: |
23
+ cp README.md python-package/README.md
24
+ cp LICENSE python-package/LICENSE
25
+ - name: Build test data
26
+ run: |
27
+ cd python-package
28
+ python -m pip install -e .[dev]
29
+ cd ..
30
+ python scripts/make_resources.py
31
+ - name: Build wheels with maturin
32
+ uses: PyO3/maturin-action@v1
33
+ with:
34
+ target: x86_64
35
+ command: build
36
+ args: --release --strip --interpreter python --manifest-path python-package/Cargo.toml --out dist --sdist
37
+ - name: Install wheel
38
+ run: pip install perpetual --no-index --find-links dist --no-deps --force-reinstall
39
+ - name: Run Package Tests
40
+ run: |
41
+ pip install pytest pytest-cov black ruff setuptools --upgrade
42
+ cd python-package
43
+ ruff check .
44
+ black --check .
45
+ pytest --cov-fail-under=90 tests
46
+ cd ..
47
+ - name: Save Artifacts
48
+ uses: actions/upload-artifact@v4
49
+ with:
50
+ name: dist-windows-${{ matrix.pyversion }}
51
+ path: dist
52
+
53
+ macos-build-test:
54
+ strategy:
55
+ matrix:
56
+ pyversion: ["3.11", "3.12", "3.13"]
57
+ os: [macos-latest, macos-latest-large]
58
+ runs-on: ${{ matrix.os }}
59
+ steps:
60
+ - uses: actions/checkout@v4
61
+ - name: Install latest stable Rust
62
+ uses: dtolnay/rust-toolchain@stable
63
+ with:
64
+ toolchain: stable
65
+ - uses: actions/setup-python@v5
66
+ with:
67
+ python-version: ${{ matrix.pyversion }}
68
+ - name: Install deps
69
+ run: pip install numpy pandas seaborn scikit-learn toml
70
+ - run: |
71
+ cp README.md python-package/README.md
72
+ cp LICENSE python-package/LICENSE
73
+ - name: Build test data
74
+ run: |
75
+ cd python-package
76
+ python -m pip install -e .[dev]
77
+ cd ..
78
+ python scripts/make_resources.py
79
+ - name: Build wheels with maturin
80
+ uses: PyO3/maturin-action@v1
81
+ with:
82
+ command: build
83
+ args: --release --strip --interpreter python --manifest-path python-package/Cargo.toml --out dist --sdist
84
+ - name: Install wheel
85
+ run: pip install perpetual --no-index --find-links dist --no-deps --force-reinstall
86
+ - name: Run Package Tests
87
+ run: |
88
+ pip install pytest pytest-cov black ruff setuptools --upgrade
89
+ cd python-package
90
+ ruff check .
91
+ black --check .
92
+ pytest --cov-fail-under=90 tests
93
+ cd ..
94
+ - name: Save Artifacts
95
+ uses: actions/upload-artifact@v4
96
+ with:
97
+ name: dist-${{ matrix.os }}-${{ matrix.pyversion }}
98
+ path: dist
99
+
100
+ linux-build-test:
101
+ runs-on: ubuntu-latest
102
+ strategy:
103
+ matrix:
104
+ pyversion: ["3.9", "3.10", "3.11", "3.12", "3.13"]
105
+ steps:
106
+ - uses: actions/checkout@v4
107
+ - name: Install latests stable Rust
108
+ uses: dtolnay/rust-toolchain@stable
109
+ with:
110
+ toolchain: stable
111
+ - uses: actions/setup-python@v5
112
+ with:
113
+ python-version: ${{ matrix.pyversion }}
114
+ architecture: x64
115
+ - name: Install deps
116
+ run: pip install numpy pandas seaborn scikit-learn toml
117
+ - run: |
118
+ cp README.md python-package/README.md
119
+ cp LICENSE python-package/LICENSE
120
+ - name: Build test data
121
+ run: |
122
+ cd python-package
123
+ python -m pip install -e .[dev]
124
+ cd ..
125
+ python scripts/make_resources.py
126
+ - name: Build wheels with maturin
127
+ uses: PyO3/maturin-action@v1
128
+ with:
129
+ target: x86_64
130
+ manylinux: auto
131
+ command: build
132
+ args: --release --strip --interpreter python${{ matrix.pyversion }} --manifest-path python-package/Cargo.toml --out dist --sdist
133
+ - name: Install wheel
134
+ run: pip install perpetual --no-index --find-links dist --no-deps --force-reinstall
135
+ - name: Run Package Tests
136
+ run: |
137
+ pip install pytest pytest-cov black ruff setuptools --upgrade
138
+ cd python-package
139
+ ruff check .
140
+ black --check .
141
+ pytest --cov-fail-under=90 tests
142
+ cd ..
143
+ - name: Save Artifacts
144
+ uses: actions/upload-artifact@v4
145
+ with:
146
+ name: dist-linux-${{ matrix.pyversion }}
147
+ path: dist
148
+
149
+ linux-arm-build-test:
150
+ runs-on: ubuntu-24.04-arm
151
+ strategy:
152
+ matrix:
153
+ pyversion: ["3.9", "3.10", "3.11", "3.12", "3.13"]
154
+ steps:
155
+ - uses: actions/checkout@v4
156
+ - name: Install latests stable Rust
157
+ uses: dtolnay/rust-toolchain@stable
158
+ with:
159
+ toolchain: stable
160
+ - uses: actions/setup-python@v5
161
+ with:
162
+ python-version: ${{ matrix.pyversion }}
163
+ architecture: arm64
164
+ - name: Install deps
165
+ run: pip install numpy pandas seaborn scikit-learn toml
166
+ - run: |
167
+ cp README.md python-package/README.md
168
+ cp LICENSE python-package/LICENSE
169
+ - name: Build test data
170
+ run: |
171
+ cd python-package
172
+ python -m pip install -e .[dev]
173
+ cd ..
174
+ python scripts/make_resources.py
175
+ - name: Build wheels with maturin
176
+ uses: PyO3/maturin-action@v1
177
+ with:
178
+ manylinux: auto
179
+ command: build
180
+ args: --release --strip --interpreter python${{ matrix.pyversion }} --manifest-path python-package/Cargo.toml --out dist --sdist
181
+ - name: Install wheel
182
+ run: pip install perpetual --no-index --find-links dist --no-deps --force-reinstall
183
+ - name: Run Package Tests
184
+ run: |
185
+ pip install pytest pytest-cov black ruff setuptools --upgrade
186
+ cd python-package
187
+ ruff check .
188
+ black --check .
189
+ pytest --cov-fail-under=90 tests
190
+ cd ..
191
+ - name: Save Artifacts
192
+ uses: actions/upload-artifact@v4
193
+ with:
194
+ name: dist-linux-arm-${{ matrix.pyversion }}
195
+ path: dist
196
+
197
+ cargo-build-test:
198
+ runs-on: ubuntu-latest
199
+ steps:
200
+ - uses: actions/checkout@v4
201
+ - name: Install latest stable Rust
202
+ uses: dtolnay/rust-toolchain@stable
203
+ with:
204
+ toolchain: stable
205
+ - uses: actions/setup-python@v5
206
+ with:
207
+ python-version: "3.11"
208
+ architecture: x64
209
+ - name: Install deps
210
+ run: pip install numpy pandas seaborn scikit-learn toml
211
+ - run: |
212
+ cp README.md python-package/README.md
213
+ cp LICENSE python-package/LICENSE
214
+ - name: Build test data
215
+ run: |
216
+ cd python-package
217
+ python -m pip install -e .[dev]
218
+ cd ..
219
+ python scripts/make_resources.py
220
+ - name: Run tests
221
+ run: cargo test --verbose
@@ -1,31 +1,31 @@
1
- name: Cargo Build Publish
2
- on: [workflow_dispatch]
3
-
4
- jobs:
5
- cargo-build-test:
6
- runs-on: ubuntu-latest
7
- steps:
8
- - uses: actions/checkout@v3
9
- - name: Install latests stable Rust
10
- uses: dtolnay/rust-toolchain@stable
11
- with:
12
- toolchain: stable
13
- - uses: actions/setup-python@v4
14
- with:
15
- python-version: "3.10"
16
- architecture: x64
17
- - name: Install deps
18
- run: pip install numpy pandas seaborn scikit-learn toml
19
- - run: |
20
- cp README.md python-package/README.md
21
- cp LICENSE python-package/LICENSE
22
- - name: Update TOML
23
- run: python scripts/remove-optional-deps.py
24
- - name: Build test data
25
- run: python scripts/make_resources.py
26
- - name: Run tests
27
- run: cargo test --verbose
28
- - name: Publish Crate
29
- run: cargo publish --token ${CRATES_TOKEN} --allow-dirty
30
- env:
31
- CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
1
+ name: Cargo Build Publish
2
+ on: [workflow_dispatch]
3
+
4
+ jobs:
5
+ cargo-build-test:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v3
9
+ - name: Install latests stable Rust
10
+ uses: dtolnay/rust-toolchain@stable
11
+ with:
12
+ toolchain: stable
13
+ - uses: actions/setup-python@v4
14
+ with:
15
+ python-version: "3.10"
16
+ architecture: x64
17
+ - name: Install deps
18
+ run: pip install numpy pandas seaborn scikit-learn toml
19
+ - run: |
20
+ cp README.md python-package/README.md
21
+ cp LICENSE python-package/LICENSE
22
+ - name: Update TOML
23
+ run: python scripts/remove-optional-deps.py
24
+ - name: Build test data
25
+ run: python scripts/make_resources.py
26
+ - name: Run tests
27
+ run: cargo test --verbose
28
+ - name: Publish Crate
29
+ run: cargo publish --token ${CRATES_TOKEN} --allow-dirty
30
+ env:
31
+ CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
@@ -1,28 +1,30 @@
1
- name: docs
2
- on: [pull_request]
3
-
4
- permissions:
5
- contents: write
6
- jobs:
7
- deploy:
8
- runs-on: ubuntu-latest
9
- steps:
10
- - uses: actions/checkout@v3
11
- - uses: actions/setup-python@v4
12
- with:
13
- python-version: 3.x
14
- - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
15
- - uses: actions/cache@v3
16
- with:
17
- key: mkdocs-material-${{ env.cache_id }}
18
- path: .cache
19
- restore-keys: |
20
- mkdocs-material-
21
- - run: |
22
- cp README.md python-package/README.md
23
- cp LICENSE python-package/LICENSE
24
- - run: pip install mkdocs-material
25
- - run: |
26
- cd python-package
27
- pip install .[dev]
28
- mkdocs gh-deploy --force
1
+ name: docs
2
+ on:
3
+ release:
4
+ types: [published]
5
+
6
+ permissions:
7
+ contents: write
8
+ jobs:
9
+ deploy:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ - uses: actions/setup-python@v4
14
+ with:
15
+ python-version: 3.x
16
+ - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
17
+ - uses: actions/cache@v3
18
+ with:
19
+ key: mkdocs-material-${{ env.cache_id }}
20
+ path: .cache
21
+ restore-keys: |
22
+ mkdocs-material-
23
+ - run: |
24
+ cp README.md python-package/README.md
25
+ cp LICENSE python-package/LICENSE
26
+ - run: pip install mkdocs-material
27
+ - run: |
28
+ cd python-package
29
+ pip install .[dev]
30
+ mkdocs gh-deploy --force