fix: allow opening non-existent ZipStore in read mode#4048
fix: allow opening non-existent ZipStore in read mode#4048NIK-TIGER-BILL wants to merge 1 commit into
Conversation
Fixes zarr-developers#2450 Signed-off-by: NIK-TIGER-BILL <nik.tiger.bill@github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4048 +/- ##
=======================================
Coverage 93.53% 93.53%
=======================================
Files 88 88
Lines 11894 11897 +3
=======================================
+ Hits 11125 11128 +3
Misses 769 769
🚀 New features to boost your workflow:
|
|
i feel like it's a bit surprising if |
|
That is a fair point. I chose creating an empty zip as the least-surprising way to keep the store API consistent — other stores can be opened in The alternative I considered was to raise a custom I'm happy to switch to a different approach if the maintainers prefer — e.g., raise a clear |
Summary
Currently, opening a non-existent ZipStore in mode
rfails becausezipfile.ZipFileraises an exception when the file does not exist. This is inconsistent with other Store classes which can be opened inrmode without issues.Changes
rmode but the file does not yet exist.Testing
rmode.Fixes #2450