Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 10ecc44

Browse files
authored
fix: remove unused YAML fields to fix presubmit (#265)
* fix: remove unused YAML fields for repo * test: remove patch on goldens test for repo * test: update goldens
1 parent ff8902e commit 10ecc44

200 files changed

Lines changed: 0 additions & 3059 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docfx_yaml/extension.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -935,11 +935,6 @@ def _update_friendly_package_name(path):
935935
'name': short_name,
936936
'fullName': name,
937937
'source': {
938-
'remote': {
939-
'path': path,
940-
'branch': app.env.docfx_branch,
941-
'repo': app.env.docfx_remote,
942-
},
943938
'id': short_name,
944939
'path': path,
945940
'startLine': start_line,
@@ -1735,11 +1730,6 @@ def convert_module_to_package_if_needed(obj):
17351730
except NameError:
17361731
pass
17371732

1738-
if 'source' in obj and (not obj['source']['remote']['repo'] or \
1739-
obj['source']['remote']['repo'] == 'https://apidrop.visualstudio.com/Content%20CI/_git/ReferenceAutomation'):
1740-
del(obj['source'])
1741-
1742-
17431733
# Extract any missing cross references where applicable.
17441734
# Potential targets are instances of full uid shown, or
17451735
# if we find a short form of the uid of one of current

tests/test_goldens.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,6 @@ def test_goldens(update_goldens, test_dir):
9797

9898
if update_goldens:
9999
shutil.rmtree(golden_dir, ignore_errors=True)
100-
files_to_move = out_dir.rglob("*")
101-
102-
# Overwrite incorrect repo data used compared to GH Action.
103-
incorrect_repo = "git@github.com:googleapis/sphinx-docfx-yaml.git"
104-
correct_repo = "https://github.com/googleapis/sphinx-docfx-yaml"
105-
106-
for yaml_file in files_to_move:
107-
with open(yaml_file) as file:
108-
lines = file.read()
109-
lines = lines.replace(incorrect_repo, correct_repo)
110-
with open(yaml_file, 'w') as file:
111-
file.write(lines)
112-
113100
shutil.copytree(out_dir, golden_dir, dirs_exist_ok=True)
114101
pytest.skip(
115102
"Updated goldens! Re-run the test without the --update-goldens flag."

tests/testdata/goldens/gapic-auto/google.cloud.texttospeech_v1.services.text_to_speech.TextToSpeechAsyncClient.yml

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ items:
3535
source:
3636
id: TextToSpeechAsyncClient
3737
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py
38-
remote:
39-
branch: add_goldens
40-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py
41-
repo: https://github.com/googleapis/sphinx-docfx-yaml
4238
startLine: 41
4339
summary: 'Service that implements Google Cloud Text-to-Speech API.
4440
@@ -65,10 +61,6 @@ items:
6561
source:
6662
id: TextToSpeechAsyncClient
6763
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py
68-
remote:
69-
branch: add_goldens
70-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py
71-
repo: https://github.com/googleapis/sphinx-docfx-yaml
7264
startLine: 41
7365
summary: 'Instantiates the text to speech client.
7466
@@ -117,10 +109,6 @@ items:
117109
source:
118110
id: common_billing_account_path
119111
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
120-
remote:
121-
branch: add_goldens
122-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
123-
repo: https://github.com/googleapis/sphinx-docfx-yaml
124112
startLine: 185
125113
summary: 'Returns a fully-qualified billing_account string.
126114
@@ -141,10 +129,6 @@ items:
141129
source:
142130
id: common_folder_path
143131
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
144-
remote:
145-
branch: add_goldens
146-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
147-
repo: https://github.com/googleapis/sphinx-docfx-yaml
148132
startLine: 200
149133
summary: 'Returns a fully-qualified folder string.
150134
@@ -165,10 +149,6 @@ items:
165149
source:
166150
id: common_location_path
167151
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
168-
remote:
169-
branch: add_goldens
170-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
171-
repo: https://github.com/googleapis/sphinx-docfx-yaml
172152
startLine: 245
173153
summary: 'Returns a fully-qualified location string.
174154
@@ -189,10 +169,6 @@ items:
189169
source:
190170
id: common_organization_path
191171
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
192-
remote:
193-
branch: add_goldens
194-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
195-
repo: https://github.com/googleapis/sphinx-docfx-yaml
196172
startLine: 215
197173
summary: 'Returns a fully-qualified organization string.
198174
@@ -213,10 +189,6 @@ items:
213189
source:
214190
id: common_project_path
215191
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
216-
remote:
217-
branch: add_goldens
218-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
219-
repo: https://github.com/googleapis/sphinx-docfx-yaml
220192
startLine: 230
221193
summary: 'Returns a fully-qualified project string.
222194
@@ -237,10 +209,6 @@ items:
237209
source:
238210
id: from_service_account_file
239211
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py
240-
remote:
241-
branch: add_goldens
242-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py
243-
repo: https://github.com/googleapis/sphinx-docfx-yaml
244212
startLine: 87
245213
summary: "Creates an instance of this client using the provided credentials\n \
246214
\ file.\n"
@@ -265,10 +233,6 @@ items:
265233
source:
266234
id: from_service_account_info
267235
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py
268-
remote:
269-
branch: add_goldens
270-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py
271-
repo: https://github.com/googleapis/sphinx-docfx-yaml
272236
startLine: 72
273237
summary: "Creates an instance of this client using the provided credentials\n \
274238
\ info.\n"
@@ -293,10 +257,6 @@ items:
293257
source:
294258
id: from_service_account_json
295259
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py
296-
remote:
297-
branch: add_goldens
298-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py
299-
repo: https://github.com/googleapis/sphinx-docfx-yaml
300260
startLine: 87
301261
summary: "Creates an instance of this client using the provided credentials\n \
302262
\ file.\n"
@@ -321,10 +281,6 @@ items:
321281
source:
322282
id: get_mtls_endpoint_and_cert_source
323283
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py
324-
remote:
325-
branch: add_goldens
326-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py
327-
repo: https://github.com/googleapis/sphinx-docfx-yaml
328284
startLine: 105
329285
summary: 'Return the API endpoint and client cert source for mutual TLS.
330286
@@ -390,10 +346,6 @@ items:
390346
source:
391347
id: get_transport_class
392348
path: null
393-
remote:
394-
branch: add_goldens
395-
path: null
396-
repo: https://github.com/googleapis/sphinx-docfx-yaml
397349
startLine: null
398350
summary: 'Returns an appropriate transport class.
399351
@@ -413,10 +365,6 @@ items:
413365
source:
414366
id: list_voices
415367
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py
416-
remote:
417-
branch: add_goldens
418-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py
419-
repo: https://github.com/googleapis/sphinx-docfx-yaml
420368
startLine: 201
421369
summary: "Returns a list of Voice supported for synthesis.\n\n```python\n# This\
422370
\ snippet has been automatically generated and should be regarded as a\n# code\
@@ -477,10 +425,6 @@ items:
477425
source:
478426
id: model_path
479427
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
480-
remote:
481-
branch: add_goldens
482-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
483-
repo: https://github.com/googleapis/sphinx-docfx-yaml
484428
startLine: 163
485429
summary: 'Returns a fully-qualified model string.
486430
@@ -501,10 +445,6 @@ items:
501445
source:
502446
id: parse_common_billing_account_path
503447
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
504-
remote:
505-
branch: add_goldens
506-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
507-
repo: https://github.com/googleapis/sphinx-docfx-yaml
508448
startLine: 194
509449
summary: 'Parse a billing_account path into its component segments.
510450
@@ -525,10 +465,6 @@ items:
525465
source:
526466
id: parse_common_folder_path
527467
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
528-
remote:
529-
branch: add_goldens
530-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
531-
repo: https://github.com/googleapis/sphinx-docfx-yaml
532468
startLine: 209
533469
summary: 'Parse a folder path into its component segments.
534470
@@ -549,10 +485,6 @@ items:
549485
source:
550486
id: parse_common_location_path
551487
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
552-
remote:
553-
branch: add_goldens
554-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
555-
repo: https://github.com/googleapis/sphinx-docfx-yaml
556488
startLine: 256
557489
summary: 'Parse a location path into its component segments.
558490
@@ -573,10 +505,6 @@ items:
573505
source:
574506
id: parse_common_organization_path
575507
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
576-
remote:
577-
branch: add_goldens
578-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
579-
repo: https://github.com/googleapis/sphinx-docfx-yaml
580508
startLine: 224
581509
summary: 'Parse a organization path into its component segments.
582510
@@ -597,10 +525,6 @@ items:
597525
source:
598526
id: parse_common_project_path
599527
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
600-
remote:
601-
branch: add_goldens
602-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
603-
repo: https://github.com/googleapis/sphinx-docfx-yaml
604528
startLine: 239
605529
summary: 'Parse a project path into its component segments.
606530
@@ -621,10 +545,6 @@ items:
621545
source:
622546
id: parse_model_path
623547
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
624-
remote:
625-
branch: add_goldens
626-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/client.py
627-
repo: https://github.com/googleapis/sphinx-docfx-yaml
628548
startLine: 176
629549
summary: 'Parses a model path into its component segments.
630550
@@ -645,10 +565,6 @@ items:
645565
source:
646566
id: synthesize_speech
647567
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py
648-
remote:
649-
branch: add_goldens
650-
path: tests/testdata/gapic-auto/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py
651-
repo: https://github.com/googleapis/sphinx-docfx-yaml
652568
startLine: 303
653569
summary: "Synthesizes speech synchronously: receive results\nafter all text input\
654570
\ has been processed.\n\n```python\n# This snippet has been automatically generated\
@@ -723,10 +639,6 @@ items:
723639
source:
724640
id: transport
725641
path: null
726-
remote:
727-
branch: add_goldens
728-
path: null
729-
repo: https://github.com/googleapis/sphinx-docfx-yaml
730642
startLine: null
731643
summary: 'Returns the transport used by the client instance.
732644

0 commit comments

Comments
 (0)