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

PubSub: Document batch settings, make synth operations idempotent #8448

Merged
merged 3 commits into from
Jun 20, 2019

Conversation

plamut
Copy link
Contributor

@plamut plamut commented Jun 20, 2019

This PR makes sure that BatchSettings settings are properly documented in the generated documentation. It also fixes multiple repeated blocks for adding FlowControl docstrings (supersedes #8447).

How to test

Steps to perform:

(from inside the pubsub/ directory)

  • Install the synthtool and run it.
  • Run the synthtool a few more times.
  • Generate the pubsub docs locally:
    $ nox -f noxfile.py -s docs
    
  • Open the generated docs for BatchSettings:
    $ chromium-browser "file://$GOOG_CLOUD_PYTHON_DIR/pubsub/docs/_build/html/types.html#google.cloud.pubsub_v1.types.BatchSettings"
    

Actual result (before the fix):

  • A new code block for injecting FlowControl docstrings is added after every synthtool run, growing the file indefinitely.
  • BatchSettings attributes only have uninformative generic descriptions.

Expected result (after the fix):

  • No new code is added to types.py by the synthtool.
  • The BatchSettings type and its attributes have nice descriptions (as opposed to the current docs).

plamut added 2 commits June 20, 2019 15:52
This commit assures that the code block for injecting FlowControl docs
is not added on every synth tool run - it is only added if one does not
exist yet.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 20, 2019
pubsub/synth.py Outdated Show resolved Hide resolved
@plamut plamut requested a review from tseaver June 20, 2019 16:29
@plamut plamut merged commit d7a1e50 into googleapis:master Jun 20, 2019
@plamut plamut deleted the document-batch-settings branch June 21, 2019 10:30
@plamut plamut added the api: pubsub Issues related to the Pub/Sub API. label Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants