-
Notifications
You must be signed in to change notification settings - Fork 59
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
Change LocalClient to not explicitly store default storage directory #462
Conversation
assert not p1.exists() | ||
assert not p2.exists() |
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.
This test had failed with my new implementation, but I think the old behavior is not desirable. In the old version of this test, we reset the storage directory before instantiating p2
and writing out p1
, which means p2
uses a new default local storage but p1
still uses the old default local storage.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 415-glob-local #462 +/- ##
================================================
+ Coverage 93.6% 93.8% +0.1%
================================================
Files 23 23
Lines 1661 1664 +3
================================================
+ Hits 1556 1562 +6
+ Misses 105 102 -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.
Looks great, thanks!
…nts, reset default storage work on default client (#436) * update glob behavior and test * Typing and changelog * no override * Self typing import * Simpler fix * Fix 414 * message for 414 * Change reset path for default * Fix linting * More waiting styles * Change LocalClient to not explicitly store default storage directory (#462) * Change LocalClient to not explicitly store default storage directory * Remove extraneous file --------- Co-authored-by: Jay Qi <[email protected]> --------- Co-authored-by: Jay Qi <[email protected]> Co-authored-by: Jay Qi <[email protected]>
This is my proposed alternative fix for #414. This PR is into the branch for #436.
This changes the way that
LocalClient
stores and accesses what the local storage directory should be. In the default case where no value forlocal_storage_dir
is provided, accessing local storage will call the class methodget_default_storage_dir
to locate local storage.This means that calling
reset_default_storage_dir
will instantly reset the local storage for all clients that are using the default storage, not just future new ones that are created, and not with a special case for the default client.This feels like a more intuitive fix to me than having the special case for the default client. This means that calling
reset_default_storage_dir
will have the same effect as deleting all of the files inside the directory, in the sense that all instantiated clients using that storage directory get affected.