From 657eb9a2a015b8bbdaf47bdca5a373f87d960767 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 18 Nov 2020 16:49:09 -0800 Subject: [PATCH] feat: add AnalyzeIamPolicy and ExportIamPolicyAnalysis; support OSInventory; add common resource helper methods; expose client transport (#113) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * chore: upgrade to gapic-generator-python 0.35.6 PiperOrigin-RevId: 338157137 Source-Author: Google APIs Source-Date: Tue Oct 20 16:08:47 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: c7331b75b0b7bbd614373b7d37085db1c80dd4be Source-Link: https://github.com/googleapis/googleapis/commit/c7331b75b0b7bbd614373b7d37085db1c80dd4be * chore: upgrade to gapic-generator-python 0.35.6 PiperOrigin-RevId: 338489505 Source-Author: Google APIs Source-Date: Thu Oct 22 09:36:18 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 4b34a0869404af9d83ae89952d28712a4d29eba6 Source-Link: https://github.com/googleapis/googleapis/commit/4b34a0869404af9d83ae89952d28712a4d29eba6 * fix: switch firestore/v1 to grpc_service_config PiperOrigin-RevId: 338520351 Source-Author: Google APIs Source-Date: Thu Oct 22 12:01:06 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: b448d7dce89eebc3a4066a9e979a0b96bdb66b62 Source-Link: https://github.com/googleapis/googleapis/commit/b448d7dce89eebc3a4066a9e979a0b96bdb66b62 * docs: renamed App + Web to Google Analytics 4 (GA4) in public documentation PiperOrigin-RevId: 338527875 Source-Author: Google APIs Source-Date: Thu Oct 22 12:36:23 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 2131e2f755b3c2604e2d08de81a299fd7e377dcd Source-Link: https://github.com/googleapis/googleapis/commit/2131e2f755b3c2604e2d08de81a299fd7e377dcd * chore: update grpc dependency to v1.33.1 PiperOrigin-RevId: 338646463 Source-Author: Google APIs Source-Date: Fri Oct 23 03:57:15 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 20b11dfe4538cd5da7b4c3dd7d2bf5b9922ff3ed Source-Link: https://github.com/googleapis/googleapis/commit/20b11dfe4538cd5da7b4c3dd7d2bf5b9922ff3ed * fix!: update package names to avoid conflict with google-cloud-bigquery BREAKING CHANGE: update package names to avoid conflict with google-cloud-bigquery The google-cloud-bigquery package uses the `google.cloud.bigquery` path as a plain Python module, not a namespace package. When this package and google-cloud-bigquery are installed in the same environment, conflicts can result. PiperOrigin-RevId: 339048690 Source-Author: Google APIs Source-Date: Mon Oct 26 09:00:37 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 3c8c2d81369c4665824b20706426b018507415f7 Source-Link: https://github.com/googleapis/googleapis/commit/3c8c2d81369c4665824b20706426b018507415f7 * chore: upgrade to gapic-generator 0.35.9 PiperOrigin-RevId: 339292950 Source-Author: Google APIs Source-Date: Tue Oct 27 11:32:46 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 07d41a7e5cade45aba6f0d277c89722b48f2c956 Source-Link: https://github.com/googleapis/googleapis/commit/07d41a7e5cade45aba6f0d277c89722b48f2c956 * feat: add AnalyzeIamPolicy and AnalyzeIamPolicyLongrunning RPCs PiperOrigin-RevId: 339708980 Source-Author: Google APIs Source-Date: Thu Oct 29 11:23:44 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 00bbad4dfd6633cf4b5f9596c1f93b756bb5c776 Source-Link: https://github.com/googleapis/googleapis/commit/00bbad4dfd6633cf4b5f9596c1f93b756bb5c776 * feat: added support OSInventory in Assets. docs: updated existing docs. Clients receive detailed OSInventory in Assets. PiperOrigin-RevId: 342689216 Source-Author: Google APIs Source-Date: Mon Nov 16 12:04:29 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: 1f8a5144b52f7677dc43c55b21ccaf9e1b425ceb Source-Link: https://github.com/googleapis/googleapis/commit/1f8a5144b52f7677dc43c55b21ccaf9e1b425ceb * fix: remove parse_asset_path, regen * build: fix sync-repo-settings * chore: fix coverage Co-authored-by: Bu Sun Kim --- asset/snippets/snippets/noxfile.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index ba55d7ce53ca..b90eef00f2d9 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -39,6 +39,10 @@ # You can opt out from the test for specific Python versions. 'ignored_versions': ["2.7"], + # Old samples are opted out of enforcing Python type hints + # All new samples should feature them + 'enforce_type_hints': False, + # An envvar key for determining the project id to use. Change it # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string @@ -132,7 +136,10 @@ def _determine_local_import_names(start_dir): @nox.session def lint(session): - session.install("flake8", "flake8-import-order") + if not TEST_CONFIG['enforce_type_hints']: + session.install("flake8", "flake8-import-order") + else: + session.install("flake8", "flake8-import-order", "flake8-annotations") local_names = _determine_local_import_names(".") args = FLAKE8_COMMON_ARGS + [ @@ -141,8 +148,18 @@ def lint(session): "." ] session.run("flake8", *args) +# +# Black +# +@nox.session +def blacken(session): + session.install("black") + python_files = [path for path in os.listdir(".") if path.endswith(".py")] + + session.run("black", *python_files) + # # Sample Tests # @@ -201,6 +218,11 @@ def _get_repo_root(): break if Path(p / ".git").exists(): return str(p) + # .git is not available in repos cloned via Cloud Build + # setup.py is always in the library's root, so use that instead + # https://github.com/googleapis/synthtool/issues/792 + if Path(p / "setup.py").exists(): + return str(p) p = p.parent raise Exception("Unable to detect repository root.")