-
Notifications
You must be signed in to change notification settings - Fork 1.6k
enhancement(automl): support for passing project to 'GcsClient' #9299
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
Conversation
lwander
left a comment
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.
Nice! LGTM
|
Looks like you need to change the commit message (rather than the PR title): https://github.com/googleapis/google-cloud-python/pull/9299/checks?check_run_id=236270561
|
…ablesClient passing the default project and credentials
…are passed properly
I've updated the commit messages, but the checks haven't run again. Do I need to make a trivial commit or is there another way to force the checks to run again? |
…blesClient passing the default project and credentials
TrucHLe
left a comment
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.
LG! Thank you
|
@tseaver Should I also update the type on the commit messages from fix to enhancement? |
| self.client = storage.Client() | ||
|
|
||
| self.bucket_name = bucket_name | ||
| self.project = project |
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 attribute is unused.
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.
Removed and updated the docstring. Thanks!
…hanged string to str
Changes:
GcsClient.__init__takes an optional project parameter and passes it to thestorage.Clientconstructor.GcsClientI had a little trouble testing that parameters were passed to the constructors for
GcsClientandstorage.Client. I tried various combinations of mock and patch, but evenMagicMockdoesn't support mocking__init__(). Any suggestions on better approaches would be appreciated.