Commit 28b0f7b
authored
feat: basic fsspec writing (#1016)
* use paramiko instead of sshfs
* use specified port
* test default handler behaviour
* default to fsspec instead of error if scheme not found
* attempt to close socket
* fix ci
* Revert "fix ci"
This reverts commit e56e337.
* broader exception
* also handle socket exception
* get user robust
* enable github test with skip if api limit is hit (so we sometimes test it, but it never fails due to api limits). TODO: update exception class
* add memory filesystem test
* add zip and tar tests
* fix memory test
* zip/tar tests
* add test for writing with fsspec without any integration (file-like object)
* update docstrings, add some type hints
* add helper method to produce sink from a path or file-like object
* add fsspec writing test for integration
* helper function to check if file-like object
* return file-like object
* explicit argument
* rename test
* create empty file
* rename test
* pass storage options to fsspec
* test ssh and memory writing
* split fsspec tests into reading and writing
* loosen the check for file-like object
* add test for file update
* file update test
* properly truncate the file
* refactor how sink is created (no changes)
* annotation to avoid warning
* close file if sink initialization fails
* sink will handle fsspec in a similar way to local path for open and close
* rename to reading
* check if test works
* missing import
* remove parent dirs
* fix zip tar tests
* skip github if api limits hit
* attempt to fix windows paths
* use more complex uri with object in zip test
* debug
* paths
* add new test case to object url split
* add new failing test case: TODO make it work
* revert debug changes
* working in new test case
* modified where file is truncated
* revert file-like check
* revert is-file-like check
* unified rb+ mode (fsspec uses "rb+" not "r+b" it can be confusing sometimes)
* add http write test (not implemented error check)
* skip test for debugging
* understand test failure
* use r+b instead of rb+
* use new sink
* writing memory test
* correctly truncate file with fsspec
* use fsspec to get parent dir
* aiohttp import skip
* isstr
* use ports instead of string
* improve path:obj split to handle chained protocols (protocol1::protocol2://)
* working url chain to some extent
* attempt to fix ci
* cleanup
* attempt to fix ci1 parent 113c58c commit 28b0f7b
File tree
9 files changed
+281
-74
lines changed- src/uproot
- sink
- source
- writing
- tests
9 files changed
+281
-74
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
289 | 292 | | |
290 | 293 | | |
291 | | - | |
| 294 | + | |
292 | 295 | | |
293 | 296 | | |
294 | 297 | | |
295 | 298 | | |
296 | | - | |
| 299 | + | |
297 | 300 | | |
298 | 301 | | |
299 | 302 | | |
300 | 303 | | |
301 | 304 | | |
302 | 305 | | |
303 | 306 | | |
304 | | - | |
305 | | - | |
| 307 | + | |
| 308 | + | |
306 | 309 | | |
307 | 310 | | |
308 | 311 | | |
| |||
313 | 316 | | |
314 | 317 | | |
315 | 318 | | |
316 | | - | |
317 | | - | |
318 | | - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
319 | 326 | | |
320 | | - | |
321 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
322 | 332 | | |
323 | | - | |
324 | | - | |
325 | 333 | | |
| 334 | + | |
326 | 335 | | |
327 | 336 | | |
328 | 337 | | |
| |||
336 | 345 | | |
337 | 346 | | |
338 | 347 | | |
339 | | - | |
340 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
341 | 353 | | |
342 | 354 | | |
343 | 355 | | |
344 | | - | |
| 356 | + | |
345 | 357 | | |
346 | 358 | | |
347 | 359 | | |
| |||
412 | 424 | | |
413 | 425 | | |
414 | 426 | | |
415 | | - | |
| 427 | + | |
416 | 428 | | |
417 | 429 | | |
418 | 430 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
63 | 74 | | |
64 | 75 | | |
| 76 | + | |
65 | 77 | | |
66 | 78 | | |
67 | | - | |
| 79 | + | |
68 | 80 | | |
69 | 81 | | |
70 | 82 | | |
71 | 83 | | |
72 | 84 | | |
73 | 85 | | |
74 | | - | |
75 | | - | |
76 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
77 | 92 | | |
78 | | - | |
| 93 | + | |
| 94 | + | |
79 | 95 | | |
80 | 96 | | |
81 | 97 | | |
| |||
101 | 117 | | |
102 | 118 | | |
103 | 119 | | |
104 | | - | |
| 120 | + | |
105 | 121 | | |
106 | 122 | | |
107 | 123 | | |
| |||
124 | 140 | | |
125 | 141 | | |
126 | 142 | | |
127 | | - | |
| 143 | + | |
128 | 144 | | |
129 | 145 | | |
130 | 146 | | |
| |||
157 | 173 | | |
158 | 174 | | |
159 | 175 | | |
160 | | - | |
| 176 | + | |
161 | 177 | | |
162 | 178 | | |
163 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
0 commit comments