rangebar-rs 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.
@@ -0,0 +1,56 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, master]
6
+ pull_request:
7
+ branches: [main, master]
8
+
9
+ jobs:
10
+ test:
11
+ name: Test (${{ matrix.os }}, Python ${{ matrix.python-version }})
12
+ runs-on: ${{ matrix.os }}
13
+ strategy:
14
+ matrix:
15
+ os: [ubuntu-latest, windows-latest, macos-latest]
16
+ python-version: ['3.10', '3.11', '3.12', '3.13']
17
+ fail-fast: false
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - name: Set up Python
22
+ uses: actions/setup-python@v5
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+ allow-prereleases: true
26
+
27
+ - name: Install Rust
28
+ uses: dtolnay/rust-toolchain@stable
29
+
30
+ - name: Build
31
+ uses: PyO3/maturin-action@v1
32
+ with:
33
+ args: --release --out dist --interpreter python${{ matrix.python-version }}
34
+ manylinux: 'off'
35
+ env:
36
+ PYO3_USE_ABI3_FORWARD_COMPATIBILITY: '1'
37
+
38
+ - name: Install wheel
39
+ shell: bash
40
+ run: |
41
+ pip install numpy pandas polars
42
+ pip install dist/*.whl --force-reinstall
43
+
44
+ - name: Run smoke test
45
+ shell: bash
46
+ run: |
47
+ python -c "
48
+ from rangebar_rs import RangeBar
49
+ from datetime import datetime
50
+ rb = RangeBar(range_size=10)
51
+ rb.update_tick(ltp=100.0, ltq=1.0, datetime=datetime(2024, 1, 1, 12, 0, 0))
52
+ rb.update_tick(ltp=112.0, ltq=1.0, datetime=datetime(2024, 1, 1, 12, 1, 0))
53
+ df = rb.get()
54
+ assert df.shape[0] == 2, f'Expected 2 bars, got {df.shape[0]}'
55
+ print(f'CI test passed: {df.shape[0]} bars generated')
56
+ "
@@ -0,0 +1,291 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+ id-token: write
12
+
13
+ jobs:
14
+ linux-x86_64:
15
+ name: Linux x86_64
16
+ runs-on: ubuntu-latest
17
+ if: startsWith(github.ref, 'refs/tags/v')
18
+ environment:
19
+ name: pypi
20
+ url: https://pypi.org/p/rangebar-rs
21
+ strategy:
22
+ matrix:
23
+ python-version: ['3.10', '3.11', '3.12', '3.13']
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+
27
+ - name: Set up Python
28
+ uses: actions/setup-python@v5
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
31
+ allow-prereleases: true
32
+
33
+ - name: Install Rust
34
+ uses: dtolnay/rust-toolchain@stable
35
+ with:
36
+ targets: x86_64-unknown-linux-gnu
37
+
38
+ - name: Build wheels
39
+ uses: PyO3/maturin-action@v1
40
+ with:
41
+ target: x86_64
42
+ args: --release --out dist --interpreter python${{ matrix.python-version }}
43
+ manylinux: '2_28'
44
+ env:
45
+ PYO3_USE_ABI3_FORWARD_COMPATIBILITY: '1'
46
+
47
+ - name: Upload wheels
48
+ uses: actions/upload-artifact@v4
49
+ with:
50
+ name: wheels-linux-x86_64-py${{ matrix.python-version }}
51
+ path: dist/*.whl
52
+
53
+ - name: Publish to PyPI
54
+ uses: pypa/gh-action-pypi-publish@release/v1
55
+ with:
56
+ packages-dir: dist/
57
+ skip-existing: true
58
+
59
+ linux-aarch64:
60
+ name: Linux ARM64
61
+ runs-on: ubuntu-latest
62
+ if: startsWith(github.ref, 'refs/tags/v')
63
+ environment:
64
+ name: pypi
65
+ url: https://pypi.org/p/rangebar-rs
66
+ strategy:
67
+ matrix:
68
+ python-version: ['3.10', '3.11', '3.12', '3.13']
69
+ steps:
70
+ - uses: actions/checkout@v4
71
+
72
+ - name: Set up QEMU
73
+ uses: docker/setup-qemu-action@v3
74
+ with:
75
+ platforms: arm64
76
+
77
+ - name: Install Rust
78
+ uses: dtolnay/rust-toolchain@stable
79
+ with:
80
+ targets: aarch64-unknown-linux-gnu
81
+
82
+ - name: Build wheels
83
+ uses: PyO3/maturin-action@v1
84
+ with:
85
+ target: aarch64
86
+ args: --release --out dist --interpreter python${{ matrix.python-version }}
87
+ manylinux: '2_28'
88
+ env:
89
+ PYO3_USE_ABI3_FORWARD_COMPATIBILITY: '1'
90
+
91
+ - name: Upload wheels
92
+ uses: actions/upload-artifact@v4
93
+ with:
94
+ name: wheels-linux-aarch64-py${{ matrix.python-version }}
95
+ path: dist/*.whl
96
+
97
+ - name: Publish to PyPI
98
+ uses: pypa/gh-action-pypi-publish@release/v1
99
+ with:
100
+ packages-dir: dist/
101
+ skip-existing: true
102
+
103
+ windows-x86_64:
104
+ name: Windows x86_64
105
+ runs-on: windows-latest
106
+ if: startsWith(github.ref, 'refs/tags/v')
107
+ environment:
108
+ name: pypi
109
+ url: https://pypi.org/p/rangebar-rs
110
+ strategy:
111
+ matrix:
112
+ python-version: ['3.10', '3.11', '3.12', '3.13']
113
+ steps:
114
+ - uses: actions/checkout@v4
115
+
116
+ - name: Set up Python
117
+ uses: actions/setup-python@v5
118
+ with:
119
+ python-version: ${{ matrix.python-version }}
120
+ allow-prereleases: true
121
+
122
+ - name: Install Rust
123
+ uses: dtolnay/rust-toolchain@stable
124
+ with:
125
+ targets: x86_64-pc-windows-msvc
126
+
127
+ - name: Build wheels
128
+ uses: PyO3/maturin-action@v1
129
+ with:
130
+ target: x64
131
+ args: --release --out dist --interpreter python${{ matrix.python-version }}
132
+ env:
133
+ PYO3_USE_ABI3_FORWARD_COMPATIBILITY: '1'
134
+
135
+ - name: Upload wheels
136
+ uses: actions/upload-artifact@v4
137
+ with:
138
+ name: wheels-windows-x86_64-py${{ matrix.python-version }}
139
+ path: dist/*.whl
140
+
141
+ - name: Publish to PyPI
142
+ uses: pypa/gh-action-pypi-publish@release/v1
143
+ with:
144
+ packages-dir: dist/
145
+ skip-existing: true
146
+
147
+ macos-x86_64:
148
+ name: macOS Intel
149
+ runs-on: macos-13
150
+ if: startsWith(github.ref, 'refs/tags/v')
151
+ environment:
152
+ name: pypi
153
+ url: https://pypi.org/p/rangebar-rs
154
+ strategy:
155
+ matrix:
156
+ python-version: ['3.10', '3.11', '3.12', '3.13']
157
+ steps:
158
+ - uses: actions/checkout@v4
159
+
160
+ - name: Set up Python
161
+ uses: actions/setup-python@v5
162
+ with:
163
+ python-version: ${{ matrix.python-version }}
164
+ allow-prereleases: true
165
+
166
+ - name: Install Rust
167
+ uses: dtolnay/rust-toolchain@stable
168
+ with:
169
+ targets: x86_64-apple-darwin
170
+
171
+ - name: Build wheels
172
+ uses: PyO3/maturin-action@v1
173
+ with:
174
+ target: x86_64
175
+ args: --release --out dist --interpreter python${{ matrix.python-version }}
176
+ env:
177
+ PYO3_USE_ABI3_FORWARD_COMPATIBILITY: '1'
178
+ MACOSX_DEPLOYMENT_TARGET: '10.12'
179
+
180
+ - name: Upload wheels
181
+ uses: actions/upload-artifact@v4
182
+ with:
183
+ name: wheels-macos-x86_64-py${{ matrix.python-version }}
184
+ path: dist/*.whl
185
+
186
+ - name: Publish to PyPI
187
+ uses: pypa/gh-action-pypi-publish@release/v1
188
+ with:
189
+ packages-dir: dist/
190
+ skip-existing: true
191
+
192
+ macos-aarch64:
193
+ name: macOS Apple Silicon
194
+ runs-on: macos-latest
195
+ if: startsWith(github.ref, 'refs/tags/v')
196
+ environment:
197
+ name: pypi
198
+ url: https://pypi.org/p/rangebar-rs
199
+ strategy:
200
+ matrix:
201
+ python-version: ['3.10', '3.11', '3.12', '3.13']
202
+ steps:
203
+ - uses: actions/checkout@v4
204
+
205
+ - name: Set up Python
206
+ uses: actions/setup-python@v5
207
+ with:
208
+ python-version: ${{ matrix.python-version }}
209
+ allow-prereleases: true
210
+
211
+ - name: Install Rust
212
+ uses: dtolnay/rust-toolchain@stable
213
+ with:
214
+ targets: aarch64-apple-darwin
215
+
216
+ - name: Build wheels
217
+ uses: PyO3/maturin-action@v1
218
+ with:
219
+ target: aarch64
220
+ args: --release --out dist --interpreter python${{ matrix.python-version }}
221
+ env:
222
+ PYO3_USE_ABI3_FORWARD_COMPATIBILITY: '1'
223
+ MACOSX_DEPLOYMENT_TARGET: '11.0'
224
+
225
+ - name: Upload wheels
226
+ uses: actions/upload-artifact@v4
227
+ with:
228
+ name: wheels-macos-aarch64-py${{ matrix.python-version }}
229
+ path: dist/*.whl
230
+
231
+ - name: Publish to PyPI
232
+ uses: pypa/gh-action-pypi-publish@release/v1
233
+ with:
234
+ packages-dir: dist/
235
+ skip-existing: true
236
+
237
+ sdist:
238
+ name: Source distribution
239
+ runs-on: ubuntu-latest
240
+ if: startsWith(github.ref, 'refs/tags/v')
241
+ environment:
242
+ name: pypi
243
+ url: https://pypi.org/p/rangebar-rs
244
+ steps:
245
+ - uses: actions/checkout@v4
246
+
247
+ - name: Build sdist
248
+ uses: PyO3/maturin-action@v1
249
+ with:
250
+ command: sdist
251
+ args: --out dist
252
+
253
+ - name: Upload sdist
254
+ uses: actions/upload-artifact@v4
255
+ with:
256
+ name: sdist
257
+ path: dist/*.tar.gz
258
+
259
+ - name: Publish to PyPI
260
+ uses: pypa/gh-action-pypi-publish@release/v1
261
+ with:
262
+ packages-dir: dist/
263
+ skip-existing: true
264
+
265
+ github-release:
266
+ name: GitHub Release
267
+ runs-on: ubuntu-latest
268
+ needs:
269
+ - linux-x86_64
270
+ - linux-aarch64
271
+ - windows-x86_64
272
+ - macos-x86_64
273
+ - macos-aarch64
274
+ - sdist
275
+ if: startsWith(github.ref, 'refs/tags/v')
276
+ permissions:
277
+ contents: write
278
+ steps:
279
+ - uses: actions/checkout@v4
280
+
281
+ - name: Download all artifacts
282
+ uses: actions/download-artifact@v4
283
+ with:
284
+ path: dist
285
+ merge-multiple: true
286
+
287
+ - name: Create GitHub Release
288
+ uses: softprops/action-gh-release@v2
289
+ with:
290
+ files: dist/*
291
+ generate_release_notes: true
@@ -0,0 +1,11 @@
1
+ /target/
2
+ /Cargo.lock
3
+ /.venv/
4
+ __pycache__/
5
+ *.pyc
6
+ *.pyd
7
+ *.so
8
+ *.egg-info/
9
+ dist/
10
+ build/
11
+ .pytest_cache/