-
Notifications
You must be signed in to change notification settings - Fork 7
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
Allow MemoryFileStore store copying from different a bucket #68
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🐼 There is a nice PR description, shall we copy that as detailed explanatory text into the commit message? |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1396,8 +1396,9 @@ def list_s3_keys(self, namespace: str = "") -> Iterable[S3Object]: | |
return [self.get_key(path) for path in self.list_files(namespace=namespace)] | ||
|
||
def copy(self, *, s3_object: S3Object, destination: str) -> S3Object: | ||
source_bucket = self.buffers[s3_object.bucket_name] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📚📚📚 Shall we add a docstring to the function? |
||
bucket = self.buffers[self.bucket_name] | ||
bucket[destination] = bucket[s3_object.key] | ||
bucket[destination] = source_bucket[s3_object.key] | ||
return S3Object(bucket_name=self.bucket_name, key=destination) | ||
|
||
def rename(self, *, s3_object: S3Object, destination: str) -> S3Object: | ||
|
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.
🐼 Since the original key path is called
source_key_path
, shall we rename this asdestination_key_path
?