-
-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create fsstore from filesystem #911
Create fsstore from filesystem #911
Conversation
Codecov Report
@@ Coverage Diff @@
## master #911 +/- ##
=======================================
Coverage 99.94% 99.94%
=======================================
Files 34 34
Lines 13719 13785 +66
=======================================
+ Hits 13712 13778 +66
Misses 7 7
|
I would like to revive and move forward this PR. Martin, you gave a few helpful comments and ideas above. Would you mind turning these into a more formal review in terms of what you think is needed vs interesting possibility. What we have here is a tightly scoped and tested PR to unblock a rather serious upstream problem. If there is no major technical debt incurred by this PR, could we consider merging as is (modulo doc updates from checklist) rather than expanding scope? If not, please let us know what else would be required. Also pinging @grlee77 and @joshmoore for potential interaction with ongoing refactor of storage classes (#789). |
Thanks @rabernat, I commented above. If the |
Thanks, @grlee77. From my side, that was the only concern in terms of impact on existing work, @rabernat. @martindurant's point about the general API "burden" seems to be outstanding. Is it that a concrete alternative that doesn't break the API needs proposing from your side, @rabernat? A side note that testing is currently blocked due to GHA weirdness. @jakirkham and I will try to get that sorted ASAP. |
@rabernat: would you prefer someone else to propose an alternative? |
if self.fs.exists(self.path) and not self.fs.isdir(self.path): | ||
raise FSPathExistNotDir(url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix #993 I have simply removed this check...
filepath = os.path.join(path, self.root + "foo") | ||
with pytest.raises(ValueError): | ||
self.create_store(path=filepath, mode='r') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...and its corresponding test.
This test did not do anything other than test the error above. self.create_store
does not actually attempt to write any data or list the store.
With the check gone, users will now see an error from fsspec if they try to do an operation that requires listing on an unlistable FSSpec store, as they would already on a generic MutableMapping-based store.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very little to comment
e76a376
to
cfadc1d
Compare
2.11.3 | ||
------ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although 2.11.3 has been released, I noted that the docs had not been updated, so I added it here.
It seems we have skipped release 2.11.2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those releases are coming from the 2_11
branch. (See the related #898 (comment))
I assume you intend this for release as a 2.11.x?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I have clearly not been able to follow that discussion. After reading, I now understand the situation better. Let's discuss at today's SC meeting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ping this thread with any decision on which branch to merge into
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@martindurant : @rabernat seemed to think it was ok to hold off on @grlee77's upcoming v3 configuration fix, i.e. this can stay on the branch it is and be released as something >2.11.x
. If it looks like we want it in a quick ~=2.11.x
release, I can attempt the backport.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do whatever the other devs recommend here (either backport to 2.11.x or put this in 2.12.0)
I am confused about how we will maintain a consistent changelog for these two branches. So I am standing by for advice.
From my POV, this is now complete. Would appreciate any other feedback or otherwise a merge. |
@joshmoore , I see you have been tagged to review. I am happy to put this in, if you don't intend to look. |
This is my first Zarr PR in quite a while, so I just tagged the people I know to review. 😄 |
3bc0299
to
36c05ed
Compare
I feel confused about how to move forward with this PR in terms of how to update the changelog (see #911 (comment)). Please help me 🙏. I would love to see this merged soon as I believe it is finished. It is now starting to accumulate conflicts. |
Sorry for having left you hanging. I think either will be fine @rabernat. Either just add your item to unreleased or copy over from the 2 11 branch. Either way feel free to get this in and I will double check before the next release. (Of whatever branch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've hopefully handled the conflicts with Greg's v3 work. Once this goes green, I'll merge and update the release notes to include previous versions.
It looks like the semantics of the previous noise
That doesn't appear to be related to the type hierarchy:
Still digging in case anyone has an idea. Edit: the problem was just that |
Thanks for finishing this up Josh! I really appreciate it! |
This PR adds a new argument to
FSStore
which allows one to pass an existing fsspec filesystem object from which to generate the FSStore. The need to initialize an FSStore from an existing filesystem came up in pangeo-forge/pangeo-forge-recipes#254. It seems like this is something people may want to do more generally.Also fixes #993 by simply removing the check for list-ability when initializing an FSStore.
TODO: