Skip to content

feature: utilize new private interface to pass 'command' through transfer manager#1096

Merged
andrewsg merged 27 commits intogoogleapis:tm-metricsfrom
MiaCY:filename_handling
Sep 15, 2023
Merged

feature: utilize new private interface to pass 'command' through transfer manager#1096
andrewsg merged 27 commits intogoogleapis:tm-metricsfrom
MiaCY:filename_handling

Conversation

@MiaCY
Copy link
Contributor

@MiaCY MiaCY commented Jul 26, 2023

Download:

  • Create new method blob._handle_filename_and_download()
  • Refactor business logic of blob.download_to_filename() into blob._handle_filename_and_download()
  • Refactor blob.download_to_filename() to call blob._handle_filename_and_download()
  • Refactor transfer_manager.download_many() to call blob._handle_filename_and_download() or blob._prep_and_do_download()
  • Add 'command' to download_kwargs of transfer_manager.download_many() and transfer_manager.download_chunks_concurrently()

Upload:

  • Create new method blob._handle_filename_and_upload()
  • Refactor business logic of blob.upload_from_filename() into blob._handle_filename_and_upload()
  • Refactor blob.upload_from_filename() to call blob._handle_filename_and_upload()
  • Refactor transfer_manager.upload_many() to call blob._handle_filename_and_upload() or blob._prep_and _do_upload()
  • Addd 'command' to upload_kwargs of transfer_manager.upload_many()

Other:

  • Refactor transfer manager unit tests accordingly
  • Edit docstrings of related methods

MiaCY and others added 23 commits May 25, 2023 10:03
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/python-storage API. labels Jul 26, 2023
@MiaCY MiaCY added kokoro:run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Jul 26, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 26, 2023
@MiaCY MiaCY removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Jul 26, 2023
@MiaCY MiaCY marked this pull request as ready for review July 26, 2023 23:30
@MiaCY MiaCY requested a review from a team as a code owner July 26, 2023 23:30
@MiaCY MiaCY requested a review from a team July 26, 2023 23:30
Copy link
Contributor

@cojenco cojenco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks Mia!

@andrewsg andrewsg merged commit 50b4bbb into googleapis:tm-metrics Sep 15, 2023
andrewsg pushed a commit that referenced this pull request Sep 18, 2023
…sfer manager (#1096)

* Refactor client.download_blob_to_file

* Chore: clean up code

* refactor blob and client unit tests

* lint reformat

* Rename _prep_and_do_download

* Refactor blob.upload_from_file

* Lint reformat

* feature: add 'command' argument to private upload/download interface

* lint reformat

* reduce duplication and edit docstring

* feature: utilize new private interface to pass 'command' through transfer manager

* add default value to content_type in blob.handle_filename_and_upload()

* add 'command' to downloan_chunks_concurrently

* docstring editing

* refactor transfer manager unit tests

* refactor expected download/upload kwargs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the googleapis/python-storage API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants