Skip to content

Commit

Permalink
chore: manual synth (#224)
Browse files Browse the repository at this point in the history
Closes #214.
Closes #215.
Closes #216.

Co-authored-by: Christopher Wilcox <crwilcox@google.com>
  • Loading branch information
tseaver and crwilcox committed Oct 24, 2020
1 parent cd358db commit 2df1e61
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 117 deletions.
5 changes: 4 additions & 1 deletion .coveragerc
Expand Up @@ -17,6 +17,8 @@
# Generated by synthtool. DO NOT EDIT!
[run]
branch = True
omit =
google/cloud/__init__.py

[report]
fail_under = 100
Expand All @@ -32,4 +34,5 @@ omit =
*/gapic/*.py
*/proto/*.py
*/core/*.py
*/site-packages/*.py
*/site-packages/*.py
google/cloud/__init__.py
2 changes: 1 addition & 1 deletion .kokoro/docs/common.cfg
Expand Up @@ -30,7 +30,7 @@ env_vars: {

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

# It will upload the docker image after successful builds.
Expand Down
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.6/common.cfg
Expand Up @@ -13,6 +13,12 @@ env_vars: {
value: "py-3.6"
}

# Declare build specific Cloud project.
env_vars: {
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
value: "python-docs-samples-tests-py36"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-firestore/.kokoro/test-samples.sh"
Expand Down
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.7/common.cfg
Expand Up @@ -13,6 +13,12 @@ env_vars: {
value: "py-3.7"
}

# Declare build specific Cloud project.
env_vars: {
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
value: "python-docs-samples-tests-py37"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-firestore/.kokoro/test-samples.sh"
Expand Down
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.8/common.cfg
Expand Up @@ -13,6 +13,12 @@ env_vars: {
value: "py-3.8"
}

# Declare build specific Cloud project.
env_vars: {
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
value: "python-docs-samples-tests-py38"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-firestore/.kokoro/test-samples.sh"
Expand Down
8 changes: 7 additions & 1 deletion .kokoro/test-samples.sh
Expand Up @@ -28,6 +28,12 @@ if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
git checkout $LATEST_RELEASE
fi

# Exit early if samples directory doesn't exist
if [ ! -d "./samples" ]; then
echo "No tests run. `./samples` not found"
exit 0
fi

# Disable buffering, so that the logs stream through.
export PYTHONUNBUFFERED=1

Expand Down Expand Up @@ -101,4 +107,4 @@ cd "$ROOT"
# Workaround for Kokoro permissions issue: delete secrets
rm testing/{test-env.sh,client-secrets.json,service-account.json}

exit "$RTN"
exit "$RTN"
12 changes: 11 additions & 1 deletion google/cloud/firestore_v1/services/firestore/async_client.py
Expand Up @@ -833,7 +833,17 @@ async def partition_query(
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.partition_query,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=300.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down
14 changes: 13 additions & 1 deletion google/cloud/firestore_v1/services/firestore/transports/base.py
Expand Up @@ -238,7 +238,19 @@ def _prep_wrapped_messages(self, client_info):
client_info=client_info,
),
self.partition_query: gapic_v1.method.wrap_method(
self.partition_query, default_timeout=None, client_info=client_info,
self.partition_query,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=300.0,
client_info=client_info,
),
self.write: gapic_v1.method.wrap_method(
self.write, default_timeout=86400.0, client_info=client_info,
Expand Down
117 changes: 5 additions & 112 deletions synth.metadata
Expand Up @@ -3,24 +3,23 @@
{
"git": {
"name": ".",
"remote": "https://github.com/googleapis/python-firestore.git",
"sha": "2021f38bb6f016c13bc43d59730c77b57ae5c352"

"remote": "git@github.com:googleapis/python-firestore",
"sha": "db5f286772592460b2bf02df25a121994889585d"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "470d84e263c833af5280753b8e4188432b8d5b06",
"internalRef": "333132625"
"sha": "2131e2f755b3c2604e2d08de81a299fd7e377dcd",
"internalRef": "338527875"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "a651c5fb763c69a921aecdd3e1d8dc51dbf20f8d"
"sha": "901ddd44e9ef7887ee681b9183bbdea99437fdcc"
}
}
],
Expand All @@ -43,111 +42,5 @@
"generator": "bazel"
}
}
],
"generatedFiles": [
".flake8",
".github/CONTRIBUTING.md",
".github/ISSUE_TEMPLATE/bug_report.md",
".github/ISSUE_TEMPLATE/feature_request.md",
".github/ISSUE_TEMPLATE/support_request.md",
".github/PULL_REQUEST_TEMPLATE.md",
".github/release-please.yml",
".github/snippet-bot.yml",
".gitignore",
".kokoro/build.sh",
".kokoro/continuous/common.cfg",
".kokoro/continuous/continuous.cfg",
".kokoro/docker/docs/Dockerfile",
".kokoro/docker/docs/fetch_gpg_keys.sh",
".kokoro/docs/common.cfg",
".kokoro/docs/docs-presubmit.cfg",
".kokoro/docs/docs.cfg",
".kokoro/populate-secrets.sh",
".kokoro/presubmit/common.cfg",
".kokoro/presubmit/presubmit.cfg",
".kokoro/publish-docs.sh",
".kokoro/release.sh",
".kokoro/release/common.cfg",
".kokoro/release/release.cfg",
".kokoro/samples/lint/common.cfg",
".kokoro/samples/lint/continuous.cfg",
".kokoro/samples/lint/periodic.cfg",
".kokoro/samples/lint/presubmit.cfg",
".kokoro/samples/python3.6/common.cfg",
".kokoro/samples/python3.6/continuous.cfg",
".kokoro/samples/python3.6/periodic.cfg",
".kokoro/samples/python3.6/presubmit.cfg",
".kokoro/samples/python3.7/common.cfg",
".kokoro/samples/python3.7/continuous.cfg",
".kokoro/samples/python3.7/periodic.cfg",
".kokoro/samples/python3.7/presubmit.cfg",
".kokoro/samples/python3.8/common.cfg",
".kokoro/samples/python3.8/continuous.cfg",
".kokoro/samples/python3.8/periodic.cfg",
".kokoro/samples/python3.8/presubmit.cfg",
".kokoro/test-samples.sh",
".kokoro/trampoline.sh",
".kokoro/trampoline_v2.sh",
".trampolinerc",
"CODE_OF_CONDUCT.md",
"CONTRIBUTING.rst",
"LICENSE",
"MANIFEST.in",
"docs/_static/custom.css",
"docs/_templates/layout.html",
"docs/conf.py",
"docs/multiprocessing.rst",
"google/cloud/firestore_admin_v1/__init__.py",
"google/cloud/firestore_admin_v1/py.typed",
"google/cloud/firestore_admin_v1/services/__init__.py",
"google/cloud/firestore_admin_v1/services/firestore_admin/__init__.py",
"google/cloud/firestore_admin_v1/services/firestore_admin/async_client.py",
"google/cloud/firestore_admin_v1/services/firestore_admin/client.py",
"google/cloud/firestore_admin_v1/services/firestore_admin/pagers.py",
"google/cloud/firestore_admin_v1/services/firestore_admin/transports/__init__.py",
"google/cloud/firestore_admin_v1/services/firestore_admin/transports/base.py",
"google/cloud/firestore_admin_v1/services/firestore_admin/transports/grpc.py",
"google/cloud/firestore_admin_v1/services/firestore_admin/transports/grpc_asyncio.py",
"google/cloud/firestore_admin_v1/types/__init__.py",
"google/cloud/firestore_admin_v1/types/field.py",
"google/cloud/firestore_admin_v1/types/firestore_admin.py",
"google/cloud/firestore_admin_v1/types/index.py",
"google/cloud/firestore_admin_v1/types/location.py",
"google/cloud/firestore_admin_v1/types/operation.py",
"google/cloud/firestore_v1/py.typed",
"google/cloud/firestore_v1/services/__init__.py",
"google/cloud/firestore_v1/services/firestore/__init__.py",
"google/cloud/firestore_v1/services/firestore/async_client.py",
"google/cloud/firestore_v1/services/firestore/client.py",
"google/cloud/firestore_v1/services/firestore/pagers.py",
"google/cloud/firestore_v1/services/firestore/transports/__init__.py",
"google/cloud/firestore_v1/services/firestore/transports/base.py",
"google/cloud/firestore_v1/services/firestore/transports/grpc.py",
"google/cloud/firestore_v1/services/firestore/transports/grpc_asyncio.py",
"google/cloud/firestore_v1/types/__init__.py",
"google/cloud/firestore_v1/types/common.py",
"google/cloud/firestore_v1/types/document.py",
"google/cloud/firestore_v1/types/firestore.py",
"google/cloud/firestore_v1/types/query.py",
"google/cloud/firestore_v1/types/write.py",
"noxfile.py",
"renovate.json",
"samples/AUTHORING_GUIDE.md",
"samples/CONTRIBUTING.md",
"scripts/decrypt-secrets.sh",
"scripts/fixup_firestore_admin_v1_keywords.py",
"scripts/fixup_firestore_v1_keywords.py",
"scripts/readme-gen/readme_gen.py",
"scripts/readme-gen/templates/README.tmpl.rst",
"scripts/readme-gen/templates/auth.tmpl.rst",
"scripts/readme-gen/templates/auth_api_key.tmpl.rst",
"scripts/readme-gen/templates/install_deps.tmpl.rst",
"scripts/readme-gen/templates/install_portaudio.tmpl.rst",
"setup.cfg",
"testing/.gitignore",
"tests/unit/gapic/firestore_admin_v1/__init__.py",
"tests/unit/gapic/firestore_admin_v1/test_firestore_admin.py",
"tests/unit/gapic/firestore_v1/__init__.py",
"tests/unit/gapic/firestore_v1/test_firestore.py"
]
}

0 comments on commit 2df1e61

Please sign in to comment.