Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
chore: transition the library to microgenerator #62
chore: transition the library to microgenerator #62
Changes from 15 commits
512fe39
1610ee4
f9ee949
a668a72
8f1c7cf
73edf34
84fa816
507c6c5
a540474
373cb19
cb753e5
69bbede
517b320
eb1b65a
410a98c
0da381f
7c44fb3
9ea2b21
bfa75ca
dc19843
91d3f60
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
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.
Let's have this be the manual wrapper.
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 is a generated file and
bigquery_storage_v1/client.py
imports from it. The latter assumes that the generated client is imported and wraps it, although it could also import directly fromstorage_v1.services.big_query_read
, in principle.Do you think it's worth maintaining additional synth replacement rules to prevent users from accessing the generated client through
google.cloud.bigquery.storage_v1
?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'm pretty sure that's what I did for the
bigquery_storage_v1beta1
package (that is, exclude the equivalent top-level__init__.py
from getting copied over.I'm still flip-flopping about what namespace we should use for the manual clients. It's nice to avoid breaking changes, but if we're breaking anyway, maybe we should be consistent. What do other manual libs do for namespace of manual clients?
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.
PubSub just exposes the generated clients through
pubsub_v1.__init__.py
import.I don't know about other libs, but can check (I suspect they left these imports intact, though).
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.
Interesting! I find that it uses the
google.pubsub_v1
for generated andgoogle.cloud.pubsub_v1
for handwritten to be pretty confusing, but I guess so long as it's documented well, it'll be okay.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 can at least mention this in the UPGRADING guide and just recommend to import from
google.cloud.bigquery.storage
(the samples use this path, too). This will give us more freedom to restructure the library internally in the future (in theory at least).Update: FWIW, I found another library with hand-written layer that has already been migrated to microgenerator (AutoML) and it, too, exposes the generated client through
google.cloud.automl_v1
.