Commit 0328656
Use dataclasses for ByteRangeRequests (#2585)
* Use TypedDicts for more literate ByteRangeRequests
* Update utility function
* fixes sharding
* Ignore mypy errors
* Fix offset in _normalize_byte_range_index
* Update get_partial_values for FsspecStore
* Re-add fs._cat_ranges argument
* Simplify typing
* Update _normalize to return start, stop
* Use explicit range
* Use dataclasses
* Update typing
* Update docstring
* Rename ExplicitRange to ExplicitByteRequest
* Rename OffsetRange to OffsetByteRequest
* Rename SuffixRange to SuffixByteRequest
* Use match; case instead of if; elif
* Revert "Use match; case instead of if; elif"
This reverts commit a7d35f8.
* Update ByteRangeRequest to ByteRequest
* Remove ByteRange definition from common
* Rename ExplicitByteRequest to RangeByteRequest
* Provide more informative error message
---------
Co-authored-by: Norman Rzepka <[email protected]>1 parent 22ebded commit 0328656
File tree
15 files changed
+221
-145
lines changed- src/zarr
- abc
- codecs
- core
- storage
- testing
- tests/test_store
15 files changed
+221
-145
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
23 | 51 | | |
24 | 52 | | |
25 | 53 | | |
| |||
141 | 169 | | |
142 | 170 | | |
143 | 171 | | |
144 | | - | |
| 172 | + | |
145 | 173 | | |
146 | 174 | | |
147 | 175 | | |
148 | 176 | | |
149 | 177 | | |
150 | 178 | | |
151 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
152 | 186 | | |
153 | 187 | | |
154 | 188 | | |
| |||
160 | 194 | | |
161 | 195 | | |
162 | 196 | | |
163 | | - | |
| 197 | + | |
164 | 198 | | |
165 | 199 | | |
166 | 200 | | |
| |||
338 | 372 | | |
339 | 373 | | |
340 | 374 | | |
341 | | - | |
| 375 | + | |
342 | 376 | | |
343 | 377 | | |
344 | 378 | | |
| |||
416 | 450 | | |
417 | 451 | | |
418 | 452 | | |
419 | | - | |
| 453 | + | |
420 | 454 | | |
421 | 455 | | |
422 | 456 | | |
423 | 457 | | |
424 | 458 | | |
425 | 459 | | |
426 | | - | |
| 460 | + | |
427 | 461 | | |
428 | 462 | | |
429 | | - | |
| 463 | + | |
430 | 464 | | |
431 | 465 | | |
432 | 466 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
| |||
77 | 83 | | |
78 | 84 | | |
79 | 85 | | |
80 | | - | |
| 86 | + | |
81 | 87 | | |
82 | 88 | | |
83 | 89 | | |
| |||
90 | 96 | | |
91 | 97 | | |
92 | 98 | | |
93 | | - | |
| 99 | + | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
| |||
129 | 135 | | |
130 | 136 | | |
131 | 137 | | |
132 | | - | |
| 138 | + | |
133 | 139 | | |
134 | 140 | | |
135 | 141 | | |
| |||
203 | 209 | | |
204 | 210 | | |
205 | 211 | | |
206 | | - | |
| 212 | + | |
207 | 213 | | |
208 | 214 | | |
209 | 215 | | |
| |||
504 | 510 | | |
505 | 511 | | |
506 | 512 | | |
507 | | - | |
| 513 | + | |
| 514 | + | |
508 | 515 | | |
509 | 516 | | |
510 | 517 | | |
| |||
696 | 703 | | |
697 | 704 | | |
698 | 705 | | |
699 | | - | |
| 706 | + | |
| 707 | + | |
700 | 708 | | |
701 | 709 | | |
702 | 710 | | |
703 | | - | |
| 711 | + | |
704 | 712 | | |
705 | 713 | | |
706 | 714 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
| |||
199 | 205 | | |
200 | 206 | | |
201 | 207 | | |
202 | | - | |
| 208 | + | |
203 | 209 | | |
204 | 210 | | |
205 | 211 | | |
206 | 212 | | |
207 | 213 | | |
208 | 214 | | |
209 | 215 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
224 | 225 | | |
225 | | - | |
226 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
227 | 236 | | |
228 | 237 | | |
229 | 238 | | |
| |||
270 | 279 | | |
271 | 280 | | |
272 | 281 | | |
273 | | - | |
| 282 | + | |
274 | 283 | | |
275 | 284 | | |
276 | 285 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
288 | 307 | | |
289 | 308 | | |
290 | 309 | | |
291 | | - | |
| 310 | + | |
292 | 311 | | |
293 | 312 | | |
294 | 313 | | |
| |||
0 commit comments