tsdownsample 0.1.3rc2__tar.gz → 0.1.4.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.
Files changed (56) hide show
  1. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/.github/workflows/ci-tsdownsample.yml +15 -14
  2. tsdownsample-0.1.4.1/Cargo.lock +366 -0
  3. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/Cargo.toml +2 -2
  4. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/Makefile +3 -3
  5. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/PKG-INFO +33 -13
  6. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/README.md +29 -9
  7. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/downsample_rs/Cargo.toml +1 -0
  8. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/downsample_rs/src/m4.rs +62 -34
  9. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/downsample_rs/src/minmax.rs +73 -34
  10. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/downsample_rs/src/minmaxlttb.rs +116 -50
  11. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/downsample_rs/src/searchsorted.rs +35 -13
  12. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/pyproject.toml +3 -3
  13. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/src/lib.rs +110 -36
  14. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/tests/benchmarks/test_downsamplers.py +102 -0
  15. tsdownsample-0.1.4.1/tests/test_algos_python_compliance.py +69 -0
  16. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/tests/test_config.py +1 -0
  17. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/tests/test_rust_mods.py +29 -3
  18. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/tests/test_tsdownsample.py +77 -7
  19. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/tsdownsample/__init__.py +7 -1
  20. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/tsdownsample/_python/downsamplers.py +67 -3
  21. tsdownsample-0.1.4.1/tsdownsample/downsamplers.py +158 -0
  22. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/tsdownsample/downsampling_interface.py +103 -47
  23. tsdownsample-0.1.3rc2/Cargo.lock +0 -465
  24. tsdownsample-0.1.3rc2/downsample_rs/dev_utils/Cargo.toml +0 -10
  25. tsdownsample-0.1.3rc2/downsample_rs/dev_utils/src/config.rs +0 -4
  26. tsdownsample-0.1.3rc2/downsample_rs/dev_utils/src/lib.rs +0 -4
  27. tsdownsample-0.1.3rc2/downsample_rs/dev_utils/src/utils.rs +0 -35
  28. tsdownsample-0.1.3rc2/tests/test_algos_python_compliance.py +0 -31
  29. tsdownsample-0.1.3rc2/tsdownsample/downsamplers.py +0 -73
  30. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/.github/FUNDING.yml +0 -0
  31. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/.github/workflows/ci-downsample_rs.yml +0 -0
  32. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/.github/workflows/codeql.yml +0 -0
  33. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/.github/workflows/codspeed.yml +0 -0
  34. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/.gitignore +0 -0
  35. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/CONTRIBUTING.md +0 -0
  36. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/LICENSE +0 -0
  37. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/downsample_rs/LICENSE +0 -0
  38. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/downsample_rs/README.md +0 -0
  39. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/downsample_rs/benches/bench_lttb.rs +0 -0
  40. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/downsample_rs/benches/bench_m4.rs +0 -0
  41. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/downsample_rs/benches/bench_minmax.rs +0 -0
  42. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/downsample_rs/benches/bench_minmaxlttb.rs +0 -0
  43. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/downsample_rs/benches/results +0 -0
  44. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/downsample_rs/src/helpers.rs +0 -0
  45. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/downsample_rs/src/lib.rs +0 -0
  46. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/downsample_rs/src/lttb.rs +0 -0
  47. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/downsample_rs/src/types.rs +0 -0
  48. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/notebooks/benches.ipynb +0 -0
  49. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/notebooks/downsample_times_processed.csv +0 -0
  50. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/notebooks/requirements.txt +0 -0
  51. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/rust-toolchain +0 -0
  52. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/tests/benchmarks/__init__.py +0 -0
  53. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/tests/requirements-linting.txt +0 -0
  54. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/tests/requirements.txt +0 -0
  55. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/tsdownsample/_python/__init__.py +0 -0
  56. {tsdownsample-0.1.3rc2 → tsdownsample-0.1.4.1}/tsdownsample/_rust/__init__.py +0 -0
@@ -46,14 +46,14 @@ jobs:
46
46
  matrix:
47
47
  os: ['windows-latest', 'macOS-latest', 'ubuntu-latest']
48
48
  rust: ['nightly'] # ['stable', 'beta']
49
- python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
49
+ python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', "3.13"]
50
50
 
51
51
  env:
52
52
  PYTHON: ${{ matrix.python-version }}
53
53
 
54
54
  steps:
55
- - uses: actions/checkout@v3
56
- - uses: actions/setup-python@v4
55
+ - uses: actions/checkout@v4
56
+ - uses: actions/setup-python@v5
57
57
  with:
58
58
  python-version: ${{ matrix.python-version }}
59
59
  - run: pip install -r tests/requirements.txt
@@ -81,7 +81,7 @@ jobs:
81
81
  - run: make test # Test Python
82
82
 
83
83
  - name: Upload coverage to Codecov
84
- uses: codecov/codecov-action@v3
84
+ uses: codecov/codecov-action@v5
85
85
 
86
86
  Build:
87
87
  # Perhaps smth more in line with this https://github.com/messense/crfs-rs/blob/main/.github/workflows/Python.yml
@@ -136,10 +136,10 @@ jobs:
136
136
  - uses: actions/checkout@v3
137
137
 
138
138
  - name: set up python
139
- uses: actions/setup-python@v4
140
- # with:
141
- # python-version: '3.11'
142
- # architecture: ${{ matrix.python-architecture || 'x64' }}
139
+ uses: actions/setup-python@v5
140
+ with:
141
+ python-version: 3.13
142
+ architecture: ${{ matrix.python-architecture || 'x64' }}
143
143
 
144
144
  - name: build sdist
145
145
  if: ${{ matrix.os == 'ubuntu' && matrix.target == 'x86_64' && matrix.manylinux == 'auto' }}
@@ -155,13 +155,13 @@ jobs:
155
155
  target: ${{ matrix.target }}
156
156
  manylinux: ${{ matrix.manylinux || 'auto' }}
157
157
  container: ${{ matrix.container }}
158
- args: --release --out dist --interpreter ${{ matrix.interpreter || '3.7 3.8 3.9 3.10 3.11 3.12' }}
158
+ args: --release --out dist --interpreter ${{ matrix.interpreter || '3.8 3.9 3.10 3.11 3.12 3.13' }}
159
159
 
160
160
  - run: ${{ matrix.ls || 'ls -lh' }} dist/
161
161
 
162
- - uses: actions/upload-artifact@v3
162
+ - uses: actions/upload-artifact@v4
163
163
  with:
164
- name: pypi_files
164
+ name: pypi_files-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.interpreter || 'all' }}-${{ matrix.manylinux || 'auto' }}
165
165
  path: dist
166
166
 
167
167
  Release:
@@ -177,12 +177,13 @@ jobs:
177
177
  # with:
178
178
  # python-version: '3.10'
179
179
 
180
- - run: pip install -U twine
180
+ - run: pip install -U twine packaging
181
181
 
182
182
  - name: get dist artifacts
183
- uses: actions/download-artifact@v3
183
+ uses: actions/download-artifact@v4
184
184
  with:
185
- name: pypi_files
185
+ pattern: pypi_files-*
186
+ merge-multiple: true
186
187
  path: dist
187
188
 
188
189
  - run: twine check dist/*
@@ -0,0 +1,366 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "argminmax"
7
+ version = "0.6.2"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "52424b59d69d69d5056d508b260553afd91c57e21849579cd1f50ee8b8b88eaa"
10
+ dependencies = [
11
+ "half",
12
+ "num-traits",
13
+ ]
14
+
15
+ [[package]]
16
+ name = "autocfg"
17
+ version = "1.4.0"
18
+ source = "registry+https://github.com/rust-lang/crates.io-index"
19
+ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
20
+
21
+ [[package]]
22
+ name = "cfg-if"
23
+ version = "1.0.0"
24
+ source = "registry+https://github.com/rust-lang/crates.io-index"
25
+ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
26
+
27
+ [[package]]
28
+ name = "crossbeam-deque"
29
+ version = "0.8.6"
30
+ source = "registry+https://github.com/rust-lang/crates.io-index"
31
+ checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
32
+ dependencies = [
33
+ "crossbeam-epoch",
34
+ "crossbeam-utils",
35
+ ]
36
+
37
+ [[package]]
38
+ name = "crossbeam-epoch"
39
+ version = "0.9.18"
40
+ source = "registry+https://github.com/rust-lang/crates.io-index"
41
+ checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
42
+ dependencies = [
43
+ "crossbeam-utils",
44
+ ]
45
+
46
+ [[package]]
47
+ name = "crossbeam-utils"
48
+ version = "0.8.21"
49
+ source = "registry+https://github.com/rust-lang/crates.io-index"
50
+ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
51
+
52
+ [[package]]
53
+ name = "crunchy"
54
+ version = "0.2.3"
55
+ source = "registry+https://github.com/rust-lang/crates.io-index"
56
+ checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929"
57
+
58
+ [[package]]
59
+ name = "downsample_rs"
60
+ version = "0.1.0"
61
+ dependencies = [
62
+ "argminmax",
63
+ "half",
64
+ "num-traits",
65
+ "once_cell",
66
+ "rayon",
67
+ ]
68
+
69
+ [[package]]
70
+ name = "either"
71
+ version = "1.13.0"
72
+ source = "registry+https://github.com/rust-lang/crates.io-index"
73
+ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
74
+
75
+ [[package]]
76
+ name = "half"
77
+ version = "2.4.1"
78
+ source = "registry+https://github.com/rust-lang/crates.io-index"
79
+ checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888"
80
+ dependencies = [
81
+ "cfg-if",
82
+ "crunchy",
83
+ "num-traits",
84
+ ]
85
+
86
+ [[package]]
87
+ name = "heck"
88
+ version = "0.5.0"
89
+ source = "registry+https://github.com/rust-lang/crates.io-index"
90
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
91
+
92
+ [[package]]
93
+ name = "indoc"
94
+ version = "2.0.5"
95
+ source = "registry+https://github.com/rust-lang/crates.io-index"
96
+ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
97
+
98
+ [[package]]
99
+ name = "libc"
100
+ version = "0.2.169"
101
+ source = "registry+https://github.com/rust-lang/crates.io-index"
102
+ checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
103
+
104
+ [[package]]
105
+ name = "libm"
106
+ version = "0.2.11"
107
+ source = "registry+https://github.com/rust-lang/crates.io-index"
108
+ checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa"
109
+
110
+ [[package]]
111
+ name = "matrixmultiply"
112
+ version = "0.3.9"
113
+ source = "registry+https://github.com/rust-lang/crates.io-index"
114
+ checksum = "9380b911e3e96d10c1f415da0876389aaf1b56759054eeb0de7df940c456ba1a"
115
+ dependencies = [
116
+ "autocfg",
117
+ "rawpointer",
118
+ ]
119
+
120
+ [[package]]
121
+ name = "memoffset"
122
+ version = "0.9.1"
123
+ source = "registry+https://github.com/rust-lang/crates.io-index"
124
+ checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
125
+ dependencies = [
126
+ "autocfg",
127
+ ]
128
+
129
+ [[package]]
130
+ name = "ndarray"
131
+ version = "0.16.1"
132
+ source = "registry+https://github.com/rust-lang/crates.io-index"
133
+ checksum = "882ed72dce9365842bf196bdeedf5055305f11fc8c03dee7bb0194a6cad34841"
134
+ dependencies = [
135
+ "matrixmultiply",
136
+ "num-complex",
137
+ "num-integer",
138
+ "num-traits",
139
+ "portable-atomic",
140
+ "portable-atomic-util",
141
+ "rawpointer",
142
+ ]
143
+
144
+ [[package]]
145
+ name = "num-complex"
146
+ version = "0.4.6"
147
+ source = "registry+https://github.com/rust-lang/crates.io-index"
148
+ checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
149
+ dependencies = [
150
+ "num-traits",
151
+ ]
152
+
153
+ [[package]]
154
+ name = "num-integer"
155
+ version = "0.1.46"
156
+ source = "registry+https://github.com/rust-lang/crates.io-index"
157
+ checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
158
+ dependencies = [
159
+ "num-traits",
160
+ ]
161
+
162
+ [[package]]
163
+ name = "num-traits"
164
+ version = "0.2.19"
165
+ source = "registry+https://github.com/rust-lang/crates.io-index"
166
+ checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
167
+ dependencies = [
168
+ "autocfg",
169
+ "libm",
170
+ ]
171
+
172
+ [[package]]
173
+ name = "numpy"
174
+ version = "0.22.1"
175
+ source = "registry+https://github.com/rust-lang/crates.io-index"
176
+ checksum = "edb929bc0da91a4d85ed6c0a84deaa53d411abfb387fc271124f91bf6b89f14e"
177
+ dependencies = [
178
+ "half",
179
+ "libc",
180
+ "ndarray",
181
+ "num-complex",
182
+ "num-integer",
183
+ "num-traits",
184
+ "pyo3",
185
+ "rustc-hash",
186
+ ]
187
+
188
+ [[package]]
189
+ name = "once_cell"
190
+ version = "1.20.2"
191
+ source = "registry+https://github.com/rust-lang/crates.io-index"
192
+ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
193
+
194
+ [[package]]
195
+ name = "paste"
196
+ version = "1.0.15"
197
+ source = "registry+https://github.com/rust-lang/crates.io-index"
198
+ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
199
+
200
+ [[package]]
201
+ name = "portable-atomic"
202
+ version = "1.10.0"
203
+ source = "registry+https://github.com/rust-lang/crates.io-index"
204
+ checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6"
205
+
206
+ [[package]]
207
+ name = "portable-atomic-util"
208
+ version = "0.2.4"
209
+ source = "registry+https://github.com/rust-lang/crates.io-index"
210
+ checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507"
211
+ dependencies = [
212
+ "portable-atomic",
213
+ ]
214
+
215
+ [[package]]
216
+ name = "proc-macro2"
217
+ version = "1.0.93"
218
+ source = "registry+https://github.com/rust-lang/crates.io-index"
219
+ checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
220
+ dependencies = [
221
+ "unicode-ident",
222
+ ]
223
+
224
+ [[package]]
225
+ name = "pyo3"
226
+ version = "0.22.6"
227
+ source = "registry+https://github.com/rust-lang/crates.io-index"
228
+ checksum = "f402062616ab18202ae8319da13fa4279883a2b8a9d9f83f20dbade813ce1884"
229
+ dependencies = [
230
+ "cfg-if",
231
+ "indoc",
232
+ "libc",
233
+ "memoffset",
234
+ "once_cell",
235
+ "portable-atomic",
236
+ "pyo3-build-config",
237
+ "pyo3-ffi",
238
+ "pyo3-macros",
239
+ "unindent",
240
+ ]
241
+
242
+ [[package]]
243
+ name = "pyo3-build-config"
244
+ version = "0.22.6"
245
+ source = "registry+https://github.com/rust-lang/crates.io-index"
246
+ checksum = "b14b5775b5ff446dd1056212d778012cbe8a0fbffd368029fd9e25b514479c38"
247
+ dependencies = [
248
+ "once_cell",
249
+ "target-lexicon",
250
+ ]
251
+
252
+ [[package]]
253
+ name = "pyo3-ffi"
254
+ version = "0.22.6"
255
+ source = "registry+https://github.com/rust-lang/crates.io-index"
256
+ checksum = "9ab5bcf04a2cdcbb50c7d6105de943f543f9ed92af55818fd17b660390fc8636"
257
+ dependencies = [
258
+ "libc",
259
+ "pyo3-build-config",
260
+ ]
261
+
262
+ [[package]]
263
+ name = "pyo3-macros"
264
+ version = "0.22.6"
265
+ source = "registry+https://github.com/rust-lang/crates.io-index"
266
+ checksum = "0fd24d897903a9e6d80b968368a34e1525aeb719d568dba8b3d4bfa5dc67d453"
267
+ dependencies = [
268
+ "proc-macro2",
269
+ "pyo3-macros-backend",
270
+ "quote",
271
+ "syn",
272
+ ]
273
+
274
+ [[package]]
275
+ name = "pyo3-macros-backend"
276
+ version = "0.22.6"
277
+ source = "registry+https://github.com/rust-lang/crates.io-index"
278
+ checksum = "36c011a03ba1e50152b4b394b479826cad97e7a21eb52df179cd91ac411cbfbe"
279
+ dependencies = [
280
+ "heck",
281
+ "proc-macro2",
282
+ "pyo3-build-config",
283
+ "quote",
284
+ "syn",
285
+ ]
286
+
287
+ [[package]]
288
+ name = "quote"
289
+ version = "1.0.38"
290
+ source = "registry+https://github.com/rust-lang/crates.io-index"
291
+ checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
292
+ dependencies = [
293
+ "proc-macro2",
294
+ ]
295
+
296
+ [[package]]
297
+ name = "rawpointer"
298
+ version = "0.2.1"
299
+ source = "registry+https://github.com/rust-lang/crates.io-index"
300
+ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
301
+
302
+ [[package]]
303
+ name = "rayon"
304
+ version = "1.10.0"
305
+ source = "registry+https://github.com/rust-lang/crates.io-index"
306
+ checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
307
+ dependencies = [
308
+ "either",
309
+ "rayon-core",
310
+ ]
311
+
312
+ [[package]]
313
+ name = "rayon-core"
314
+ version = "1.12.1"
315
+ source = "registry+https://github.com/rust-lang/crates.io-index"
316
+ checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
317
+ dependencies = [
318
+ "crossbeam-deque",
319
+ "crossbeam-utils",
320
+ ]
321
+
322
+ [[package]]
323
+ name = "rustc-hash"
324
+ version = "1.1.0"
325
+ source = "registry+https://github.com/rust-lang/crates.io-index"
326
+ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
327
+
328
+ [[package]]
329
+ name = "syn"
330
+ version = "2.0.96"
331
+ source = "registry+https://github.com/rust-lang/crates.io-index"
332
+ checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
333
+ dependencies = [
334
+ "proc-macro2",
335
+ "quote",
336
+ "unicode-ident",
337
+ ]
338
+
339
+ [[package]]
340
+ name = "target-lexicon"
341
+ version = "0.12.16"
342
+ source = "registry+https://github.com/rust-lang/crates.io-index"
343
+ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
344
+
345
+ [[package]]
346
+ name = "tsdownsample"
347
+ version = "0.1.0"
348
+ dependencies = [
349
+ "downsample_rs",
350
+ "half",
351
+ "numpy",
352
+ "paste",
353
+ "pyo3",
354
+ ]
355
+
356
+ [[package]]
357
+ name = "unicode-ident"
358
+ version = "1.0.16"
359
+ source = "registry+https://github.com/rust-lang/crates.io-index"
360
+ checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034"
361
+
362
+ [[package]]
363
+ name = "unindent"
364
+ version = "0.2.3"
365
+ source = "registry+https://github.com/rust-lang/crates.io-index"
366
+ checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce"
@@ -9,8 +9,8 @@ license = "MIT"
9
9
 
10
10
  [dependencies]
11
11
  downsample_rs = { path = "downsample_rs", features = ["half"]}
12
- pyo3 = { version = "0.20", features = ["extension-module"] }
13
- numpy = { version = "0.20", features = ["half"] }
12
+ pyo3 = { version = "0.22", features = ["extension-module"] }
13
+ numpy = { version = "0.22", features = ["half"] }
14
14
  half = { version = "2.3.1", default-features = false }
15
15
  paste = { version = "1.0.14", default-features = false }
16
16
 
@@ -11,13 +11,13 @@ install-dev-requirements:
11
11
 
12
12
  .PHONY: format
13
13
  format:
14
- ruff --fix tsdownsample tests
14
+ ruff format tsdownsample tests
15
15
  $(black)
16
16
  cargo fmt
17
17
 
18
18
  .PHONY: lint-python
19
19
  lint-python:
20
- ruff tsdownsample tests
20
+ ruff check tsdownsample tests
21
21
  $(black) --check --diff
22
22
 
23
23
  .PHONY: lint-rust
@@ -25,7 +25,7 @@ lint-rust:
25
25
  cargo fmt --version
26
26
  cargo fmt --all -- --check
27
27
  cargo clippy --version
28
- cargo clippy -- -D warnings -A incomplete_features -W clippy::dbg_macro -W clippy::print_stdout
28
+ cargo clippy -- -D warnings -A incomplete_features -W clippy::dbg_macro -W clippy::print_stdout -A clippy::empty_line_after_doc_comments
29
29
 
30
30
  .PHONY: lint
31
31
  lint: lint-python lint-rust
@@ -1,15 +1,15 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: tsdownsample
3
- Version: 0.1.3rc2
3
+ Version: 0.1.4.1
4
4
  Classifier: Intended Audience :: Developers
5
5
  Classifier: License :: OSI Approved :: MIT License
6
6
  Classifier: Programming Language :: Python :: 3
7
- Classifier: Programming Language :: Python :: 3.7
8
7
  Classifier: Programming Language :: Python :: 3.8
9
8
  Classifier: Programming Language :: Python :: 3.9
10
9
  Classifier: Programming Language :: Python :: 3.10
11
10
  Classifier: Programming Language :: Python :: 3.11
12
11
  Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
13
  Classifier: Operating System :: POSIX
14
14
  Classifier: Operating System :: MacOS :: MacOS X
15
15
  Classifier: Operating System :: Microsoft :: Windows
@@ -19,7 +19,7 @@ Summary: Time series downsampling in rust
19
19
  Keywords: time series,downsampling,rust,data science,visualization
20
20
  Author: Jeroen Van Der Donckt
21
21
  License: MIT
22
- Requires-Python: >=3.7
22
+ Requires-Python: >=3.8
23
23
  Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
24
24
  Project-URL: Homepage, https://github.com/predict-idlab/tsdownsample
25
25
  Project-URL: Repository, https://github.com/predict-idlab/tsdownsample
@@ -32,13 +32,15 @@ Project-URL: Repository, https://github.com/predict-idlab/tsdownsample
32
32
  [![CodeQL](https://github.com/predict-idlab/tsdownsample/actions/workflows/codeql.yml/badge.svg)](https://github.com/predict-idlab/tsdownsample/actions/workflows/codeql.yml)
33
33
  [![Testing](https://github.com/predict-idlab/tsdownsample/actions/workflows/ci-downsample_rs.yml/badge.svg)](https://github.com/predict-idlab/tsdownsample/actions/workflows/ci-downsample_rs.yml)
34
34
  [![Testing](https://github.com/predict-idlab/tsdownsample/actions/workflows/ci-tsdownsample.yml/badge.svg)](https://github.com/predict-idlab/tsdownsample/actions/workflows/ci-tsdownsample.yml)
35
+ [![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?logo=discord&logoColor=white)](https://discord.gg/k2d59GrxPX)
36
+
35
37
  <!-- TODO: codecov -->
36
38
 
37
39
  Extremely fast **time series downsampling 📈** for visualization, written in Rust.
38
40
 
39
41
  ## Features ✨
40
42
 
41
- * **Fast**: written in rust with PyO3 bindings
43
+ - **Fast**: written in rust with PyO3 bindings
42
44
  - leverages optimized [argminmax](https://github.com/jvdd/argminmax) - which is SIMD accelerated with runtime feature detection
43
45
  - scales linearly with the number of data points
44
46
  <!-- TODO check if it scales sublinearly -->
@@ -51,13 +53,13 @@ Extremely fast **time series downsampling 📈** for visualization, written in R
51
53
  </blockquote>
52
54
  In Rust - which is a compiled language - there is no GIL, so CPU-bound tasks can be parallelized (with <a href="https://github.com/rayon-rs/rayon">Rayon</a>) with little to no overhead.
53
55
  </details>
54
- * **Efficient**: memory efficient
56
+ - **Efficient**: memory efficient
55
57
  - works on views of the data (no copies)
56
58
  - no intermediate data structures are created
57
- * **Flexible**: works on any type of data
58
- - supported datatypes are
59
- - for `x`: `f32`, `f64`, `i16`, `i32`, `i64`, `u16`, `u32`, `u64`, `datetime64`, `timedelta64`
60
- - for `y`: `f16`, `f32`, `f64`, `i8`, `i16`, `i32`, `i64`, `u8`, `u16`, `u32`, `u64`, `datetime64`, `timedelta64`, `bool`
59
+ - **Flexible**: works on any type of data
60
+ - supported datatypes are
61
+ - for `x`: `f32`, `f64`, `i16`, `i32`, `i64`, `u16`, `u32`, `u64`, `datetime64`, `timedelta64`
62
+ - for `y`: `f16`, `f32`, `f64`, `i8`, `i16`, `i32`, `i64`, `u8`, `u16`, `u32`, `u64`, `datetime64`, `timedelta64`, `bool`
61
63
  <details>
62
64
  <summary><i>!! 🚀 <code>f16</code> <a href="https://github.com/jvdd/argminmax">argminmax</a> is 200-300x faster than numpy</i></summary>
63
65
  In contrast with all other data types above, <code>f16</code> is *not* hardware supported (i.e., no instructions for f16) by most modern CPUs!! <br>
@@ -65,7 +67,7 @@ Extremely fast **time series downsampling 📈** for visualization, written in R
65
67
  💡 As for argminmax, only comparisons are needed - and thus no arithmetic operations - creating a <u>symmetrical ordinal mapping from <code>f16</code> to <code>i16</code></u> is sufficient. This mapping allows to use the hardware supported scalar and SIMD <code>i16</code> instructions - while not producing any memory overhead 🎉 <br>
66
68
  <i>More details are described in <a href="https://github.com/jvdd/argminmax/pull/1">argminmax PR #1</a>.</i>
67
69
  </details>
68
- * **Easy to use**: simple & flexible API
70
+ - **Easy to use**: simple & flexible API
69
71
 
70
72
  ## Install
71
73
 
@@ -109,6 +111,7 @@ downsample([x], y, n_out, **kwargs) -> ndarray[uint64]
109
111
  ```
110
112
 
111
113
  **Arguments**:
114
+
112
115
  - `x` is optional
113
116
  - `x` and `y` are both positional arguments
114
117
  - `n_out` is a mandatory keyword argument that defines the number of output values<sup>*</sup>
@@ -119,7 +122,8 @@ downsample([x], y, n_out, **kwargs) -> ndarray[uint64]
119
122
 
120
123
  **Returns**: a `ndarray[uint64]` of indices that can be used to index the original data.
121
124
 
122
- <sup>*</sup><i>When there are gaps in the time series, fewer than `n_out` indices may be returned.</i>
125
+ <sup>\*</sup><i>When there are gaps in the time series, fewer than `n_out` indices may be returned.</i>
126
+
123
127
  ### Downsampling algorithms 📈
124
128
 
125
129
  The following downsampling algorithms (classes) are implemented:
@@ -133,12 +137,28 @@ The following downsampling algorithms (classes) are implemented:
133
137
 
134
138
  <sup>*</sup><i>Default value for `minmax_ratio` is 4, which is empirically proven to be a good default. More details here: https://arxiv.org/abs/2305.00332</i>
135
139
 
140
+ ### Handling NaNs
141
+
142
+ This library supports two `NaN`-policies:
143
+
144
+ 1. Omit `NaN`s (`NaN`s are ignored during downsampling).
145
+ 2. Return index of first `NaN` once there is at least one present in the bin of the considered data.
146
+
147
+ | Omit `NaN`s | Return `NaN`s |
148
+ | ----------------------: | :------------------------- |
149
+ | `MinMaxDownsampler` | `NaNMinMaxDownsampler` |
150
+ | `M4Downsampler` | `NaNM4Downsampler` |
151
+ | `MinMaxLTTBDownsampler` | `NaNMinMaxLTTBDownsampler` |
152
+ | `LTTBDownsampler` | |
153
+
154
+ > Note that NaNs are not supported for `x`-data.
136
155
 
137
156
  ## Limitations & assumptions 🚨
138
157
 
139
158
  Assumes;
159
+
140
160
  1. `x`-data is (non-strictly) monotonic increasing (i.e., sorted)
141
- 2. no `NaNs` in the data
161
+ 2. no `NaN`s in `x`-data
142
162
 
143
163
  ---
144
164