From 4c62f9c89128f70f84ef886345feeb7cb45b4888 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 16 Nov 2020 17:50:05 -0800 Subject: [PATCH 1/8] chore: start tracking obsolete files (#57) --- synth.metadata | 126 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 123 insertions(+), 3 deletions(-) diff --git a/synth.metadata b/synth.metadata index 8dd8c4c..d293929 100644 --- a/synth.metadata +++ b/synth.metadata @@ -3,15 +3,23 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/python-billingbudgets", - "sha": "b3f7a148ff069f5eede18f0f9d04c7c6174caae4" + "remote": "https://github.com/googleapis/python-billingbudgets.git", + "sha": "b6db1db2055d122614647e492cd3dcd444ebb7e7" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "5359df5297982d551ac5dcc20c8a29de04c70090", + "internalRef": "341146950" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "c7824ea48ff6d4d42dfae0849aec8a85acd90bd9" + "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" } } ], @@ -34,5 +42,117 @@ "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/budgets_v1/services.rst", + "docs/budgets_v1/types.rst", + "docs/budgets_v1beta1/services.rst", + "docs/budgets_v1beta1/types.rst", + "docs/conf.py", + "docs/multiprocessing.rst", + "google/cloud/billing/budgets/__init__.py", + "google/cloud/billing/budgets/py.typed", + "google/cloud/billing/budgets_v1/__init__.py", + "google/cloud/billing/budgets_v1/proto/budget_model.proto", + "google/cloud/billing/budgets_v1/proto/budget_service.proto", + "google/cloud/billing/budgets_v1/py.typed", + "google/cloud/billing/budgets_v1/services/__init__.py", + "google/cloud/billing/budgets_v1/services/budget_service/__init__.py", + "google/cloud/billing/budgets_v1/services/budget_service/async_client.py", + "google/cloud/billing/budgets_v1/services/budget_service/client.py", + "google/cloud/billing/budgets_v1/services/budget_service/pagers.py", + "google/cloud/billing/budgets_v1/services/budget_service/transports/__init__.py", + "google/cloud/billing/budgets_v1/services/budget_service/transports/base.py", + "google/cloud/billing/budgets_v1/services/budget_service/transports/grpc.py", + "google/cloud/billing/budgets_v1/services/budget_service/transports/grpc_asyncio.py", + "google/cloud/billing/budgets_v1/types/__init__.py", + "google/cloud/billing/budgets_v1/types/budget_model.py", + "google/cloud/billing/budgets_v1/types/budget_service.py", + "google/cloud/billing/budgets_v1beta1/__init__.py", + "google/cloud/billing/budgets_v1beta1/proto/budget_model.proto", + "google/cloud/billing/budgets_v1beta1/proto/budget_service.proto", + "google/cloud/billing/budgets_v1beta1/py.typed", + "google/cloud/billing/budgets_v1beta1/services/__init__.py", + "google/cloud/billing/budgets_v1beta1/services/budget_service/__init__.py", + "google/cloud/billing/budgets_v1beta1/services/budget_service/async_client.py", + "google/cloud/billing/budgets_v1beta1/services/budget_service/client.py", + "google/cloud/billing/budgets_v1beta1/services/budget_service/pagers.py", + "google/cloud/billing/budgets_v1beta1/services/budget_service/transports/__init__.py", + "google/cloud/billing/budgets_v1beta1/services/budget_service/transports/base.py", + "google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc.py", + "google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc_asyncio.py", + "google/cloud/billing/budgets_v1beta1/types/__init__.py", + "google/cloud/billing/budgets_v1beta1/types/budget_model.py", + "google/cloud/billing/budgets_v1beta1/types/budget_service.py", + "mypy.ini", + "noxfile.py", + "renovate.json", + "samples/AUTHORING_GUIDE.md", + "samples/CONTRIBUTING.md", + "scripts/decrypt-secrets.sh", + "scripts/fixup_budgets_v1_keywords.py", + "scripts/fixup_budgets_v1beta1_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/budgets_v1/__init__.py", + "tests/unit/gapic/budgets_v1/test_budget_service.py", + "tests/unit/gapic/budgets_v1beta1/__init__.py", + "tests/unit/gapic/budgets_v1beta1/test_budget_service.py" ] } \ No newline at end of file From 409385ccda7bbdfc5185d19297b057ecde7185c1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 17 Nov 2020 09:07:45 -0800 Subject: [PATCH 2/8] test: add 3.9 unit tests (#59) --- .../budgets_v1beta1/proto/budget_model.proto | 18 +++++++++++------- .../budgets_v1beta1/types/budget_model.py | 19 +++++++++++-------- noxfile.py | 2 +- synth.metadata | 6 +++--- 4 files changed, 26 insertions(+), 19 deletions(-) diff --git a/google/cloud/billing/budgets_v1beta1/proto/budget_model.proto b/google/cloud/billing/budgets_v1beta1/proto/budget_model.proto index 10f149f..050737b 100644 --- a/google/cloud/billing/budgets_v1beta1/proto/budget_model.proto +++ b/google/cloud/billing/budgets_v1beta1/proto/budget_model.proto @@ -187,13 +187,17 @@ message Filter { // Only zero or one project can be specified currently. repeated string projects = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A list of credit types to be subtracted from gross cost to - // determine the spend for threshold calculations if and only if - // credit_types_treatment is INCLUDE_SPECIFIED_CREDITS. If - // credit_types_treatment is not INCLUDE_SPECIFIED_CREDITS, this field must be - // empty. See credits.type at - // https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#data-schema - // for a list of acceptable credit type values in this field. + // Optional. If + // [Filter.credit_types_treatment][google.cloud.billing.budgets.v1beta1.Filter.credit_types_treatment] + // is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be + // subtracted from gross cost to determine the spend for threshold + // calculations. + // + // If + // [Filter.credit_types_treatment][google.cloud.billing.budgets.v1beta1.Filter.credit_types_treatment] + // is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. See [a list + // of acceptable credit type + // values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). repeated string credit_types = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`. diff --git a/google/cloud/billing/budgets_v1beta1/types/budget_model.py b/google/cloud/billing/budgets_v1beta1/types/budget_model.py index c5b7056..e5a44ca 100644 --- a/google/cloud/billing/budgets_v1beta1/types/budget_model.py +++ b/google/cloud/billing/budgets_v1beta1/types/budget_model.py @@ -217,14 +217,17 @@ class Filter(proto.Message): account, regardless of which project the usage occurred on. Only zero or one project can be specified currently. credit_types (Sequence[str]): - Optional. A list of credit types to be subtracted from gross - cost to determine the spend for threshold calculations if - and only if credit_types_treatment is - INCLUDE_SPECIFIED_CREDITS. If credit_types_treatment is not - INCLUDE_SPECIFIED_CREDITS, this field must be empty. See - credits.type at - https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#data-schema - for a list of acceptable credit type values in this field. + Optional. If + [Filter.credit_types_treatment][google.cloud.billing.budgets.v1beta1.Filter.credit_types_treatment] + is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types + to be subtracted from gross cost to determine the spend for + threshold calculations. + + If + [Filter.credit_types_treatment][google.cloud.billing.budgets.v1beta1.Filter.credit_types_treatment] + is **not** INCLUDE_SPECIFIED_CREDITS, this field must be + empty. See `a list of acceptable credit type + values `__. credit_types_treatment (~.budget_model.Filter.CreditTypesTreatment): Optional. If not set, default behavior is ``INCLUDE_ALL_CREDITS``. diff --git a/noxfile.py b/noxfile.py index 45efcaa..beb1d67 100644 --- a/noxfile.py +++ b/noxfile.py @@ -28,7 +28,7 @@ DEFAULT_PYTHON_VERSION = "3.8" SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"] -UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8"] +UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] @nox.session(python=DEFAULT_PYTHON_VERSION) diff --git a/synth.metadata b/synth.metadata index d293929..ae6c4fd 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-billingbudgets.git", - "sha": "b6db1db2055d122614647e492cd3dcd444ebb7e7" + "sha": "4c62f9c89128f70f84ef886345feeb7cb45b4888" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5359df5297982d551ac5dcc20c8a29de04c70090", - "internalRef": "341146950" + "sha": "6c0f55f33f882cf97fd3135e93b144ad9c94ebab", + "internalRef": "341478628" } }, { From 62cd894af1cc1aeaca48725dcd4665c8ce48df20 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 28 Dec 2020 10:28:26 -0800 Subject: [PATCH 3/8] fix: remove grpc send/recv limit (#62) --- .../services/budget_service/transports/__init__.py | 1 - .../services/budget_service/transports/grpc.py | 10 +++++++++- .../services/budget_service/transports/grpc_asyncio.py | 8 ++++++++ google/cloud/billing/budgets_v1/types/__init__.py | 1 - .../services/budget_service/transports/__init__.py | 1 - .../services/budget_service/transports/grpc.py | 10 +++++++++- .../services/budget_service/transports/grpc_asyncio.py | 8 ++++++++ google/cloud/billing/budgets_v1beta1/types/__init__.py | 1 - synth.metadata | 6 +++--- tests/unit/gapic/budgets_v1/test_budget_service.py | 8 ++++++++ .../unit/gapic/budgets_v1beta1/test_budget_service.py | 8 ++++++++ 11 files changed, 53 insertions(+), 9 deletions(-) diff --git a/google/cloud/billing/budgets_v1/services/budget_service/transports/__init__.py b/google/cloud/billing/budgets_v1/services/budget_service/transports/__init__.py index 8f54d9e..0ab5ac1 100644 --- a/google/cloud/billing/budgets_v1/services/budget_service/transports/__init__.py +++ b/google/cloud/billing/budgets_v1/services/budget_service/transports/__init__.py @@ -28,7 +28,6 @@ _transport_registry["grpc"] = BudgetServiceGrpcTransport _transport_registry["grpc_asyncio"] = BudgetServiceGrpcAsyncIOTransport - __all__ = ( "BudgetServiceTransport", "BudgetServiceGrpcTransport", diff --git a/google/cloud/billing/budgets_v1/services/budget_service/transports/grpc.py b/google/cloud/billing/budgets_v1/services/budget_service/transports/grpc.py index ec12f7c..9da459d 100644 --- a/google/cloud/billing/budgets_v1/services/budget_service/transports/grpc.py +++ b/google/cloud/billing/budgets_v1/services/budget_service/transports/grpc.py @@ -150,6 +150,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -168,6 +172,10 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._stubs = {} # type: Dict[str, Callable] @@ -194,7 +202,7 @@ def create_channel( ) -> grpc.Channel: """Create and return a gRPC channel object. Args: - address (Optionsl[str]): The host for the channel to use. + address (Optional[str]): The host for the channel to use. credentials (Optional[~.Credentials]): The authorization credentials to attach to requests. These credentials identify this application to the service. If diff --git a/google/cloud/billing/budgets_v1/services/budget_service/transports/grpc_asyncio.py b/google/cloud/billing/budgets_v1/services/budget_service/transports/grpc_asyncio.py index 4a007b7..6f365d0 100644 --- a/google/cloud/billing/budgets_v1/services/budget_service/transports/grpc_asyncio.py +++ b/google/cloud/billing/budgets_v1/services/budget_service/transports/grpc_asyncio.py @@ -195,6 +195,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -213,6 +217,10 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) # Run the base constructor. diff --git a/google/cloud/billing/budgets_v1/types/__init__.py b/google/cloud/billing/budgets_v1/types/__init__.py index 6720cb4..52e66d6 100644 --- a/google/cloud/billing/budgets_v1/types/__init__.py +++ b/google/cloud/billing/budgets_v1/types/__init__.py @@ -32,7 +32,6 @@ DeleteBudgetRequest, ) - __all__ = ( "Budget", "BudgetAmount", diff --git a/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/__init__.py b/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/__init__.py index 8f54d9e..0ab5ac1 100644 --- a/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/__init__.py +++ b/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/__init__.py @@ -28,7 +28,6 @@ _transport_registry["grpc"] = BudgetServiceGrpcTransport _transport_registry["grpc_asyncio"] = BudgetServiceGrpcAsyncIOTransport - __all__ = ( "BudgetServiceTransport", "BudgetServiceGrpcTransport", diff --git a/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc.py b/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc.py index d926f9a..6d7ab32 100644 --- a/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc.py +++ b/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc.py @@ -150,6 +150,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -168,6 +172,10 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._stubs = {} # type: Dict[str, Callable] @@ -194,7 +202,7 @@ def create_channel( ) -> grpc.Channel: """Create and return a gRPC channel object. Args: - address (Optionsl[str]): The host for the channel to use. + address (Optional[str]): The host for the channel to use. credentials (Optional[~.Credentials]): The authorization credentials to attach to requests. These credentials identify this application to the service. If diff --git a/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc_asyncio.py b/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc_asyncio.py index d0f6a21..c84197d 100644 --- a/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc_asyncio.py +++ b/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc_asyncio.py @@ -195,6 +195,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -213,6 +217,10 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) # Run the base constructor. diff --git a/google/cloud/billing/budgets_v1beta1/types/__init__.py b/google/cloud/billing/budgets_v1beta1/types/__init__.py index 02b0409..4e7b3b3 100644 --- a/google/cloud/billing/budgets_v1beta1/types/__init__.py +++ b/google/cloud/billing/budgets_v1beta1/types/__init__.py @@ -32,7 +32,6 @@ DeleteBudgetRequest, ) - __all__ = ( "Budget", "BudgetAmount", diff --git a/synth.metadata b/synth.metadata index ae6c4fd..90d9877 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-billingbudgets.git", - "sha": "4c62f9c89128f70f84ef886345feeb7cb45b4888" + "sha": "409385ccda7bbdfc5185d19297b057ecde7185c1" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6c0f55f33f882cf97fd3135e93b144ad9c94ebab", - "internalRef": "341478628" + "sha": "dd372aa22ded7a8ba6f0e03a80e06358a3fa0907", + "internalRef": "347055288" } }, { diff --git a/tests/unit/gapic/budgets_v1/test_budget_service.py b/tests/unit/gapic/budgets_v1/test_budget_service.py index 324fe39..58bc53a 100644 --- a/tests/unit/gapic/budgets_v1/test_budget_service.py +++ b/tests/unit/gapic/budgets_v1/test_budget_service.py @@ -1837,6 +1837,10 @@ def test_budget_service_transport_channel_mtls_with_client_cert_source(transport ), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel assert transport._ssl_channel_credentials == mock_ssl_cred @@ -1881,6 +1885,10 @@ def test_budget_service_transport_channel_mtls_with_adc(transport_class): ), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel diff --git a/tests/unit/gapic/budgets_v1beta1/test_budget_service.py b/tests/unit/gapic/budgets_v1beta1/test_budget_service.py index 79ffd3b..42a2f9a 100644 --- a/tests/unit/gapic/budgets_v1beta1/test_budget_service.py +++ b/tests/unit/gapic/budgets_v1beta1/test_budget_service.py @@ -1486,6 +1486,10 @@ def test_budget_service_transport_channel_mtls_with_client_cert_source(transport ), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel assert transport._ssl_channel_credentials == mock_ssl_cred @@ -1530,6 +1534,10 @@ def test_budget_service_transport_channel_mtls_with_adc(transport_class): ), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel From 09a543dba8845a1fbb8759bb3b07b35be77fbaad Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 29 Dec 2020 08:05:40 -0800 Subject: [PATCH 4/8] chore: exclude `.nox` from linting; add pre-commit hook (#64) * docs(python): update intersphinx for grpc and auth * docs(python): update intersphinx for grpc and auth * use https for python intersphinx Co-authored-by: Tim Swast Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Source-Date: Wed Nov 18 14:37:25 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 9a7d9fbb7045c34c9d3d22c1ff766eeae51f04c9 Source-Link: https://github.com/googleapis/synthtool/commit/9a7d9fbb7045c34c9d3d22c1ff766eeae51f04c9 * docs(python): fix intersphinx link for google-auth Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Source-Date: Thu Nov 19 10:16:05 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: a073c873f3928c561bdf87fdfbf1d081d1998984 Source-Link: https://github.com/googleapis/synthtool/commit/a073c873f3928c561bdf87fdfbf1d081d1998984 * chore: add config / docs for 'pre-commit' support Source-Author: Tres Seaver Source-Date: Tue Dec 1 16:01:20 2020 -0500 Source-Repo: googleapis/synthtool Source-Sha: 32af6da519a6b042e3da62008e2a75e991efb6b4 Source-Link: https://github.com/googleapis/synthtool/commit/32af6da519a6b042e3da62008e2a75e991efb6b4 * chore(deps): update precommit hook pre-commit/pre-commit-hooks to v3.3.0 Source-Author: WhiteSource Renovate Source-Date: Wed Dec 2 17:18:24 2020 +0100 Source-Repo: googleapis/synthtool Source-Sha: 69629b64b83c6421d616be2b8e11795738ec8a6c Source-Link: https://github.com/googleapis/synthtool/commit/69629b64b83c6421d616be2b8e11795738ec8a6c * test(python): give filesystem paths to pytest-cov https://pytest-cov.readthedocs.io/en/latest/config.html The pytest-cov docs seem to suggest a filesystem path is expected. Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Source-Date: Wed Dec 2 09:28:04 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: f94318521f63085b9ccb43d42af89f153fb39f15 Source-Link: https://github.com/googleapis/synthtool/commit/f94318521f63085b9ccb43d42af89f153fb39f15 * chore(deps): update precommit hook pre-commit/pre-commit-hooks to v3.4.0 Co-authored-by: Tres Seaver Source-Author: WhiteSource Renovate Source-Date: Wed Dec 16 18:13:24 2020 +0100 Source-Repo: googleapis/synthtool Source-Sha: aa255b15d52b6d8950cca48cfdf58f7d27a60c8a Source-Link: https://github.com/googleapis/synthtool/commit/aa255b15d52b6d8950cca48cfdf58f7d27a60c8a * docs(python): document adding Python 3.9 support, dropping 3.5 support Closes #787 Source-Author: Tres Seaver Source-Date: Thu Dec 17 16:08:02 2020 -0500 Source-Repo: googleapis/synthtool Source-Sha: b670a77a454f415d247907908e8ee7943e06d718 Source-Link: https://github.com/googleapis/synthtool/commit/b670a77a454f415d247907908e8ee7943e06d718 * chore: exclude `.nox` directories from linting The samples tests create `.nox` directories with all dependencies installed. These directories should be excluded from linting. I've tested this change locally, and it significantly speeds up linting on my machine. Source-Author: Tim Swast Source-Date: Tue Dec 22 13:04:04 2020 -0600 Source-Repo: googleapis/synthtool Source-Sha: 373861061648b5fe5e0ac4f8a38b32d639ee93e4 Source-Link: https://github.com/googleapis/synthtool/commit/373861061648b5fe5e0ac4f8a38b32d639ee93e4 --- .flake8 | 1 + .pre-commit-config.yaml | 17 +++++++++++++++++ CONTRIBUTING.rst | 21 +++++++++++++++------ docs/conf.py | 6 +++--- noxfile.py | 5 ++--- synth.metadata | 5 +++-- 6 files changed, 41 insertions(+), 14 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.flake8 b/.flake8 index ed93163..29227d4 100644 --- a/.flake8 +++ b/.flake8 @@ -26,6 +26,7 @@ exclude = *_pb2.py # Standard linting exemptions. + **/.nox/** __pycache__, .git, *.pyc, diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..a9024b1 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,17 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.4.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml +- repo: https://github.com/psf/black + rev: 19.10b0 + hooks: + - id: black +- repo: https://gitlab.com/pycqa/flake8 + rev: 3.8.4 + hooks: + - id: flake8 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 903bf40..30e55e3 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -21,8 +21,8 @@ In order to add a feature: - The feature must be documented in both the API and narrative documentation. -- The feature must work fully on the following CPython versions: 2.7, - 3.5, 3.6, 3.7 and 3.8 on both UNIX and Windows. +- The feature must work fully on the following CPython versions: + 3.6, 3.7, 3.8 and 3.9 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -111,6 +111,16 @@ Coding Style should point to the official ``googleapis`` checkout and the the branch should be the main branch on that remote (``master``). +- This repository contains configuration for the + `pre-commit `__ tool, which automates checking + our linters during a commit. If you have it installed on your ``$PATH``, + you can enable enforcing those checks via: + +.. code-block:: bash + + $ pre-commit install + pre-commit installed at .git/hooks/pre-commit + Exceptions to PEP8: - Many unit tests use a helper method, ``_call_fut`` ("FUT" is short for @@ -192,25 +202,24 @@ Supported Python Versions We support: -- `Python 3.5`_ - `Python 3.6`_ - `Python 3.7`_ - `Python 3.8`_ +- `Python 3.9`_ -.. _Python 3.5: https://docs.python.org/3.5/ .. _Python 3.6: https://docs.python.org/3.6/ .. _Python 3.7: https://docs.python.org/3.7/ .. _Python 3.8: https://docs.python.org/3.8/ +.. _Python 3.9: https://docs.python.org/3.9/ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/python-billingbudgets/blob/master/noxfile.py -Python 2.7 support is deprecated. All code changes should maintain Python 2.7 compatibility until January 1, 2020. We also explicitly decided to support Python 3 beginning with version -3.5. Reasons for this include: +3.6. Reasons for this include: - Encouraging use of newest versions of Python 3 - Taking the lead of `prominent`_ open-source `projects`_ diff --git a/docs/conf.py b/docs/conf.py index fb4f52a..eeab0b7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -345,10 +345,10 @@ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { - "python": ("http://python.readthedocs.org/en/latest/", None), - "google-auth": ("https://google-auth.readthedocs.io/en/stable", None), + "python": ("https://python.readthedocs.org/en/latest/", None), + "google-auth": ("https://googleapis.dev/python/google-auth/latest/", None), "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,), - "grpc": ("https://grpc.io/grpc/python/", None), + "grpc": ("https://grpc.github.io/grpc/python/", None), "proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None), } diff --git a/noxfile.py b/noxfile.py index beb1d67..a57e24b 100644 --- a/noxfile.py +++ b/noxfile.py @@ -81,9 +81,8 @@ def default(session): session.run( "py.test", "--quiet", - "--cov=google.cloud.billing.budgets", - "--cov=google.cloud", - "--cov=tests.unit", + "--cov=google/cloud", + "--cov=tests/unit", "--cov-append", "--cov-config=.coveragerc", "--cov-report=", diff --git a/synth.metadata b/synth.metadata index 90d9877..fb3623d 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-billingbudgets.git", - "sha": "409385ccda7bbdfc5185d19297b057ecde7185c1" + "sha": "62cd894af1cc1aeaca48725dcd4665c8ce48df20" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" + "sha": "373861061648b5fe5e0ac4f8a38b32d639ee93e4" } } ], @@ -87,6 +87,7 @@ ".kokoro/test-samples.sh", ".kokoro/trampoline.sh", ".kokoro/trampoline_v2.sh", + ".pre-commit-config.yaml", ".trampolinerc", "CODE_OF_CONDUCT.md", "CONTRIBUTING.rst", From 9ab82d35602fd62ccd1ebffd908886b3e6cfac34 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 29 Jan 2021 17:04:02 -0800 Subject: [PATCH 5/8] build: migrate to flakybot (#71) --- .kokoro/test-samples.sh | 8 ++++---- .kokoro/trampoline_v2.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.kokoro/test-samples.sh b/.kokoro/test-samples.sh index 5d432b7..5cd6a8b 100755 --- a/.kokoro/test-samples.sh +++ b/.kokoro/test-samples.sh @@ -87,11 +87,11 @@ for file in samples/**/requirements.txt; do python3.6 -m nox -s "$RUN_TESTS_SESSION" EXIT=$? - # If this is a periodic build, send the test log to the Build Cop Bot. - # See https://github.com/googleapis/repo-automation-bots/tree/master/packages/buildcop. + # If this is a periodic build, send the test log to the FlakyBot. + # See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot. if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then - chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop - $KOKORO_GFILE_DIR/linux_amd64/buildcop + chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot + $KOKORO_GFILE_DIR/linux_amd64/flakybot fi if [[ $EXIT -ne 0 ]]; then diff --git a/.kokoro/trampoline_v2.sh b/.kokoro/trampoline_v2.sh index 719bcd5..4af6cdc 100755 --- a/.kokoro/trampoline_v2.sh +++ b/.kokoro/trampoline_v2.sh @@ -159,7 +159,7 @@ if [[ -n "${KOKORO_BUILD_ID:-}" ]]; then "KOKORO_GITHUB_COMMIT" "KOKORO_GITHUB_PULL_REQUEST_NUMBER" "KOKORO_GITHUB_PULL_REQUEST_COMMIT" - # For Build Cop Bot + # For FlakyBot "KOKORO_GITHUB_COMMIT_URL" "KOKORO_GITHUB_PULL_REQUEST_URL" ) From c45cbf17c232e1f7475dd2dd3529f57c2a40d26e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 8 Feb 2021 09:40:03 -0800 Subject: [PATCH 6/8] [CHANGE ME] Re-generated to pick up changes from synthtool. (#67) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/008ce5bf-87d6-4df6-a516-9e6d6ecebea4/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/41a4e56982620d3edcf110d76f4fcdfdec471ac8 Source-Link: https://github.com/googleapis/synthtool/commit/f15b57ccfd71106c2299e9b89835fe6e55015662 --- LICENSE | 7 ++++--- docs/_static/custom.css | 7 ++++++- synth.metadata | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/LICENSE b/LICENSE index a8ee855..d645695 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ - Apache License + + Apache License Version 2.0, January 2004 - https://www.apache.org/licenses/ + http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -192,7 +193,7 @@ you may not use this file except in compliance with the License. You may obtain a copy of the License at - https://www.apache.org/licenses/LICENSE-2.0 + 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, diff --git a/docs/_static/custom.css b/docs/_static/custom.css index 0abaf22..bcd37bb 100644 --- a/docs/_static/custom.css +++ b/docs/_static/custom.css @@ -1,4 +1,9 @@ div#python2-eol { border-color: red; border-width: medium; -} \ No newline at end of file +} + +/* Ensure minimum width for 'Parameters' / 'Returns' column */ +dl.field-list > dt { + min-width: 100px +} diff --git a/synth.metadata b/synth.metadata index fb3623d..67f8821 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-billingbudgets.git", - "sha": "62cd894af1cc1aeaca48725dcd4665c8ce48df20" + "sha": "09a543dba8845a1fbb8759bb3b07b35be77fbaad" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "373861061648b5fe5e0ac4f8a38b32d639ee93e4" + "sha": "41a4e56982620d3edcf110d76f4fcdfdec471ac8" } } ], From 8da28a36f09741ed10897ae0005d2c0e2a3d597c Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Thu, 11 Feb 2021 18:24:02 -0700 Subject: [PATCH 7/8] chore: add constraints file (#65) Add constraints file to test lower bounds. These files will not be used until the noxfile is changed in googleapis/synthtool#869. --- testing/constraints-3.10.txt | 0 testing/constraints-3.11.txt | 0 testing/constraints-3.6.txt | 10 ++++++++++ testing/constraints-3.7.txt | 0 testing/constraints-3.8.txt | 0 testing/constraints-3.9.txt | 0 6 files changed, 10 insertions(+) create mode 100644 testing/constraints-3.10.txt create mode 100644 testing/constraints-3.11.txt create mode 100644 testing/constraints-3.6.txt create mode 100644 testing/constraints-3.7.txt create mode 100644 testing/constraints-3.8.txt create mode 100644 testing/constraints-3.9.txt diff --git a/testing/constraints-3.10.txt b/testing/constraints-3.10.txt new file mode 100644 index 0000000..e69de29 diff --git a/testing/constraints-3.11.txt b/testing/constraints-3.11.txt new file mode 100644 index 0000000..e69de29 diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt new file mode 100644 index 0000000..08972fd --- /dev/null +++ b/testing/constraints-3.6.txt @@ -0,0 +1,10 @@ +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List *all* library dependencies and extras in this file. +# Pin the version to the lower bound. +# +# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", +# Then this file should have foo==1.14.0 +google-api-core==1.22.0 +proto-plus==1.10.0 +libcst==0.2.5 \ No newline at end of file diff --git a/testing/constraints-3.7.txt b/testing/constraints-3.7.txt new file mode 100644 index 0000000..e69de29 diff --git a/testing/constraints-3.8.txt b/testing/constraints-3.8.txt new file mode 100644 index 0000000..e69de29 diff --git a/testing/constraints-3.9.txt b/testing/constraints-3.9.txt new file mode 100644 index 0000000..e69de29 From 3c496cf667c7fa398b23da9503f88ab933d03d45 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 09:50:31 -0700 Subject: [PATCH 8/8] chore: release 1.1.1 (#63) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c480169..235baa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ # Changelog +### [1.1.1](https://www.github.com/googleapis/python-billingbudgets/compare/v1.1.0...v1.1.1) (2021-02-12) + + +### Bug Fixes + +* remove grpc send/recv limit ([#62](https://www.github.com/googleapis/python-billingbudgets/issues/62)) ([62cd894](https://www.github.com/googleapis/python-billingbudgets/commit/62cd894af1cc1aeaca48725dcd4665c8ce48df20)) + ## [1.1.0](https://www.github.com/googleapis/python-billingbudgets/compare/v1.0.1...v1.1.0) (2020-11-05) diff --git a/setup.py b/setup.py index 76bb25c..1887472 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ name = "google-cloud-billing-budgets" description = "Cloud Billing Budget API API client library" -version = "1.1.0" +version = "1.1.1" release_status = "Development Status :: 4 - Beta" dependencies = [ "google-api-core[grpc] >= 1.22.0, < 2.0.0dev",