-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use template excludes in generation config (#2453)
In this PR: - Modify `generate_prerequisite_files` to render `owlbot.py` using template excludes from `GenerationConfig`, rather than hard code the excludes. - Add unit tests to verify `from_yaml` method.
- Loading branch information
1 parent
33ba423
commit ed21464
Showing
20 changed files
with
235 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
library_generation/test/resources/test-config/config_without_api_description.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
gapic_generator_version: 2.34.0 | ||
libraries: | ||
- api_shortname: apigeeconnect | ||
GAPICs: | ||
- proto_path: google/cloud/apigeeconnect/v1 |
4 changes: 4 additions & 0 deletions
4
library_generation/test/resources/test-config/config_without_api_shortname.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
gapic_generator_version: 2.34.0 | ||
libraries: | ||
- GAPICs: | ||
- proto_path: google/cloud/apigeeconnect/v1 |
3 changes: 3 additions & 0 deletions
3
library_generation/test/resources/test-config/config_without_gapics.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
gapic_generator_version: 2.34.0 | ||
libraries: | ||
random_key: |
7 changes: 7 additions & 0 deletions
7
library_generation/test/resources/test-config/config_without_generator.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
libraries: | ||
- api_shortname: apigeeconnect | ||
name_pretty: Apigee Connect | ||
api_description: "allows the Apigee hybrid management" | ||
product_documentation: "https://cloud.google.com/apigee/docs/hybrid/v1.3/apigee-connect/" | ||
GAPICs: | ||
- proto_path: google/cloud/apigeeconnect/v1 |
8 changes: 8 additions & 0 deletions
8
library_generation/test/resources/test-config/config_without_googleapis.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
gapic_generator_version: 2.34.0 | ||
libraries: | ||
- api_shortname: apigeeconnect | ||
name_pretty: Apigee Connect | ||
api_description: "allows the Apigee hybrid management" | ||
product_documentation: "https://cloud.google.com/apigee/docs/hybrid/v1.3/apigee-connect/" | ||
GAPICs: | ||
- proto_path: google/cloud/apigeeconnect/v1 |
1 change: 1 addition & 0 deletions
1
library_generation/test/resources/test-config/config_without_libraries.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
gapic_generator_version: 2.34.0 |
6 changes: 6 additions & 0 deletions
6
library_generation/test/resources/test-config/config_without_name_pretty.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
gapic_generator_version: 2.34.0 | ||
libraries: | ||
- api_shortname: apigeeconnect | ||
api_description: "allows the Apigee hybrid management" | ||
GAPICs: | ||
- proto_path: google/cloud/apigeeconnect/v1 |
9 changes: 9 additions & 0 deletions
9
library_generation/test/resources/test-config/config_without_owlbot.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
gapic_generator_version: 2.34.0 | ||
googleapis_commitish: 1a45bf7393b52407188c82e63101db7dc9c72026 | ||
libraries: | ||
- api_shortname: apigeeconnect | ||
name_pretty: Apigee Connect | ||
api_description: "allows the Apigee hybrid management" | ||
product_documentation: "https://cloud.google.com/apigee/docs/hybrid/v1.3/apigee-connect/" | ||
GAPICs: | ||
- proto_path: google/cloud/apigeeconnect/v1 |
7 changes: 7 additions & 0 deletions
7
library_generation/test/resources/test-config/config_without_product_docs.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
gapic_generator_version: 2.34.0 | ||
libraries: | ||
- api_shortname: apigeeconnect | ||
name_pretty: Apigee Connect | ||
api_description: "allows the Apigee hybrid management" | ||
GAPICs: | ||
- proto_path: google/cloud/apigeeconnect/v1 |
4 changes: 4 additions & 0 deletions
4
library_generation/test/resources/test-config/config_without_proto_path.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
gapic_generator_version: 2.34.0 | ||
libraries: | ||
- GAPICs: | ||
- random_key: |
10 changes: 10 additions & 0 deletions
10
library_generation/test/resources/test-config/config_without_synthtool.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
gapic_generator_version: 2.34.0 | ||
googleapis_commitish: 1a45bf7393b52407188c82e63101db7dc9c72026 | ||
owlbot_cli_image: sha256:623647ee79ac605858d09e60c1382a716c125fb776f69301b72de1cd35d49409 | ||
libraries: | ||
- api_shortname: apigeeconnect | ||
name_pretty: Apigee Connect | ||
api_description: "allows the Apigee hybrid management" | ||
product_documentation: "https://cloud.google.com/apigee/docs/hybrid/v1.3/apigee-connect/" | ||
GAPICs: | ||
- proto_path: google/cloud/apigeeconnect/v1 |
11 changes: 11 additions & 0 deletions
11
library_generation/test/resources/test-config/config_without_temp_excludes.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
gapic_generator_version: 2.34.0 | ||
googleapis_commitish: 1a45bf7393b52407188c82e63101db7dc9c72026 | ||
owlbot_cli_image: sha256:623647ee79ac605858d09e60c1382a716c125fb776f69301b72de1cd35d49409 | ||
synthtool_commitish: 6612ab8f3afcd5e292aecd647f0fa68812c9f5b5 | ||
libraries: | ||
- api_shortname: apigeeconnect | ||
name_pretty: Apigee Connect | ||
api_description: "allows the Apigee hybrid management" | ||
product_documentation: "https://cloud.google.com/apigee/docs/hybrid/v1.3/apigee-connect/" | ||
GAPICs: | ||
- proto_path: google/cloud/apigeeconnect/v1 |
34 changes: 34 additions & 0 deletions
34
library_generation/test/resources/test-config/generation_config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
gapic_generator_version: 2.34.0 | ||
protobuf_version: 25.2 | ||
googleapis_commitish: 1a45bf7393b52407188c82e63101db7dc9c72026 | ||
owlbot_cli_image: sha256:623647ee79ac605858d09e60c1382a716c125fb776f69301b72de1cd35d49409 | ||
synthtool_commitish: 6612ab8f3afcd5e292aecd647f0fa68812c9f5b5 | ||
template_excludes: | ||
- ".github/*" | ||
- ".kokoro/*" | ||
- "samples/*" | ||
- "CODE_OF_CONDUCT.md" | ||
- "CONTRIBUTING.md" | ||
- "LICENSE" | ||
- "SECURITY.md" | ||
- "java.header" | ||
- "license-checks.xml" | ||
- "renovate.json" | ||
- ".gitignore" | ||
libraries: | ||
- api_shortname: cloudasset | ||
name_pretty: Cloud Asset Inventory | ||
product_documentation: "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview" | ||
api_description: "provides inventory services based on a time series database." | ||
library_name: "asset" | ||
client_documentation: "https://cloud.google.com/java/docs/reference/google-cloud-asset/latest/overview" | ||
distribution_name: "com.google.cloud:google-cloud-asset" | ||
release_level: "stable" | ||
issue_tracker: "https://issuetracker.google.com/issues/new?component=187210&template=0" | ||
api_reference: "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview" | ||
GAPICs: | ||
- proto_path: google/cloud/asset/v1 | ||
- proto_path: google/cloud/asset/v1p1beta1 | ||
- proto_path: google/cloud/asset/v1p2beta1 | ||
- proto_path: google/cloud/asset/v1p5beta1 | ||
- proto_path: google/cloud/asset/v1p7beta1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters