Commit 289b377
authored
xarray.backends refactor (pydata#2261)
* WIP: xarray.backends.file_manager for managing file objects.
This is intended to replace both PickleByReconstructionWrapper and
DataStorePickleMixin with something more compartmentalized.
xref GH2121
* Switch rasterio to use FileManager
* lint fixes
* WIP: rewrite FileManager to always use an LRUCache
* Test coverage
* Don't use move_to_end
* minor clarification
* Switch FileManager.acquire() to a method
* Python 2 compat
* Update xarray.set_options() to add file_cache_maxsize and validation
* Add assert for FILE_CACHE.maxsize
* More docstring for FileManager
* Add accidentally omited tests for LRUCache
* Adapt scipy backend to use FileManager
* Stickler fix
* Fix failure on Python 2.7
* Finish adjusting backends to use FileManager
* Fix bad import
* WIP on distributed
* More WIP
* Fix distributed write tests
* Fixes
* Minor fixup
* whats new
* More refactoring: remove state from backends entirely
* Cleanup
* Fix failing in-memory datastore tests
* Fix inaccessible datastore
* fix autoclose warnings
* Fix PyNIO failures
* No longer disable HDF5 file locking
We longer need to explicitly HDF5_USE_FILE_LOCKING='FALSE' because we
properly close open files.
* whats new and default file cache size
* Whats new tweak
* Refactor default lock logic to backend classes
* Rename get_resource_lock -> get_write_lock
* Don't acquire unnecessary locks in __getitem__
* Fix bad merge
* Fix import
* Remove unreachable code1 parent 5b4d160 commit 289b377
File tree
28 files changed
+1496
-983
lines changed- asv_bench
- benchmarks
- doc
- xarray
- backends
- core
- tests
28 files changed
+1496
-983
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| |||
405 | 410 | | |
406 | 411 | | |
407 | 412 | | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
36 | 52 | | |
37 | 53 | | |
38 | 54 | | |
39 | 55 | | |
40 | 56 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | 57 | | |
45 | 58 | | |
46 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
0 commit comments