Skip to content

Commit 2ccd0d3

Browse files
busunkim96emar-kar
authored andcommitted
Fix synth replace to add TablesClient. (googleapis#9033)
1 parent 6ffae77 commit 2ccd0d3

2 files changed

Lines changed: 25 additions & 19 deletions

File tree

automl/synth.metadata

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"updateTime": "2019-08-10T12:12:23.946735Z",
2+
"updateTime": "2019-08-15T16:50:20.093543Z",
33
"sources": [
44
{
55
"generator": {
@@ -12,8 +12,8 @@
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "2a2c5518f64010c4e458afc818e57ed24fecdf6d",
16-
"internalRef": "262646243"
15+
"sha": "3406d1e899f1f41123b3fa9210ad4bef25c9a720",
16+
"internalRef": "263234709"
1717
}
1818
},
1919
{

automl/synth.py

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,33 @@
3333
s.move(library / f"tests/unit/gapic/{version}")
3434
s.move(library / f"docs/gapic/{version}")
3535

36-
s.replace(
37-
f"google/cloud/automl_{version}/__init__.py",
38-
f"from google.cloud.automl_v1beta1.gapic import prediction_service_client",
39-
f"from google.cloud.automl_v1beta1.gapic import prediction_service_client"
40-
f"from google.cloud.automl_v1beta1.tables import tables_client"
41-
f"\n\n"
42-
f"class TablesClient(tables_client.TablesClient):"
43-
f" __doc__ = tables_client.TablesClient.__doc__"
44-
)
45-
46-
s.replace(
47-
f"google/cloud/automl_{version}/__init__.py",
48-
f"__all__ = (\"enums\", \"types\", \"AutoMlClient\", \"PredictionServiceClient\")",
49-
f"__all__ = (\"enums\", \"types\", \"AutoMlClient\", \"PredictionServiceClient\", \"TablesClient\")"
50-
)
51-
5236
s.move(library / f"docs/conf.py")
5337

5438
# Use the highest version library to generate import alias.
5539
s.move(library / "google/cloud/automl.py")
5640

41+
# Add tables client to v1beta1
42+
s.replace(
43+
f"google/cloud/automl_v1beta1/__init__.py",
44+
f"from google.cloud.automl_v1beta1.gapic import prediction_service_client",
45+
f"from google.cloud.automl_v1beta1.gapic import prediction_service_client\n"
46+
f"from google.cloud.automl_v1beta1.tables import tables_client"
47+
f"\n\n"
48+
f"class TablesClient(tables_client.TablesClient):"
49+
f" __doc__ = tables_client.TablesClient.__doc__"
50+
)
51+
52+
s.replace(
53+
f"google/cloud/automl_v1beta1/__init__.py",
54+
f"""__all__ = \(
55+
'enums',
56+
'types',
57+
'AutoMlClient',
58+
'PredictionServiceClient',
59+
\)""",
60+
f"__all__ = (\"enums\", \"types\", \"AutoMlClient\", \"PredictionServiceClient\", \"TablesClient\")"
61+
)
62+
5763
# Fixup issues in generated code
5864
s.replace(
5965
"**/gapic/*_client.py",

0 commit comments

Comments
 (0)