Skip to content
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 flag for gapic metadata #795

Merged

Conversation

software-dov
Copy link
Contributor

As per the design doc, gapic metadata should not be generated by
default, and should be gated by the 'metadata' flag.

When invoking the generator via protoc, toggle the metadata flag like so:
--python_gapic_opt="metadata"

Subsequent Bazel integration is WIP.

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Mar 2, 2021
@codecov
Copy link

codecov bot commented Mar 2, 2021

Codecov Report

Merging #795 (b56416b) into master (7c185e8) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #795   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           26        27    +1     
  Lines         1608      1649   +41     
  Branches       328       337    +9     
=========================================
+ Hits          1608      1649   +41     
Impacted Files Coverage Δ
gapic/utils/case.py 100.00% <ø> (ø)
gapic/utils/reserved_names.py 100.00% <ø> (ø)
gapic/generator/generator.py 100.00% <100.00%> (ø)
gapic/schema/api.py 100.00% <100.00%> (ø)
gapic/schema/wrappers.py 100.00% <100.00%> (ø)
gapic/utils/__init__.py 100.00% <100.00%> (ø)
gapic/utils/checks.py 100.00% <100.00%> (ø)
gapic/utils/options.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa2fdc0...b56416b. Read the comment docs.

As per the design doc, gapic metadata should not be generated by
default, and should be gated by the 'metadata' flag.

When invoking the generator via protoc, toggle the metadata flag like so:
--python_gapic_opt="metadata"

Subsequent Bazel integration is WIP.
Copy link
Contributor

@vchudnov-g vchudnov-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for doing this!

Before turning on the metadata file, we should resolve the issue in the other pr about the dual transports.

gapic/utils/options.py Outdated Show resolved Hide resolved
tests/unit/generator/test_generator.py Outdated Show resolved Hide resolved
@software-dov software-dov added the automerge Merge the pull request once unit tests and other checks pass. label Mar 3, 2021
@gcf-merge-on-green gcf-merge-on-green bot merged commit 9cd7664 into googleapis:master Mar 3, 2021
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants