-
Notifications
You must be signed in to change notification settings - Fork 29
chore: transition the library to microgenerator #56
Conversation
c657f60
to
fe7a903
Compare
af8269b
to
ad1059a
Compare
I see potential issues with namespace clashes. The following imports used with the old generated client do not work anymore: from google.cloud import bigquery_datatransfer
from google.cloud import bigquery_datatransfer_v1 These imports need to be changed to the following: from google.cloud.bigquery import datatransfer
from google.cloud.bigquery import datatransfer_v1 This is all well and good, but if one then installs
Uninstalling @busunkim96 Do you maybe know if any other 100% autogenerated libraries experienced the same problem and how they fixed it? Edit: namespaces.append("google.cloud.bigquery") |
ad1059a
to
b998958
Compare
b998958
to
b1bdf7e
Compare
The generated code tests do not cover all code paths after all...
b1bdf7e
to
d03c54e
Compare
@plamut @tswast If you all prefer to retain the old namespacing you can do that via generator args
Not sure where we landed with the other BigQuery libraries though, I assume it's better for them to be consistent? |
Thanks @plamut! I'll defer to @busunkim96 and @tswast on this one. |
https://github.com/googleapis/python-bigquery-reservation and https://github.com/googleapis/python-bigquery-connection both use the |
OK, I'll keep the |
c01150d
to
fcc6d31
Compare
Added the UPGRADING guide and simplified the sample, the PR should be done now. After approving and merging, I will follow up with a release PR (probably on Monday). |
|
||
# ---------------------------------------------------------------------------- | ||
# Samples templates | ||
# ---------------------------------------------------------------------------- | ||
|
||
python.py_samples(skip_readmes=True) | ||
|
||
# Fix missing async client in datatransfer_v1 | ||
s.replace( |
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.
The generator isn't adding the async client to __init__.py
?
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.
IIRC something tried to import an Async client somewhere, but it did not exist, thus added this import.
Edit: Misunderstood. Yes, that import was missing, thus added it manually. I probably forgot to open an issue?
Edit 2: This was to make sure that datatransfer
and datatransfer_v1
are the same (one lacked the async client in __all__
).
Co-authored-by: Bu Sun Kim <[email protected]>
Closes #41.
Remaining things: