-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add gapic metadata file #781
Conversation
The GAPIC metadata file is used to track code, samples, and test coverage for every RPC and library method.
Note: hand testing of the generated file indicates that it is valid JSON and behaves in a reasonable manner. |
Codecov Report
@@ Coverage Diff @@
## master #781 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 26 27 +1
Lines 1608 1645 +37
Branches 328 336 +8
=========================================
+ Hits 1608 1645 +37
Continue to review full report at Codecov.
|
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.
Looks good, but I just have to ask: is it not practical to populate a metadata proto object with the data and then serialize it to JSON? That way we're more tightly tied to the source of truth (the .proto) and we don't have to worry about presentation logic ourselves. I want to avoid shutting the .proto out of the loop, as it's conceivable we may want to add items later. (That said, if there's a practical reason for emitting straight JSON, that's fine, but let's mention it in the PR.)
gapic/ads-templates/%namespace/%name/%version/gapic_metadata.json.j2
Outdated
Show resolved
Hide resolved
There is no deep reason for emitting straight JSON. |
NOTE: in light of a design doc reread, this PR is on hold until https://pypi.org/project/googleapis-common-protos/ is updated to include the python binding for |
Any updates or blockers on the the googleapis-common-protos issue? |
@software-dov Opened googleapis/python-api-common-protos#38. If you'd like to try a pip VCS install |
Approved the change to api-common-protos and just about to experiment with the it in local code. |
The GAPIC metadata file is used to track code, samples, and test coverage for every RPC and library method.
The updated api-common-protos seems to be fine. |
This is a severely truncated sample from Bigtable Admin: {
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
"language": "python",
"libraryPackage": "google.bigtable.admin_v2",
"protoPackage": "google.bigtable.admin.v2",
"schema": "1.0",
"services": {
"BigtableTableAdmin": {
"clients": {
"grpc": {
"libraryClient": "BigtableTableAdminClient",
"rpcs": {
"CheckConsistency": {
"methods": [
"check_consistency"
]
},
"CreateBackup": {
"methods": [
"create_backup"
]
},
"CreateTable": {
"methods": [
"create_table"
]
},
}
},
"grpcAsync": {
"libraryClient": "BigtableTableAdminAsyncClient",
"rpcs": {
"CheckConsistency": {
"methods": [
"check_consistency"
]
},
"CreateBackup": {
"methods": [
"create_backup"
]
},
"CreateTable": {
"methods": [
"create_table"
]
},
}
}
}
}
}
} |
🤖 I have created a release \*beep\* \*boop\* --- ## [0.41.0](https://www.github.com/googleapis/gapic-generator-python/compare/v0.40.12...v0.41.0) (2021-03-02) ### Features * add gapic metadata file ([#781](https://www.github.com/googleapis/gapic-generator-python/issues/781)) ([5dd8fcc](https://www.github.com/googleapis/gapic-generator-python/commit/5dd8fccf6b4da57edef0347beb07102634daa992)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Looks good. One minor suggestion.
(Apologies for not getting to this earlier.)
The GAPIC metadata file is used to track code, samples, and test
coverage for every RPC and library method.