perpetual 0.7.8__tar.gz → 0.7.10__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 (83) hide show
  1. {perpetual-0.7.8 → perpetual-0.7.10}/.github/workflows/CI.yml +196 -196
  2. {perpetual-0.7.8 → perpetual-0.7.10}/.github/workflows/cargo-build-publish.yml +31 -31
  3. {perpetual-0.7.8 → perpetual-0.7.10}/.github/workflows/docs.yml +28 -28
  4. {perpetual-0.7.8 → perpetual-0.7.10}/.gitignore +11 -11
  5. {perpetual-0.7.8 → perpetual-0.7.10}/.pre-commit-config.yaml +19 -19
  6. {perpetual-0.7.8 → perpetual-0.7.10}/CONTRIBUTING.md +110 -110
  7. {perpetual-0.7.8 → perpetual-0.7.10}/Cargo.toml +41 -41
  8. {perpetual-0.7.8 → perpetual-0.7.10}/LICENSE +663 -663
  9. {perpetual-0.7.8 → perpetual-0.7.10}/PKG-INFO +99 -80
  10. perpetual-0.7.10/README.md +98 -0
  11. {perpetual-0.7.8 → perpetual-0.7.10}/benches/perpetual_benchmarks.rs +198 -198
  12. {perpetual-0.7.8 → perpetual-0.7.10}/examples/cal_housing.rs +161 -161
  13. {perpetual-0.7.8 → perpetual-0.7.10}/examples/cover_types.rs +192 -192
  14. {perpetual-0.7.8 → perpetual-0.7.10}/examples/titanic.rs +59 -59
  15. {perpetual-0.7.8 → perpetual-0.7.10}/pyproject.toml +3 -3
  16. {perpetual-0.7.8 → perpetual-0.7.10}/python/perpetual/__init__.py +6 -6
  17. {perpetual-0.7.8/python-package → perpetual-0.7.10}/python/perpetual/booster.py +958 -958
  18. {perpetual-0.7.8 → perpetual-0.7.10}/python/perpetual/data.py +24 -24
  19. {perpetual-0.7.8/python-package → perpetual-0.7.10}/python/perpetual/serialize.py +74 -74
  20. {perpetual-0.7.8 → perpetual-0.7.10}/python/perpetual/types.py +150 -150
  21. {perpetual-0.7.8 → perpetual-0.7.10}/python/perpetual/utils.py +215 -215
  22. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/.gitignore +71 -71
  23. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/Cargo.lock +22 -22
  24. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/Cargo.toml +5 -5
  25. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/LICENSE +663 -663
  26. perpetual-0.7.10/python-package/README.md +98 -0
  27. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/docs/index.md +39 -39
  28. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/examples/benchmark_lgbm.py +134 -134
  29. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/examples/benchmark_perpetual.py +63 -63
  30. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/examples/categorical_data.ipynb +398 -398
  31. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/examples/categorical_data_diamonds.ipynb +392 -392
  32. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/examples/categorical_data_titanic.ipynb +286 -286
  33. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/examples/fetch_openml.ipynb +101 -81
  34. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/examples/lgbm_openml_sensory.ipynb +141 -141
  35. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/examples/openml.ipynb +178 -178
  36. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/examples/openml_mnist.ipynb +86 -86
  37. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/examples/performance_benchmark.ipynb +339 -339
  38. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/examples/santander.ipynb +197 -197
  39. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/examples/toy_datasets.ipynb +101 -89
  40. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/mkdocs.yml +47 -47
  41. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/python/perpetual/__init__.py +6 -6
  42. {perpetual-0.7.8 → perpetual-0.7.10/python-package}/python/perpetual/booster.py +958 -958
  43. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/python/perpetual/data.py +24 -24
  44. {perpetual-0.7.8 → perpetual-0.7.10/python-package}/python/perpetual/serialize.py +74 -74
  45. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/python/perpetual/types.py +150 -150
  46. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/python/perpetual/utils.py +215 -215
  47. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/src/booster.rs +344 -344
  48. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/src/lib.rs +22 -22
  49. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/src/multi_output.rs +330 -330
  50. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/src/utils.rs +53 -53
  51. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/tests/test_booster.py +798 -798
  52. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/tests/test_multi_output.py +22 -22
  53. {perpetual-0.7.8 → perpetual-0.7.10}/python-package/tests/test_serialize.py +63 -63
  54. {perpetual-0.7.8 → perpetual-0.7.10}/rust-toolchain +1 -1
  55. {perpetual-0.7.8 → perpetual-0.7.10}/scripts/make_resources.py +102 -102
  56. {perpetual-0.7.8 → perpetual-0.7.10}/scripts/remove-optional-deps.py +18 -18
  57. {perpetual-0.7.8 → perpetual-0.7.10}/scripts/run-python-tests.ps1 +6 -6
  58. {perpetual-0.7.8 → perpetual-0.7.10}/scripts/run-python-tests.sh +5 -5
  59. {perpetual-0.7.8 → perpetual-0.7.10}/scripts/run-single-python-test.ps1 +3 -3
  60. {perpetual-0.7.8 → perpetual-0.7.10}/src/bin.rs +158 -158
  61. {perpetual-0.7.8 → perpetual-0.7.10}/src/binning.rs +237 -237
  62. {perpetual-0.7.8 → perpetual-0.7.10}/src/booster.rs +1392 -1391
  63. {perpetual-0.7.8 → perpetual-0.7.10}/src/constants.rs +9 -9
  64. {perpetual-0.7.8 → perpetual-0.7.10}/src/constraints.rs +11 -11
  65. {perpetual-0.7.8 → perpetual-0.7.10}/src/data.rs +381 -381
  66. {perpetual-0.7.8 → perpetual-0.7.10}/src/errors.rs +18 -18
  67. {perpetual-0.7.8 → perpetual-0.7.10}/src/grower.rs +46 -46
  68. {perpetual-0.7.8 → perpetual-0.7.10}/src/histogram.rs +567 -567
  69. {perpetual-0.7.8 → perpetual-0.7.10}/src/lib.rs +29 -29
  70. {perpetual-0.7.8 → perpetual-0.7.10}/src/metric.rs +314 -314
  71. {perpetual-0.7.8 → perpetual-0.7.10}/src/multi_output.rs +573 -573
  72. {perpetual-0.7.8 → perpetual-0.7.10}/src/node.rs +285 -285
  73. {perpetual-0.7.8 → perpetual-0.7.10}/src/objective.rs +397 -397
  74. {perpetual-0.7.8 → perpetual-0.7.10}/src/partial_dependence.rs +151 -151
  75. {perpetual-0.7.8 → perpetual-0.7.10}/src/sampler.rs +43 -43
  76. {perpetual-0.7.8 → perpetual-0.7.10}/src/shapley.rs +232 -232
  77. {perpetual-0.7.8 → perpetual-0.7.10}/src/splitter.rs +2256 -2256
  78. {perpetual-0.7.8 → perpetual-0.7.10}/src/tree.rs +1074 -1074
  79. {perpetual-0.7.8 → perpetual-0.7.10}/src/utils.rs +1354 -1354
  80. perpetual-0.7.8/README.md +0 -79
  81. perpetual-0.7.8/python-package/README.md +0 -79
  82. {perpetual-0.7.8 → perpetual-0.7.10}/resources/perp_logo.png +0 -0
  83. {perpetual-0.7.8 → perpetual-0.7.10}/rustfmt.toml +0 -0
@@ -1,196 +1,196 @@
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"]
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"]
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"]
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
- cargo-build-test:
150
- runs-on: ubuntu-latest
151
- needs: ["linux-build-test"]
152
- steps:
153
- - uses: actions/checkout@v4
154
- - name: Install latest stable Rust
155
- uses: dtolnay/rust-toolchain@stable
156
- with:
157
- toolchain: stable
158
- - uses: actions/setup-python@v5
159
- with:
160
- python-version: "3.11"
161
- architecture: x64
162
- - name: Install deps
163
- run: pip install numpy pandas seaborn scikit-learn toml
164
- - run: |
165
- cp README.md python-package/README.md
166
- cp LICENSE python-package/LICENSE
167
- - name: Build test data
168
- run: |
169
- cd python-package
170
- python -m pip install -e .[dev]
171
- cd ..
172
- python scripts/make_resources.py
173
- - name: Run tests
174
- run: cargo test --verbose
175
- - name: Publish Crate
176
- run: cargo publish --token ${CRATES_TOKEN} --allow-dirty
177
- env:
178
- CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
179
-
180
- pypi-publish:
181
- runs-on: ubuntu-latest
182
- needs: ["windows-build-test", "macos-build-test", "linux-build-test"]
183
- environment:
184
- name: Test and Deploy
185
- url: https://pypi.org/p/perpetual
186
- permissions:
187
- id-token: write
188
- steps:
189
- - name: Retrieve release distributions
190
- uses: actions/download-artifact@v4
191
- with:
192
- pattern: dist-*
193
- merge-multiple: true
194
- path: dist
195
- - name: Publish release distributions to PyPI
196
- 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"]
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"]
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"]
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
+ cargo-build-test:
150
+ runs-on: ubuntu-latest
151
+ needs: ["linux-build-test"]
152
+ steps:
153
+ - uses: actions/checkout@v4
154
+ - name: Install latest stable Rust
155
+ uses: dtolnay/rust-toolchain@stable
156
+ with:
157
+ toolchain: stable
158
+ - uses: actions/setup-python@v5
159
+ with:
160
+ python-version: "3.11"
161
+ architecture: x64
162
+ - name: Install deps
163
+ run: pip install numpy pandas seaborn scikit-learn toml
164
+ - run: |
165
+ cp README.md python-package/README.md
166
+ cp LICENSE python-package/LICENSE
167
+ - name: Build test data
168
+ run: |
169
+ cd python-package
170
+ python -m pip install -e .[dev]
171
+ cd ..
172
+ python scripts/make_resources.py
173
+ - name: Run tests
174
+ run: cargo test --verbose
175
+ - name: Publish Crate
176
+ run: cargo publish --token ${CRATES_TOKEN} --allow-dirty
177
+ env:
178
+ CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
179
+
180
+ pypi-publish:
181
+ runs-on: ubuntu-latest
182
+ needs: ["windows-build-test", "macos-build-test", "linux-build-test"]
183
+ environment:
184
+ name: Test and Deploy
185
+ url: https://pypi.org/p/perpetual
186
+ permissions:
187
+ id-token: write
188
+ steps:
189
+ - name: Retrieve release distributions
190
+ uses: actions/download-artifact@v4
191
+ with:
192
+ pattern: dist-*
193
+ merge-multiple: true
194
+ path: dist
195
+ - name: Publish release distributions to PyPI
196
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -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,28 @@
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: [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,12 +1,12 @@
1
- /target
2
- Cargo.lock
3
- perpetual/__pycache__
4
- .vscode/
5
- .venv
6
- resources/*
7
- !resources/perp_logo.png
8
- python-package/Cargo.lock
9
- python-package/LICENSE
10
- python-package/README.md
11
- python-package/target
1
+ /target
2
+ Cargo.lock
3
+ perpetual/__pycache__
4
+ .vscode/
5
+ .venv
6
+ resources/*
7
+ !resources/perp_logo.png
8
+ python-package/Cargo.lock
9
+ python-package/LICENSE
10
+ python-package/README.md
11
+ python-package/target
12
12
  python-package/python/perpetual/__pycache__
@@ -1,20 +1,20 @@
1
- repos:
2
- - repo: https://github.com/doublify/pre-commit-rust
3
- rev: "v1.0"
4
- hooks:
5
- - id: fmt
6
- - id: cargo-check
7
- - id: clippy
8
- - repo: https://github.com/pycqa/isort
9
- rev: "5.12.0"
10
- hooks:
11
- - id: isort
12
- - repo: https://github.com/psf/black
13
- rev: "22.6.0"
14
- hooks:
15
- - id: black
16
- - repo: https://github.com/astral-sh/ruff-pre-commit
17
- # Ruff version.
18
- rev: v0.0.277
19
- hooks:
1
+ repos:
2
+ - repo: https://github.com/doublify/pre-commit-rust
3
+ rev: "v1.0"
4
+ hooks:
5
+ - id: fmt
6
+ - id: cargo-check
7
+ - id: clippy
8
+ - repo: https://github.com/pycqa/isort
9
+ rev: "5.12.0"
10
+ hooks:
11
+ - id: isort
12
+ - repo: https://github.com/psf/black
13
+ rev: "22.6.0"
14
+ hooks:
15
+ - id: black
16
+ - repo: https://github.com/astral-sh/ruff-pre-commit
17
+ # Ruff version.
18
+ rev: v0.0.277
19
+ hooks:
20
20
  - id: ruff