forked from googleapis/google-cloud-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintegrate-isolated-handwritten-code.yaml
More file actions
448 lines (420 loc) · 12.8 KB
/
integrate-isolated-handwritten-code.yaml
File metadata and controls
448 lines (420 loc) · 12.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
description: Integrate isolated handwritten helpers/mixin code
url: https://github.com/googleapis/gapic-generator-python/issues/1642
replacements:
- paths: [
packages/google-cloud-vision/google/cloud/vision/__init__.py
]
before: |
from google.cloud.vision_v1.services.image_annotator.client import ImageAnnotatorClient
after: |
from google.cloud.vision_v1 import ImageAnnotatorClient
count: 1
- paths: [
packages/google-cloud-vision/google/cloud/vision_v1/__init__.py,
packages/google-cloud-vision/google/cloud/vision_v1p1beta1/__init__.py,
packages/google-cloud-vision/google/cloud/vision_v1p2beta1/__init__.py,
packages/google-cloud-vision/google/cloud/vision_v1p3beta1/__init__.py,
packages/google-cloud-vision/google/cloud/vision_v1p4beta1/__init__.py,
]
before: |
from .services.image_annotator import ImageAnnotatorAsyncClient, ImageAnnotatorClient
after: |
from google.cloud.vision_helpers import VisionHelpers
from google.cloud.vision_helpers.decorators import add_single_feature_methods\n
from .services.image_annotator import ImageAnnotatorAsyncClient
from .services.image_annotator import ImageAnnotatorClient as IacImageAnnotatorClient
count: 5
- paths: [
packages/google-cloud-vision/google/cloud/vision_v1/__init__.py,
packages/google-cloud-vision/google/cloud/vision_v1p1beta1/__init__.py,
packages/google-cloud-vision/google/cloud/vision_v1p2beta1/__init__.py,
packages/google-cloud-vision/google/cloud/vision_v1p3beta1/__init__.py,
packages/google-cloud-vision/google/cloud/vision_v1p4beta1/__init__.py,
]
before: |
\)\n
__all__ = \(
after: |
)\n\n
@add_single_feature_methods
class ImageAnnotatorClient(VisionHelpers, IacImageAnnotatorClient):
__doc__ = IacImageAnnotatorClient.__doc__
Feature = Feature\n\n
__all__ = (
count: 5
- paths: [
"packages/google-cloud-translate/setup.py"
]
before: |
dependencies = \[
"google-api-core\[grpc\] >= 2.11.0, <3.0.0",
# Exclude incompatible versions of `google-auth`
# See https://github.com/googleapis/google-cloud-python/issues/12364
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
"grpcio >= 1.33.2, < 2.0.0",
after: |
dependencies = [
"google-api-core[grpc] >= 2.11.0, <3.0.0",
# Exclude incompatible versions of `google-auth`
# See https://github.com/googleapis/google-cloud-python/issues/12364
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
"google-cloud-core >= 2.0.0, <3.0.0",
"grpcio >= 1.33.2, < 2.0.0",
count: 1
- paths: [
"packages/google-cloud-translate/testing/constraints-3.9.txt"
]
before: |
proto-plus==1.22.3
protobuf==4.25.8
after: |
proto-plus==1.22.3
google-cloud-core==2.0.0
protobuf==4.25.8
count: 1
- paths: [
"packages/google-cloud-translate/docs/index.rst",
]
before: |
API Reference
-------------
.. toctree::
:maxdepth: 2
translate_v3/services_
translate_v3/types_
API Reference
-------------
.. toctree::
:maxdepth: 2
translate_v2/services_
translate_v2/types_
API Reference
-------------
.. toctree::
:maxdepth: 2
translate_v3beta1/services_
translate_v3beta1/types_
after: |
API Reference
-------------
.. toctree::
:maxdepth: 2
translate_v3/services_
translate_v3/types_
API Reference
-------------
.. toctree::
:maxdepth: 2
v2
API Reference
-------------
.. toctree::
:maxdepth: 2
translate_v3beta1/services_
translate_v3beta1/types_
count: 1
- paths: [
packages/google-cloud-speech/google/cloud/speech_v1/__init__.py,
packages/google-cloud-speech/google/cloud/speech_v1p1beta1/__init__.py,
]
before: |
\)
__all__ = \(
after: |
)
from google.cloud.speech_v1.helpers import SpeechHelpers\n\n
# This class merges the auto-generated GAPIC client with handwritten helper methods.
# We ignore [misc] because mypy is flagging that both parent classes have a method
# named `streaming_recognize`,
# but their type signatures don't match.
# We ignore [no-redef] because of the name shadow with SpeechClient. We don't want
# to expose the GAPIC client without the helpers.
class SpeechClient(SpeechHelpers, SpeechClient): # type: ignore[no-redef, misc]
__doc__ = SpeechClient.__doc__\n\n
__all__ = (
count: 2
- paths: [
packages/google-cloud-speech/google/cloud/speech/__init__.py,
]
before: |
from google.cloud.speech_v1.services.speech.client import SpeechClient
after: |
from google.cloud.speech_v1 import SpeechClient
count: 1
- paths: [
packages/google-cloud-monitoring/setup.py,
]
before: extras = \{\}
after: |
extras = {"pandas": "pandas >= 1.1.3"}
count: 1
- paths: [
packages/google-cloud-monitoring/testing/constraints-3.9.txt,
]
before: |
google-api-core==2.21.0
google-auth==2.35.0
after: |
google-api-core==2.21.0
pandas==1.1.3
# numpy is a dependency of pandas
numpy==1.19.3
google-auth==2.35.0
count: 1
- paths: [
packages/google-cloud-monitoring/noxfile.py,
]
before: |
UNIT_TEST_EXTRAS: List\[str\] = \[\]
after: |
UNIT_TEST_EXTRAS: List[str] = ["pandas"]
count: 1
- paths: [
packages/google-cloud-monitoring/docs/index.rst,
]
before: |
API Reference
-------------
.. toctree::
:maxdepth: 2
monitoring_v3/services_
monitoring_v3/types_
after: |
API Reference
-------------
.. toctree::
:maxdepth: 2
query.rst
monitoring_v3/services_
monitoring_v3/types_
count: 1
- paths: [
packages/google-cloud-automl/setup.py,
]
before: extras = \{\}
after: |
extras = {
"libcst": "libcst >= 0.2.5",
"pandas": ["pandas>=1.1.3"],
"storage": ["google-cloud-storage >=2.14.0, <4.0.0"],
}
count: 1
- paths: [
packages/google-cloud-automl/testing/constraints-3.9.txt,
]
before: |
google-api-core==2.21.0
google-auth==2.35.0
after: |
google-api-core==2.21.0
google-cloud-storage==2.14.0
libcst==0.2.5
pandas==1.1.3
# numpy is a dependency of pandas
numpy==1.19.3
google-auth==2.35.0
count: 1
- paths: [
packages/google-cloud-automl/docs/automl_v1beta1/services_.rst,
]
before: |
Services for Google Cloud Automl v1beta1 API
============================================
.. toctree::
:maxdepth: 2
auto_ml
prediction_service
after: |
Services for Google Cloud Automl v1beta1 API
============================================
.. toctree::
:maxdepth: 2
tables
auto_ml
prediction_service
count: 1
- paths: [
packages/google-cloud-automl/google/cloud/automl_v1beta1/__init__.py,
]
before: |
\)
from .types.annotation_payload import AnnotationPayload
after: |
)
from .services.tables.gcs_client import GcsClient
from .services.tables.tables_client import TablesClient
from .types.annotation_payload import AnnotationPayload
count: 1
- paths: [
packages/google-cloud-automl/google/cloud/automl_v1beta1/__init__.py,
]
before: |
__all__ = \(
"AutoMlAsyncClient",
after: |
__all__ = (
"GcsClient",
"TablesClient",
"AutoMlAsyncClient",
count: 1
- paths: [
packages/google-cloud-automl/noxfile.py,
]
before: |
UNIT_TEST_EXTRAS: List\[str\] = \[\]
after: |
UNIT_TEST_EXTRAS: List[str] = ["pandas", "storage"]
count: 1
- paths: [
packages/google-cloud-logging/noxfile.py,
]
before: |
SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List\[str\] = \[\]
after: |
SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [
"google-cloud-bigquery",
"google-cloud-pubsub",
"google-cloud-storage",
"google-cloud-testutils",
"opentelemetry-sdk",
]
count: 1
- paths: [
packages/google-cloud-automl/noxfile.py,
]
before: |
"types-protobuf",
\ \)
after: |
"types-protobuf",
"pandas-stubs",
)
count: 1
- paths: [
packages/google-cloud-monitoring/noxfile.py,
]
before: |
"types-protobuf",
\ \)
after: |
"types-protobuf",
"pandas-stubs",
)
count: 1
- paths: [
packages/google-cloud-bigquery-storage/noxfile.py,
]
before: |
"types-protobuf",
\ \)
\ session.install\("."\)
after: |
"types-protobuf",
"pandas-stubs",
)
session.install(".[fastavro]")
count: 1
- paths: [
"packages/google-cloud-error-reporting/setup.py"
]
before: |
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
"grpcio >= 1.33.2, < 2.0.0",
after: |
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
"google-cloud-logging>=3.9.0, <4.0.0",
"grpcio >= 1.33.2, < 2.0.0",
count: 1
- paths: [
packages/google-cloud-error-reporting/testing/constraints-3.9.txt,
]
before: |
google-api-core==2.21.0
google-auth==2.35.0
after: |
google-api-core==2.21.0
google-cloud-logging==3.9.0
google-auth==2.35.0
count: 1
- paths: [
"packages/google-cloud-error-reporting/docs/index.rst",
]
before: |
API Reference
-------------
.. toctree::
:maxdepth: 2
errorreporting_v1beta1/services_
errorreporting_v1beta1/types_
Changelog
after: |
Usage Documentation
-------------------
.. toctree::
:maxdepth: 2
usage
API Reference
-------------
.. toctree::
:maxdepth: 2
client
util
errorreporting_v1beta1/services_
errorreporting_v1beta1/types_
Changelog
count: 1
- paths: [
"packages/google-cloud-bigquery-storage/noxfile.py",
]
before: '\n "--check-untyped-defs",'
after: '\n # TODO(https://github.com/googleapis/google-cloud-python/issues/16083)\n # "--check-untyped-defs",'
count: 1
- paths: [
"packages/google-cloud-datastore/noxfile.py",
]
before: '\n "--check-untyped-defs",'
after: '\n # TODO(https://github.com/googleapis/google-cloud-python/issues/16083)\n # "--check-untyped-defs",'
count: 1
- paths: [
"packages/google-cloud-error-reporting/noxfile.py",
]
before: '\n "--check-untyped-defs",'
after: '\n # TODO(https://github.com/googleapis/google-cloud-python/issues/16083)\n # "--check-untyped-defs",'
count: 1
- paths: [
"packages/google-cloud-monitoring-dashboards/noxfile.py",
]
before: '\n "--check-untyped-defs",'
after: '\n # TODO(https://github.com/googleapis/google-cloud-python/issues/16083)\n # "--check-untyped-defs",'
count: 1
- paths: [
"packages/google-cloud-monitoring/noxfile.py",
]
before: '\n "--check-untyped-defs",'
after: '\n # TODO(https://github.com/googleapis/google-cloud-python/issues/16083)\n # "--check-untyped-defs",'
count: 1
- paths: [
"packages/google-cloud-speech/noxfile.py",
]
before: '\n "--check-untyped-defs",'
after: '\n # TODO(https://github.com/googleapis/google-cloud-python/issues/16083)\n # "--check-untyped-defs",'
count: 1
- paths: [
"packages/google-cloud-vision/noxfile.py",
]
before: '\n "--check-untyped-defs",'
after: '\n # TODO(https://github.com/googleapis/google-cloud-python/issues/16083)\n # "--check-untyped-defs",'
count: 1