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

samples: add samples from pubsub/cloud-client #151

Merged
merged 102 commits into from
Jul 10, 2020

Conversation

plamut
Copy link
Contributor

@plamut plamut commented Jul 10, 2020

Closes #136.
Towards #131.

Samples from https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/pubsub/cloud-client


IMPORTANT: When merging, use the rebase and merge option to preserve the samples commit history!


This PR is a follow-up to #134 that was merged by squashing all the commits from the samples repo. The first commit reverts the (squashed) merged changes, while the rest are the commits from the original PR rebased onto that reversal commit. The PR thus also replaces #141.

plamut and others added 30 commits July 10, 2020 14:30
This reverts commit e204b86.

We want to merge the samples branch *unsquashed* to preserve
samples commit history.
Change-Id: I38b90c10aef72c37188c4520897302933b9d2ea7
Change-Id: Ie95e2e1556a8d97b5321dc86bf8de431aa36a2d5
Change-Id: I12c407d3cdf4a3f9736dfaeca6f20b31df6d310a
Change-Id: Ifebdab0b974cc3d3fe8900a23ca7416fed9e026a
Change-Id: I7dfe60b0f1240dc58a664968fd97ca5a8fa1109d
…hon-docs-samples#1004)

* Auto-update dependencies.

* Fix natural language samples

* Fix pubsub iam samples

* Fix language samples

* Fix bigquery samples
…hon-docs-samples#1055)

* Auto-update dependencies.

* Explicitly use latest bigtable client

Change-Id: Id71e9e768f020730e4ca9514a0d7ebaa794e7d9e

* Revert language update for now

Change-Id: I8867f154e9a5aae00d0047c9caf880e5e8f50c53

* Remove pdb. smh

Change-Id: I5ff905fadc026eebbcd45512d4e76e003e3b2b43
Change-Id: I776863091846ee8ff8a70078c8b8d5498cf81ed6
Change-Id: I149fc1242ceb6b2cff8eae7ef18b364dd5c26566
…orm/python-docs-samples#1158)

* Update Readme.rst to add Python setup guide

As requested in b/64770713.

This sample is linked in documentation https://cloud.google.com/bigtable/docs/scaling, and it would make more sense to update the guide here than in the documentation.

* Update README.rst

* Update README.rst

* Update README.rst

* Update README.rst

* Update README.rst

* Update install_deps.tmpl.rst

* Updated readmegen scripts and re-generated related README files

* Fixed the lint error
Change-Id: I0d420f3053f391fa225e4b8179e45fd1138f5c65
anguillanneuf and others added 7 commits July 10, 2020 14:36
…tform/python-docs-samples#3938)

* fix: make timeout an optional positional arg

* place `none` back in function signature

Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
…oogleCloudPlatform/python-docs-samples#4070)

Use a `with` block to wrap subscriber and describe its purpose. 

Internal bug: b/157401623
…Platform/python-docs-samples#4039)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [google-cloud-pubsub](https://togithub.com/googleapis/python-pubsub) | minor | `==1.5.0` -> `==1.6.0` |

---

### Release Notes

<details>
<summary>googleapis/python-pubsub</summary>

### [`v1.6.0`](https://togithub.com/googleapis/python-pubsub/blob/master/CHANGELOG.md#&#8203;160-httpswwwgithubcomgoogleapispython-pubsubcomparev150v160-2020-06-09)

[Compare Source](https://togithub.com/googleapis/python-pubsub/compare/v1.5.0...v1.6.0)

##### Features

-   Add flow control for message publishing ([#&#8203;96](https://www.github.com/googleapis/python-pubsub/issues/96)) ([06085c4](https://www.github.com/googleapis/python-pubsub/commit/06085c4083b9dccdd50383257799904510bbf3a0))

##### Bug Fixes

-   Fix PubSub incompatibility with api-core 1.17.0+ ([#&#8203;103](https://www.github.com/googleapis/python-pubsub/issues/103)) ([c02060f](https://www.github.com/googleapis/python-pubsub/commit/c02060fbbe6e2ca4664bee08d2de10665d41dc0b))

##### Documentation

-   Clarify that Schedulers shouldn't be used with multiple SubscriberClients ([#&#8203;100](https://togithub.com/googleapis/python-pubsub/pull/100)) ([cf9e87c](https://togithub.com/googleapis/python-pubsub/commit/cf9e87c80c0771f3fa6ef784a8d76cb760ad37ef))
-   Fix update subscription/snapshot/topic samples ([#&#8203;113](https://togithub.com/googleapis/python-pubsub/pull/113)) ([e62c38b](https://togithub.com/googleapis/python-pubsub/commit/e62c38bb33de2434e32f866979de769382dea34a))

##### Internal / Testing Changes

-   Re-generated service implementaton using synth: removed experimental notes from the RetryPolicy and filtering features in anticipation of GA, added DetachSubscription (experimental) ([#&#8203;114](https://togithub.com/googleapis/python-pubsub/pull/114)) ([0132a46](https://togithub.com/googleapis/python-pubsub/commit/0132a4680e0727ce45d5e27d98ffc9f3541a0962))
-   Incorporate will_accept() checks into publish() ([#&#8203;108](https://togithub.com/googleapis/python-pubsub/pull/108)) ([6c7677e](https://togithub.com/googleapis/python-pubsub/commit/6c7677ecb259672bbb9b6f7646919e602c698570))

</details>

---

### Renovate configuration

:date: **Schedule**: At any time (no schedule defined).

:vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

:recycle: **Rebasing**: Never, or you tick the rebase/retry checkbox.

:no_bell: **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#GoogleCloudPlatform/python-docs-samples).
@plamut plamut added the type: docs Improvement to the documentation for an API. label Jul 10, 2020
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Jul 10, 2020
This restores the chnge from 1cb6746 that got lost during
the branch restoration.
@plamut
Copy link
Contributor Author

plamut commented Jul 10, 2020

Also addressed the feedback by @sgerrand, cleaned up a few things in the samples.

Not entirely sure what the missing quickstart.py should contain, thus replaced it with two quickstart sections for Publisher and Subscriber (better than a missing file).

@plamut plamut marked this pull request as ready for review July 10, 2020 14:06
@plamut plamut requested a review from hongalex as a code owner July 10, 2020 14:06
@sgerrand
Copy link

Thanks @plamut!

@plamut plamut mentioned this pull request Jul 10, 2020
5 tasks
@plamut plamut added the release blocking Required feature/issue must be fixed prior to next release. label Jul 10, 2020
Copy link
Contributor

@anguillanneuf anguillanneuf left a comment

Choose a reason for hiding this comment

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

Thank you for the changes!

@plamut
Copy link
Contributor Author

plamut commented Jul 10, 2020

Somebody please also confirm that CLAs are in order :)

@busunkim96 busunkim96 added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Jul 10, 2020
@busunkim96
Copy link
Contributor

Samples are being moved from GoogleCloudPlatform/python-docs-samples (CLAs were already obtained there).

@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

@plamut plamut merged commit 2588fa7 into googleapis:master Jul 10, 2020
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. release blocking Required feature/issue must be fixed prior to next release. type: docs Improvement to the documentation for an API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add pubsub/cloud-client samples from the samples repo