Skip to content
This repository has been archived by the owner on Oct 29, 2023. It is now read-only.

Commit

Permalink
chore: move samples from python-docs-sample (#28)
Browse files Browse the repository at this point in the history
* Cloud iot core [(#946)](GoogleCloudPlatform/python-docs-samples#946)

* Initial commit.

* Changes oauth2 client

* Fixes google.auth and addresses changes in v1beta1

* Adds tests, CLI, and fixes some tiny bugs. [(#973)](GoogleCloudPlatform/python-docs-samples#973)

* Adds tests, CLI, and fixes some tiny bugs.

* Fixes lint and adds fake certs for tests.

* Print is a function.

* I had to change something to retrigger tests

* Address review comments

* Import order style

* Auto-update dependencies. [(#1005)](GoogleCloudPlatform/python-docs-samples#1005)

* Auto-update dependencies.

* Fix bigtable lint

* Fix IOT iam interaction

* Auto-update dependencies. [(#1011)](GoogleCloudPlatform/python-docs-samples#1011)

* Auto-update dependencies. [(#1047)](GoogleCloudPlatform/python-docs-samples#1047)

* Auto-update dependencies. [(#1055)](GoogleCloudPlatform/python-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

* Gets API key, project ID, and service account JSON from environment [(#1064)](GoogleCloudPlatform/python-docs-samples#1064)

* Auto-update dependencies. [(#1094)](GoogleCloudPlatform/python-docs-samples#1094)

* Auto-update dependencies.

* Relax assertions in the ocr_nl sample

Change-Id: I6d37e5846a8d6dd52429cb30d501f448c52cbba1

* Drop unused logging apiary samples

Change-Id: I545718283773cb729a5e0def8a76ebfa40829d51

* Changes for snippets [(#1105)](GoogleCloudPlatform/python-docs-samples#1105)

* Removes START / END blocks for snippets.

* Fixes style

* Fixes IAM section for Python3 compatibility.

* Auto-update dependencies. [(#1109)](GoogleCloudPlatform/python-docs-samples#1109)

* Update all generated readme auth instructions [(#1121)](GoogleCloudPlatform/python-docs-samples#1121)

Change-Id: I03b5eaef8b17ac3dc3c0339fd2c7447bd3e11bd2

* Auto-update dependencies. [(#1133)](GoogleCloudPlatform/python-docs-samples#1133)

* Auto-update dependencies.

* Fix missing http library

Change-Id: I99faa600f2f3f1f50f57694fc9835d7f35bda250

* Final additions in private beta [(#1136)](GoogleCloudPlatform/python-docs-samples#1136)

* Final additions in private beta

* Adds HTTP client and state support

* Fixes rouge space

* Remove invalid message on error.

* Removes API key because discovery is now public [(#1140)](GoogleCloudPlatform/python-docs-samples#1140)

* Added Link to Python Setup Guide [(#1158)](GoogleCloudPlatform/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

* Auto-update dependencies. [(#1186)](GoogleCloudPlatform/python-docs-samples#1186)

* Updates pubsub client [(#1195)](GoogleCloudPlatform/python-docs-samples#1195)

* Updates pubsub client

* Fixes lint error.

* Fix linter errors

* Auto-update dependencies. [(#1208)](GoogleCloudPlatform/python-docs-samples#1208)

* Auto-update dependencies. [(#1217)](GoogleCloudPlatform/python-docs-samples#1217)

* Auto-update dependencies. [(#1239)](GoogleCloudPlatform/python-docs-samples#1239)

* Updated the certificate [(#1251)](GoogleCloudPlatform/python-docs-samples#1251)

* Added "Open in Cloud Shell" buttons to README files [(#1254)](GoogleCloudPlatform/python-docs-samples#1254)

* Adds set-config to manager sample [(#1275)](GoogleCloudPlatform/python-docs-samples#1275)

* Auto-update dependencies. [(#1282)](GoogleCloudPlatform/python-docs-samples#1282)

* Auto-update dependencies.

* Fix storage acl sample

Change-Id: I413bea899fdde4c4859e4070a9da25845b81f7cf

* Auto-update dependencies. [(#1309)](GoogleCloudPlatform/python-docs-samples#1309)

* Add sample to get config versions for a device. [(#1310)](GoogleCloudPlatform/python-docs-samples#1310)

* Trivial fix to Cloud IoT URL. [(#1302)](GoogleCloudPlatform/python-docs-samples#1302)

* Auto-update dependencies. [(#1320)](GoogleCloudPlatform/python-docs-samples#1320)

* Adds IAM examples for Python. [(#1318)](GoogleCloudPlatform/python-docs-samples#1318)

* MQTT Exponential backoff and manager updates [(#1345)](GoogleCloudPlatform/python-docs-samples#1345)

* Auto-update dependencies. [(#1355)](GoogleCloudPlatform/python-docs-samples#1355)

* Auto-update dependencies. [(#1359)](GoogleCloudPlatform/python-docs-samples#1359)

* Cleanup Cloud IoT region tags.

* Adds region to examples [(#1378)](GoogleCloudPlatform/python-docs-samples#1378)

* Auto-update dependencies.

* Regenerate the README files and fix the Open in Cloud Shell link for some samples [(#1441)](GoogleCloudPlatform/python-docs-samples#1441)

* fixes iot_list_registries closing region tag [(#1434)](GoogleCloudPlatform/python-docs-samples#1434)

* Update READMEs to fix numbering and add git clone [(#1464)](GoogleCloudPlatform/python-docs-samples#1464)

* Updates dependencies [(#1713)](GoogleCloudPlatform/python-docs-samples#1713)

* Updates dependencies
* Upgrades e2e dependencies

* Auto-update dependencies. [(#1846)](GoogleCloudPlatform/python-docs-samples#1846)

ACK, merging.

* Updates library versions and tests [(#1884)](GoogleCloudPlatform/python-docs-samples#1884)

* Updates library versions and tests

* Better reliability for flaky tests [(#1960)](GoogleCloudPlatform/python-docs-samples#1960)

* Increases reliability for flaky tests
* Replaces checks where device or gateway ID could affect test outcome.

* Migrates manager samples for Gateways from beta folder [(#1973)](GoogleCloudPlatform/python-docs-samples#1973)

* Migrates manager samples for Gateways from beta folder

* Migrates Gateway code to MQTT example [(#1977)](GoogleCloudPlatform/python-docs-samples#1977)

* Migrates Gateway code to MQTT example
* Refactors attach device and updates tests

* Auto-update dependencies. [(#1980)](GoogleCloudPlatform/python-docs-samples#1980)

* Auto-update dependencies.

* Update requirements.txt

* Update requirements.txt

* Remove stale test registries to avoid reaching limits [(#2159)](GoogleCloudPlatform/python-docs-samples#2159)

* Add cleanup step to tests to avoid hitting 100 registry limit
* Cleans up older test registries in case tests were cancelled and resources leaked
* Fixes broken style
* Renames includecode blocks to be ^iot(.*)

* Fix IoT parameters [(#2320)](GoogleCloudPlatform/python-docs-samples#2320)

* Fix list devices in IoT sample [(#2319)](GoogleCloudPlatform/python-docs-samples#2319)

* iot: switch to Cloud Client [(#2418)](GoogleCloudPlatform/python-docs-samples#2418)

* First part of Cloud client library migration, separating as this part affects tests

* Updates create / delete device methods to use Cloud client library [(#2420)](GoogleCloudPlatform/python-docs-samples#2420)

* Updates create / delete device methods to use Cloud client library

* Lint

* Adds split updates for Firebase ... opencensus [(#2438)](GoogleCloudPlatform/python-docs-samples#2438)

* Cloud client library migration for registry management features [(#2453)](GoogleCloudPlatform/python-docs-samples#2453)

* Cloud client library migration for registry management features

* Adds cloud client for remaining Cloud IoT Core apis [(#2479)](GoogleCloudPlatform/python-docs-samples#2479)

* Cleanly disconnect client before JWT expiration. [(#2622)](GoogleCloudPlatform/python-docs-samples#2622)

* Auto-update dependencies. [(#2005)](GoogleCloudPlatform/python-docs-samples#2005)

* Auto-update dependencies.

* Revert update of appengine/flexible/datastore.

* revert update of appengine/flexible/scipy

* revert update of bigquery/bqml

* revert update of bigquery/cloud-client

* revert update of bigquery/datalab-migration

* revert update of bigtable/quickstart

* revert update of compute/api

* revert update of container_registry/container_analysis

* revert update of dataflow/run_template

* revert update of datastore/cloud-ndb

* revert update of dialogflow/cloud-client

* revert update of dlp

* revert update of functions/imagemagick

* revert update of functions/ocr/app

* revert update of healthcare/api-client/fhir

* revert update of iam/api-client

* revert update of iot/api-client/gcs_file_to_device

* revert update of iot/api-client/mqtt_example

* revert update of language/automl

* revert update of run/image-processing

* revert update of vision/automl

* revert update testing/requirements.txt

* revert update of vision/cloud-client/detect

* revert update of vision/cloud-client/product_search

* revert update of jobs/v2/api_client

* revert update of jobs/v3/api_client

* revert update of opencensus

* revert update of translate/cloud-client

* revert update to speech/cloud-client

Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
Co-authored-by: Doug Mahugh <dmahugh@gmail.com>

* Replaces empty return value with string [(#2709)](GoogleCloudPlatform/python-docs-samples#2709)

* Replaces empty return value with string
Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>

* chore(deps): update dependency google-auth to v1.11.2 [(#2724)](GoogleCloudPlatform/python-docs-samples#2724)

Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>

* Iot flaky tests [(#3068)](GoogleCloudPlatform/python-docs-samples#3068)

* Checks if min_passes can be used now that we have swapped out devrel tools
* Replace imports.
* More random registry id

* chore(deps): update dependency google-cloud-iot to v0.3.1 [(#3159)](GoogleCloudPlatform/python-docs-samples#3159)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [google-cloud-iot](https://togithub.com/googleapis/python-iot) | patch | `==0.3.0` -> `==0.3.1` |

---

### Release Notes

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

### [`v0.3.1`](https://togithub.com/googleapis/python-iot/blob/master/CHANGELOG.md#&#8203;100httpswwwgithubcomgoogleapispython-iotcomparev031v100-2020-02-28)

[Compare Source](https://togithub.com/googleapis/python-iot/compare/v0.3.0...v0.3.1)

##### Features

-   bump release status to GA ([#&#8203;6](https://www.github.com/googleapis/python-iot/issues/6)) ([6793d49](https://www.github.com/googleapis/python-iot/commit/6793d493ec576191996c2e82c52ff549ee26347c))

##### [0.3.1](https://www.github.com/googleapis/python-iot/compare/v0.3.0...v0.3.1) (2020-02-06)

##### Bug Fixes

-   **iot:** modify retry and timeout configs; add 2.7 deprecation warning; add 'required' to docstring for required args; add 3.8 unit tests (via synth)  ([#&#8203;10069](https://www.github.com/googleapis/python-iot/issues/10069)) ([ce6f5cf](https://www.github.com/googleapis/python-iot/commit/ce6f5cf2c1611af179da8dba3f73b1f8dc1bb1e1))

</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).

* chore(deps): update dependency google-cloud-iot to v1 [(#3209)](GoogleCloudPlatform/python-docs-samples#3209)

Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>

* Simplify noxfile setup. [(#2806)](GoogleCloudPlatform/python-docs-samples#2806)

* chore(deps): update dependency requests to v2.23.0

* Simplify noxfile and add version control.

* Configure appengine/standard to only test Python 2.7.

* Update Kokokro configs to match noxfile.

* Add requirements-test to each folder.

* Remove Py2 versions from everything execept appengine/standard.

* Remove conftest.py.

* Remove appengine/standard/conftest.py

* Remove 'no-sucess-flaky-report' from pytest.ini.

* Add GAE SDK back to appengine/standard tests.

* Fix typo.

* Roll pytest to python 2 version.

* Add a bunch of testing requirements.

* Remove typo.

* Add appengine lib directory back in.

* Add some additional requirements.

* Fix issue with flake8 args.

* Even more requirements.

* Readd appengine conftest.py.

* Add a few more requirements.

* Even more Appengine requirements.

* Add webtest for appengine/standard/mailgun.

* Add some additional requirements.

* Add workaround for issue with mailjet-rest.

* Add responses for appengine/standard/mailjet.

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* Adds example parameters [(#3102)](GoogleCloudPlatform/python-docs-samples#3102)

* Adds example parameters to IoT Manager sample for appearance in documentation

Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>

* Remove oauth2client from IoT and Functions samples [(#3255)](GoogleCloudPlatform/python-docs-samples#3255)

* chore: remove oauth2client from functions and iot

* fix: fix import

* fix: correct syntax

* fix: correct import for service_account

* fix: fix path

* [iot] fix: mitigate flaky tests [(#3299)](GoogleCloudPlatform/python-docs-samples#3299)

* [iot] fix: mitigate flaky tests

* use uuid4 instead of time for resource name
* correctly use the pytest marker
* mark another test as flaky

Co-authored-by: Christopher Wilcox <crwilcox@google.com>

* Update dependency google-auth to v1.14.0 [(#3148)](GoogleCloudPlatform/python-docs-samples#3148)

Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>

* chore(deps): update dependency google-api-python-client to v1.8.0 [(#3100)](GoogleCloudPlatform/python-docs-samples#3100)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [google-api-python-client](https://togithub.com/google/google-api-python-client) | minor | `==1.7.11` -> `==1.8.0` |

---

### Release Notes

<details>
<summary>google/google-api-python-client</summary>

### [`v1.8.0`](https://togithub.com/google/google-api-python-client/releases/v1.8.0)

[Compare Source](https://togithub.com/google/google-api-python-client/compare/v1.7.12...v1.8.0)

Release to support API endpoint override.

  New Features

-   Add api endpoint override. ([#&#8203;829](https://togithub.com/googleapis/google-api-python-client/pull/829))

    Implementation Changes

-   Don't set http.redirect_codes if the attr doesn't exist and allow more httplib2 versions. ([#&#8203;841](https://togithub.com/googleapis/google-api-python-client/pull/841))

### [`v1.7.12`](https://togithub.com/google/google-api-python-client/releases/v1.7.12)

[Compare Source](https://togithub.com/google/google-api-python-client/compare/v1.7.11...v1.7.12)

Bugfix release

  Implementation Changes

-   Look for field 'detail' in error message. ([#&#8203;739](https://togithub.com/googleapis/google-api-python-client/pull/739))
-   Exclude 308s from httplib2 redirect codes list ([#&#8203;813](https://togithub.com/googleapis/google-api-python-client/pull/813))

    Documentation 

-   Remove oauth2client from docs ([#&#8203;738](https://togithub.com/googleapis/google-api-python-client/pull/738))
-   Fix typo. ([#&#8203;745](https://togithub.com/googleapis/google-api-python-client/pull/745))
-   Remove compatibility badges. ([#&#8203;746](https://togithub.com/googleapis/google-api-python-client/pull/746))
-   Fix TypeError: search_analytics_api_sample.py [#&#8203;732](https://togithub.com/google/google-api-python-client/issues/732) ([#&#8203;742](https://togithub.com/googleapis/google-api-python-client/pull/742))
-   Correct response access ([#&#8203;750](https://togithub.com/googleapis/google-api-python-client/pull/750))
-   Fix link to API explorer ([#&#8203;760](https://togithub.com/googleapis/google-api-python-client/pull/760))
-   Fix argument typo in oauth2 code example ([#&#8203;763](https://togithub.com/googleapis/google-api-python-client/pull/763))
-   Recommend install with virtualenv ([#&#8203;768](https://togithub.com/googleapis/google-api-python-client/pull/768))
-   Fix capitalization in docs/README.md ([#&#8203;770](https://togithub.com/googleapis/google-api-python-client/pull/770))

-   Remove compatibility badges ([#&#8203;796](https://togithub.com/googleapis/google-api-python-client/pull/796))
-   Remove mentions of pycrypto ([#&#8203;799](https://togithub.com/googleapis/google-api-python-client/pull/799))
-   Fix typo in model.py
-   Add note about Google Ads llibrary ([#&#8203;814](https://togithub.com/googleapis/google-api-python-client/pull/814))

  Internal / Testing Changes

-   Blacken ([#&#8203;772](https://togithub.com/googleapis/google-api-python-client/pull/722))
-   Move kokoro configs ([#&#8203;832](https://togithub.com/googleapis/google-api-python-client/pull/832))

</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).

* [iot] testing: re-raise the exception [(#3425)](GoogleCloudPlatform/python-docs-samples#3425)

fixes #3424

* chore(deps): update dependency cryptography to v2.9 [(#3266)](GoogleCloudPlatform/python-docs-samples#3266)

Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>

* Update dependency google-cloud-pubsub to v1.4.2 in functions and IoT [(#3342)](GoogleCloudPlatform/python-docs-samples#3342)

Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>

* chore(deps): update dependency cryptography to v2.9.1 [(#3463)](GoogleCloudPlatform/python-docs-samples#3463)

* Update dependency cryptography to v2.9.2 [(#3473)](GoogleCloudPlatform/python-docs-samples#3473)

* Update dependency google-api-python-client to v1.8.2 [(#3452)](GoogleCloudPlatform/python-docs-samples#3452)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [google-api-python-client](https://togithub.com/google/google-api-python-client) | patch | `==1.8.0` -> `==1.8.2` |
| [google-api-python-client](https://togithub.com/google/google-api-python-client) | minor | `==1.7.11` -> `==1.8.2` |

---

### Release Notes

<details>
<summary>google/google-api-python-client</summary>

### [`v1.8.2`](https://togithub.com/google/google-api-python-client/blob/master/CHANGELOG.md#&#8203;182-httpswwwgithubcomgoogleapisgoogle-api-python-clientcomparev181v182-2020-04-21)

[Compare Source](https://togithub.com/google/google-api-python-client/compare/v1.8.1...v1.8.2)

### [`v1.8.1`](https://togithub.com/google/google-api-python-client/blob/master/CHANGELOG.md#&#8203;181-httpswwwgithubcomgoogleapisgoogle-api-python-clientcomparev180v181-2020-04-20)

[Compare Source](https://togithub.com/google/google-api-python-client/compare/v1.8.0...v1.8.1)

</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 these updates 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).

* chore(deps): update dependency google-auth to v1.14.1 [(#3464)](GoogleCloudPlatform/python-docs-samples#3464)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [google-auth](https://togithub.com/googleapis/google-auth-library-python) | patch | `==1.14.0` -> `==1.14.1` |
| [google-auth](https://togithub.com/googleapis/google-auth-library-python) | minor | `==1.11.2` -> `==1.14.1` |

---

### Release Notes

<details>
<summary>googleapis/google-auth-library-python</summary>

### [`v1.14.1`](https://togithub.com/googleapis/google-auth-library-python/blob/master/CHANGELOG.md#&#8203;1141-httpswwwgithubcomgoogleapisgoogle-auth-library-pythoncomparev1140v1141-2020-04-21)

[Compare Source](https://togithub.com/googleapis/google-auth-library-python/compare/v1.14.0...v1.14.1)

</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 these updates 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).

* Add example command for docs [(#3708)](GoogleCloudPlatform/python-docs-samples#3708)

* chore(deps): update dependency google-auth to v1.14.2 [(#3724)](GoogleCloudPlatform/python-docs-samples#3724)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [google-auth](https://togithub.com/googleapis/google-auth-library-python) | patch | `==1.14.1` -> `==1.14.2` |

---

### Release Notes

<details>
<summary>googleapis/google-auth-library-python</summary>

### [`v1.14.2`](https://togithub.com/googleapis/google-auth-library-python/blob/master/CHANGELOG.md#&#8203;1142-httpswwwgithubcomgoogleapisgoogle-auth-library-pythoncomparev1141v1142-2020-05-07)

[Compare Source](https://togithub.com/googleapis/google-auth-library-python/compare/v1.14.1...v1.14.2)

</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).

* chore: some lint fixes [(#3747)](GoogleCloudPlatform/python-docs-samples#3747)

* chore(deps): update dependency google-cloud-pubsub to v1.4.3 [(#3725)](GoogleCloudPlatform/python-docs-samples#3725)

Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
Co-authored-by: Takashi Matsuo <tmatsuo@google.com>

* chore(deps): update dependency google-auth to v1.14.3 [(#3728)](GoogleCloudPlatform/python-docs-samples#3728)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [google-auth](https://togithub.com/googleapis/google-auth-library-python) | patch | `==1.14.2` -> `==1.14.3` |

---

### Release Notes

<details>
<summary>googleapis/google-auth-library-python</summary>

### [`v1.14.3`](https://togithub.com/googleapis/google-auth-library-python/blob/master/CHANGELOG.md#&#8203;1143-httpswwwgithubcomgoogleapisgoogle-auth-library-pythoncomparev1142v1143-2020-05-11)

[Compare Source](https://togithub.com/googleapis/google-auth-library-python/compare/v1.14.2...v1.14.3)

</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.

---

 - [x] <!-- 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).

* update google-auth to 1.15.0 part 5 [(#3818)](GoogleCloudPlatform/python-docs-samples#3818)

* update google-api-python-client to 1.8.3 part 4 [(#3826)](GoogleCloudPlatform/python-docs-samples#3826)

* chore(deps): update dependency google-cloud-pubsub to v1.5.0 [(#3781)](GoogleCloudPlatform/python-docs-samples#3781)

Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>

* chore(deps): update dependency google-api-python-client to v1.8.4 [(#3881)](GoogleCloudPlatform/python-docs-samples#3881)

Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>

* chore(deps): update dependency google-auth to v1.16.0 [(#3903)](GoogleCloudPlatform/python-docs-samples#3903)

* chore(deps): update dependency google-api-python-client to v1.9.1 [(#3930)](GoogleCloudPlatform/python-docs-samples#3930)

* update google-auth part 5 [(#3966)](GoogleCloudPlatform/python-docs-samples#3966)

* testing: start using btlr [(#3959)](GoogleCloudPlatform/python-docs-samples#3959)

* testing: start using btlr

The binary is at gs://cloud-devrel-kokoro-resources/btlr/v0.0.1/btlr

* add period after DIFF_FROM

* use array for btlr args

* fix websocket tests

* add debug message

* wait longer for the server to spin up

* dlp: bump the wait timeout to 10 minutes

* [run] copy noxfile.py to child directory to avoid gcloud issue

* [iam] fix: only display description when the key exists

* use uuid4 instead of uuid1

* [iot] testing: use the same format for registry id

* Stop asserting Out of memory not in the output

* fix missing imports

* [dns] testing: more retries with delay

* [dlp] testing: longer timeout

* use the max-concurrency flag

* use 30 workers

* [monitoring] use multiple projects

* [dlp] testing: longer timeout

* Replace GCLOUD_PROJECT with GOOGLE_CLOUD_PROJECT. [(#4022)](GoogleCloudPlatform/python-docs-samples#4022)

* Update dependency google-api-python-client to v1.9.2 [(#4038)](GoogleCloudPlatform/python-docs-samples#4038)

* Update dependency google-auth to v1.17.0 [(#4058)](GoogleCloudPlatform/python-docs-samples#4058)

* chore(deps): update dependency google-auth to v1.17.1 [(#4073)](GoogleCloudPlatform/python-docs-samples#4073)

* Update dependency google-auth to v1.17.2 [(#4083)](GoogleCloudPlatform/python-docs-samples#4083)

* Update dependency google-api-python-client to v1.9.3 [(#4057)](GoogleCloudPlatform/python-docs-samples#4057)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [google-api-python-client](https://togithub.com/googleapis/google-api-python-client) | patch | `==1.9.2` -> `==1.9.3` |

---

### Release Notes

<details>
<summary>googleapis/google-api-python-client</summary>

### [`v1.9.3`](https://togithub.com/googleapis/google-api-python-client/blob/master/CHANGELOG.md#&#8203;193-httpswwwgithubcomgoogleapisgoogle-api-python-clientcomparev192v193-2020-06-10)

[Compare Source](https://togithub.com/googleapis/google-api-python-client/compare/v1.9.2...v1.9.3)

</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).

* Update dependency google-auth to v1.18.0 [(#4125)](GoogleCloudPlatform/python-docs-samples#4125)

* Update dependency google-cloud-pubsub to v1.6.0 [(#4039)](GoogleCloudPlatform/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).

* chore(deps): update dependency google-cloud-pubsub to v1.6.1 [(#4242)](GoogleCloudPlatform/python-docs-samples#4242)

Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>

* chore(deps): update dependency flaky to v3.7.0 [(#4263)](GoogleCloudPlatform/python-docs-samples#4263)

* Update dependency google-auth-httplib2 to v0.0.4 [(#4255)](GoogleCloudPlatform/python-docs-samples#4255)

Co-authored-by: Takashi Matsuo <tmatsuo@google.com>

* chore(deps): update dependency pytest to v5.4.3 [(#4279)](GoogleCloudPlatform/python-docs-samples#4279)

* chore(deps): update dependency pytest to v5.4.3

* specify pytest for python 2 in appengine

Co-authored-by: Leah Cole <coleleah@google.com>

* chore(deps): update dependency google-auth to v1.19.0 [(#4293)](GoogleCloudPlatform/python-docs-samples#4293)

* chore(deps): update dependency google-cloud-pubsub to v1.7.0 [(#4290)](GoogleCloudPlatform/python-docs-samples#4290)

This PR contains the following updates:

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

---

### Release Notes

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

### [`v1.7.0`](https://togithub.com/googleapis/python-pubsub/blob/master/CHANGELOG.md#&#8203;170-httpswwwgithubcomgoogleapispython-pubsubcomparev161v170-2020-07-13)

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

##### New Features

-   Add support for server-side flow control. ([#&#8203;143](https://togithub.com/googleapis/python-pubsub/pull/143)) ([04e261c](https://www.github.com/googleapis/python-pubsub/commit/04e261c602a2919cc75b3efa3dab099fb2cf704c))

##### Dependencies

-   Update samples dependency `google-cloud-pubsub` to `v1.6.1`. ([#&#8203;144](https://togithub.com/googleapis/python-pubsub/pull/144)) ([1cb6746](https://togithub.com/googleapis/python-pubsub/commit/1cb6746b00ebb23dbf1663bae301b32c3fc65a88))

##### Documentation

-   Add pubsub/cloud-client samples from the common samples repo (with commit history). ([#&#8203;151](https://togithub.com/googleapis/python-pubsub/pull/151)) 
-   Add flow control section to publish overview. ([#&#8203;129](https://togithub.com/googleapis/python-pubsub/pull/129)) ([acc19eb](https://www.github.com/googleapis/python-pubsub/commit/acc19eb048eef067d9818ef3e310b165d9c6307e))
-   Add a link to Pub/Sub filtering language public documentation to `pubsub.proto`. ([#&#8203;121](https://togithub.com/googleapis/python-pubsub/pull/121)) ([8802d81](https://www.github.com/googleapis/python-pubsub/commit/8802d8126247f22e26057e68a42f5b5a82dcbf0d))

</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**: Renovate will not automatically rebase this PR, because other commits have been found.

: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).

* Update dependency google-api-python-client to v1.10.0 [(#4302)](GoogleCloudPlatform/python-docs-samples#4302)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [google-api-python-client](https://togithub.com/googleapis/google-api-python-client) | minor | `==1.9.3` -> `==1.10.0` |

---

### Release Notes

<details>
<summary>googleapis/google-api-python-client</summary>

### [`v1.10.0`](https://togithub.com/googleapis/google-api-python-client/blob/master/CHANGELOG.md#&#8203;1100-httpswwwgithubcomgoogleapisgoogle-api-python-clientcomparev193v1100-2020-07-15)

[Compare Source](https://togithub.com/googleapis/google-api-python-client/compare/v1.9.3...v1.10.0)

##### Features

-   allow to use 'six.moves.collections_abc.Mapping' in 'client_options.from_dict()' ([#&#8203;943](https://www.github.com/googleapis/google-api-python-client/issues/943)) ([21af37b](https://www.github.com/googleapis/google-api-python-client/commit/21af37b11ea2d6a89b3df484e1b2fa1d12849510))
-   Build universal wheels ([#&#8203;948](https://www.github.com/googleapis/google-api-python-client/issues/948)) ([3e28a1e](https://www.github.com/googleapis/google-api-python-client/commit/3e28a1e0d47f829182cd92f37475ab91fa5e4afc))
-   discovery supports retries ([#&#8203;967](https://www.github.com/googleapis/google-api-python-client/issues/967)) ([f3348f9](https://www.github.com/googleapis/google-api-python-client/commit/f3348f98bf91a88a28bf61b12b95e391cc3be1ff)), closes [#&#8203;848](https://www.github.com/googleapis/google-api-python-client/issues/848)

##### Documentation

-   consolidating and updating the Contribution Guide ([#&#8203;964](https://www.github.com/googleapis/google-api-python-client/issues/964)) ([63f97f3](https://www.github.com/googleapis/google-api-python-client/commit/63f97f37daee37a725eb05df3097b20d5d4eaaf0)), closes [#&#8203;963](https://www.github.com/googleapis/google-api-python-client/issues/963)

##### [1.9.3](https://www.github.com/googleapis/google-api-python-client/compare/v1.9.2...v1.9.3) (2020-06-10)

##### Bug Fixes

-   update GOOGLE_API_USE_MTLS values ([#&#8203;940](https://www.github.com/googleapis/google-api-python-client/issues/940)) ([19908ed](https://www.github.com/googleapis/google-api-python-client/commit/19908edcd8a3df1db41e34100acc1f15c3c99397))

##### [1.9.2](https://www.github.com/googleapis/google-api-python-client/compare/v1.9.1...v1.9.2) (2020-06-04)

##### Bug Fixes

-   bump api-core version ([#&#8203;936](https://www.github.com/googleapis/google-api-python-client/issues/936)) ([ee53b3b](https://www.github.com/googleapis/google-api-python-client/commit/ee53b3b32a050874ba4cfb491fb384f94682c824))

##### [1.9.1](https://www.github.com/googleapis/google-api-python-client/compare/v1.9.0...v1.9.1) (2020-06-02)

##### Bug Fixes

-   fix python-api-core dependency issue ([#&#8203;931](https://www.github.com/googleapis/google-api-python-client/issues/931)) ([42028ed](https://www.github.com/googleapis/google-api-python-client/commit/42028ed2b2be47f85b70eb813185264f1f573d01))

</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).

* chore(deps): update dependency google-auth to v1.19.1 [(#4304)](GoogleCloudPlatform/python-docs-samples#4304)

* chore(deps): update dependency google-auth to v1.19.2 [(#4321)](GoogleCloudPlatform/python-docs-samples#4321)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [google-auth](https://togithub.com/googleapis/google-auth-library-python) | patch | `==1.19.1` -> `==1.19.2` |

---

### Release Notes

<details>
<summary>googleapis/google-auth-library-python</summary>

### [`v1.19.2`](https://togithub.com/googleapis/google-auth-library-python/blob/master/CHANGELOG.md#&#8203;1192-httpswwwgithubcomgoogleapisgoogle-auth-library-pythoncomparev1191v1192-2020-07-17)

[Compare Source](https://togithub.com/googleapis/google-auth-library-python/compare/v1.19.1...v1.19.2)

</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).

* chore(deps): update dependency cryptography to v3 [(#4337)](GoogleCloudPlatform/python-docs-samples#4337)

* Update dependency google-auth to v1.20.0 [(#4387)](GoogleCloudPlatform/python-docs-samples#4387)

* Update dependency pytest to v6 [(#4390)](GoogleCloudPlatform/python-docs-samples#4390)

* chore(deps): update dependency google-auth to v1.20.1 [(#4452)](GoogleCloudPlatform/python-docs-samples#4452)

* chore(deps): update dependency google-api-python-client to v1.10.1 [(#4557)](GoogleCloudPlatform/python-docs-samples#4557)

* chore(deps): update dependency google-api-python-client to v1.10.1

* Update requirements.txt

Co-authored-by: Takashi Matsuo <tmatsuo@google.com>

* Update dependency google-auth to v1.21.0 [(#4588)](GoogleCloudPlatform/python-docs-samples#4588)

* Update dependency google-api-python-client to v1.11.0 [(#4587)](GoogleCloudPlatform/python-docs-samples#4587)

Co-authored-by: Takashi Matsuo <tmatsuo@google.com>

* Update dependency cryptography to v3.1 [(#4571)](GoogleCloudPlatform/python-docs-samples#4571)

Co-authored-by: Charles Engelke <engelke@google.com>

* chore: update templates

* chore: add files from mqtt_example

Co-authored-by: Gus Class <gguuss@gmail.com>
Co-authored-by: DPE bot <dpebot@google.com>
Co-authored-by: Jon Wayne Parrott <jonwayne@google.com>
Co-authored-by: michaelawyu <chenyumic@google.com>
Co-authored-by: Andrew Gorcester <gorcester@google.com>
Co-authored-by: Andrew Gorcester <andrew.gorcester@gmail.com>
Co-authored-by: noerog <32459203+noerog@users.noreply.github.com>
Co-authored-by: postmasters <namnguyen@google.com>
Co-authored-by: Jason Dobry <jason.dobry@gmail.com>
Co-authored-by: Brent Shaffer <betterbrent@google.com>
Co-authored-by: Frank Natividad <frankyn@users.noreply.github.com>
Co-authored-by: michaelawyu <michael.a.w.yu@hotmail.com>
Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
Co-authored-by: Doug Mahugh <dmahugh@gmail.com>
Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>
Co-authored-by: WhiteSource Renovate <bot@renovateapp.com>
Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>
Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
Co-authored-by: Takashi Matsuo <tmatsuo@google.com>
Co-authored-by: Christopher Wilcox <crwilcox@google.com>
Co-authored-by: Leah Cole <coleleah@google.com>
Co-authored-by: Charles Engelke <engelke@google.com>
  • Loading branch information
23 people authored Sep 9, 2020
1 parent 7678eed commit 43f1f1a
Show file tree
Hide file tree
Showing 35 changed files with 5,396 additions and 28 deletions.
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Code owners file.
# This file controls who is tagged for review for any given pull request.
#
# For syntax help see:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax


/samples/**/*.py @gguuss @googleapis/python-samples-owners
Empty file added .github/snippet-bot.yml
Empty file.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pip-log.txt
# Built documentation
docs/_build
bigquery/docs/generated
docs.metadata

# Virtual environment
env/
Expand All @@ -57,4 +58,4 @@ system_tests/local_test_setup

# Make sure a generated file isn't accidentally committed.
pylintrc
pylintrc.test
pylintrc.test
8 changes: 7 additions & 1 deletion .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,10 @@ python3.6 -m pip uninstall --yes --quiet nox-automation
python3.6 -m pip install --upgrade --quiet nox
python3.6 -m nox --version

python3.6 -m nox
# If NOX_SESSION is set, it only runs the specified session,
# otherwise run all the sessions.
if [[ -n "${NOX_SESSION:-}" ]]; then
python3.6 -m nox -s "${NOX_SESSION:-}"
else
python3.6 -m nox
fi
98 changes: 98 additions & 0 deletions .kokoro/docker/docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from ubuntu:20.04

ENV DEBIAN_FRONTEND noninteractive

# Ensure local Python is preferred over distribution Python.
ENV PATH /usr/local/bin:$PATH

# Install dependencies.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
apt-transport-https \
build-essential \
ca-certificates \
curl \
dirmngr \
git \
gpg-agent \
graphviz \
libbz2-dev \
libdb5.3-dev \
libexpat1-dev \
libffi-dev \
liblzma-dev \
libreadline-dev \
libsnappy-dev \
libssl-dev \
libsqlite3-dev \
portaudio19-dev \
redis-server \
software-properties-common \
ssh \
sudo \
tcl \
tcl-dev \
tk \
tk-dev \
uuid-dev \
wget \
zlib1g-dev \
&& add-apt-repository universe \
&& apt-get update \
&& apt-get -y install jq \
&& apt-get clean autoclean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& rm -f /var/cache/apt/archives/*.deb


COPY fetch_gpg_keys.sh /tmp
# Install the desired versions of Python.
RUN set -ex \
&& export GNUPGHOME="$(mktemp -d)" \
&& echo "disable-ipv6" >> "${GNUPGHOME}/dirmngr.conf" \
&& /tmp/fetch_gpg_keys.sh \
&& for PYTHON_VERSION in 3.7.8 3.8.5; do \
wget --no-check-certificate -O python-${PYTHON_VERSION}.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
&& wget --no-check-certificate -O python-${PYTHON_VERSION}.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
&& gpg --batch --verify python-${PYTHON_VERSION}.tar.xz.asc python-${PYTHON_VERSION}.tar.xz \
&& rm -r python-${PYTHON_VERSION}.tar.xz.asc \
&& mkdir -p /usr/src/python-${PYTHON_VERSION} \
&& tar -xJC /usr/src/python-${PYTHON_VERSION} --strip-components=1 -f python-${PYTHON_VERSION}.tar.xz \
&& rm python-${PYTHON_VERSION}.tar.xz \
&& cd /usr/src/python-${PYTHON_VERSION} \
&& ./configure \
--enable-shared \
# This works only on Python 2.7 and throws a warning on every other
# version, but seems otherwise harmless.
--enable-unicode=ucs4 \
--with-system-ffi \
--without-ensurepip \
&& make -j$(nproc) \
&& make install \
&& ldconfig \
; done \
&& rm -rf "${GNUPGHOME}" \
&& rm -rf /usr/src/python* \
&& rm -rf ~/.cache/

RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
&& python3.7 /tmp/get-pip.py \
&& python3.8 /tmp/get-pip.py \
&& rm /tmp/get-pip.py

CMD ["python3.7"]
45 changes: 45 additions & 0 deletions .kokoro/docker/docs/fetch_gpg_keys.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# A script to fetch gpg keys with retry.
# Avoid jinja parsing the file.
#

function retry {
if [[ "${#}" -le 1 ]]; then
echo "Usage: ${0} retry_count commands.."
exit 1
fi
local retries=${1}
local command="${@:2}"
until [[ "${retries}" -le 0 ]]; do
$command && return 0
if [[ $? -ne 0 ]]; then
echo "command failed, retrying"
((retries--))
fi
done
return 1
}

# 3.6.9, 3.7.5 (Ned Deily)
retry 3 gpg --keyserver ha.pool.sks-keyservers.net --recv-keys \
0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D

# 3.8.0 (Łukasz Langa)
retry 3 gpg --keyserver ha.pool.sks-keyservers.net --recv-keys \
E3FF2839C048B25C084DEBE9B26995E310250568

#
21 changes: 19 additions & 2 deletions .kokoro/docs/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ action {
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "python-iot/.kokoro/trampoline.sh"
build_file: "python-iot/.kokoro/trampoline_v2.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
value: "gcr.io/cloud-devrel-kokoro-resources/python-lib-docs"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand All @@ -28,6 +28,23 @@ env_vars: {
value: "docs-staging"
}

env_vars: {
key: "V2_STAGING_BUCKET"
value: "docs-staging-v2-staging"
}

# It will upload the docker image after successful builds.
env_vars: {
key: "TRAMPOLINE_IMAGE_UPLOAD"
value: "true"
}

# It will always build the docker image.
env_vars: {
key: "TRAMPOLINE_DOCKERFILE"
value: ".kokoro/docker/docs/Dockerfile"
}

# Fetch the token needed for reporting release status to GitHub
before_action {
fetch_keystore {
Expand Down
17 changes: 17 additions & 0 deletions .kokoro/docs/docs-presubmit.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "STAGING_BUCKET"
value: "gcloud-python-test"
}

env_vars: {
key: "V2_STAGING_BUCKET"
value: "gcloud-python-test"
}

# We only upload the image in the main `docs` build.
env_vars: {
key: "TRAMPOLINE_IMAGE_UPLOAD"
value: "false"
}
39 changes: 24 additions & 15 deletions .kokoro/publish-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,16 @@ set -eo pipefail
# Disable buffering, so that the logs stream through.
export PYTHONUNBUFFERED=1

cd github/python-iot

# Remove old nox
python3.6 -m pip uninstall --yes --quiet nox-automation
export PATH="${HOME}/.local/bin:${PATH}"

# Install nox
python3.6 -m pip install --upgrade --quiet nox
python3.6 -m nox --version
python3 -m pip install --user --upgrade --quiet nox
python3 -m nox --version

# build docs
nox -s docs

python3 -m pip install gcp-docuploader

# install a json parser
sudo apt-get update
sudo apt-get -y install software-properties-common
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get -y install jq
python3 -m pip install --user gcp-docuploader

# create metadata
python3 -m docuploader create-metadata \
Expand All @@ -52,4 +42,23 @@ python3 -m docuploader create-metadata \
cat docs.metadata

# upload docs
python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket docs-staging
python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket "${STAGING_BUCKET}"


# docfx yaml files
nox -s docfx

# create metadata.
python3 -m docuploader create-metadata \
--name=$(jq --raw-output '.name // empty' .repo-metadata.json) \
--version=$(python3 setup.py --version) \
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \
--distribution-name=$(python3 setup.py --name) \
--product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \
--github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \
--issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json)

cat docs.metadata

# upload docs
python3 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${V2_STAGING_BUCKET}"
Loading

0 comments on commit 43f1f1a

Please sign in to comment.