-
-
Notifications
You must be signed in to change notification settings - Fork 373
Default to RemoteStore for fsspec URIs #2198
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
Changes from 1 commit
f81364b
64b9371
72fb559
205807e
69b6cda
0ea04af
c8535af
fe089fc
4db6386
940084c
41b2be5
8bbc508
1610371
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -82,7 +82,6 @@ def __eq__(self, other: Any) -> bool: | |||
| async def make_store_path( | ||||
| store_like: StoreLike | None, | ||||
| *, | ||||
| path: str | None = None, | ||||
| mode: AccessModeLiteral | None = None, | ||||
| storage_options: dict[str, Any] | None = None, | ||||
| ) -> StorePath: | ||||
|
|
@@ -105,7 +104,7 @@ async def make_store_path( | |||
| result = StorePath(await LocalStore.open(root=store_like, mode=mode or "r")) | ||||
| elif isinstance(store_like, str): | ||||
| storage_options = storage_options or {} | ||||
| fs, path = fsspec.url_to_fs(store_like, **storage_options) | ||||
| fs, _ = fsspec.url_to_fs(store_like, **storage_options) | ||||
|
||||
| if "://" in store or "::" in 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.
Just pushed that refactor. It's a bit bigger than I'd like, but the basic version is that RemoteStores's __init__ matches what it uses internally: you can only given it an async filesystem.
There's a from_url and from_path that handles the other stuff that was previously in __init__.
I removed RemoteStore._url. I think that that's safe to remove, but I need to actually think through how it interacted with store.path
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.
we can pass
**storage_optionstoLocalStoreas wellThere 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.
could be missing something, but I don't think that'll work.
LocalStore.openwill callLocalStore.__init__, which just takesrootandmode, which are passed as regular args here.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 see what you mean. I was thinking
auto_mkdirwould be passed through but if that's not the case, let's not get distracted here.