From 0a29497e1b23afc34751b0a42c9dd4a457b587e8 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Mon, 23 Sep 2024 14:42:22 -0400 Subject: [PATCH 01/17] chore: migrate java tests from synthtool --- library_generation/requirements.in | 1 + .../synthtool/languages/java_unit_tests.py | 314 ++++++++++++++++++ .../test/owlbot/synthtool/languages/util.py | 126 +++++++ .../defaults_test/.repo-metadata.json | 18 + .../java11-integration-golden.cfg | 38 +++ .../nightly-integration-golden.cfg | 38 +++ .../presubmit-integration-golden.cfg | 34 ++ .../partials_test/.integration-partials.yaml | 10 + .../partials_test/.repo-metadata.json | 18 + .../java11-integration-golden.cfg | 47 +++ .../nightly-integration-golden.cfg | 47 +++ .../presubmit-integration-golden.cfg | 43 +++ .../.github/release-please.yml | 6 + .../release-please-update/.repo-metadata.json | 18 + .../standard/.repo-metadata.json | 18 + .../test-owlbot/testdata/FooGrpcGolden.java | 22 ++ .../test-owlbot/testdata/FooProtoGolden.java | 25 ++ .../test-owlbot/testdata/SampleClass.java | 29 ++ .../testdata/SampleClassGolden.java | 23 ++ .../testdata/SampleCopyMethodGolden.java | 37 +++ .../testdata/SampleDeprecateClass.java | 40 +++ .../testdata/SampleDeprecateMethodGolden.java | 52 +++ .../mock-synth-golden-multiple-prs.log | 63 ++++ .../testdata/mock-synth-golden-squash-prs.log | 45 +++ .../testdata/mock-synth-golden.log | 94 ++++++ .../test-owlbot/testdata/multi-config.yaml | 5 + .../testdata/sponge-log-golden.xml | 28 ++ .../test-owlbot/testdata/src/foo/FooGrpc.java | 7 + .../testdata/src/foo/FooProto.java | 10 + .../test-owlbot/testdata/synth-with-flag.py | 51 +++ .../testdata/synth-with-syntax-error-py | 53 +++ .../test-owlbot/testdata/synth.metadata | 79 +++++ .../resources/test-owlbot/testdata/synth.py | 49 +++ ...t-pull-request-interleaved-with-commit.log | 154 +++++++++ .../testdata/test-working-repo-golden.log | 120 +++++++ 35 files changed, 1762 insertions(+) create mode 100644 library_generation/test/owlbot/synthtool/languages/java_unit_tests.py create mode 100644 library_generation/test/owlbot/synthtool/languages/util.py create mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/.repo-metadata.json create mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/java11-integration-golden.cfg create mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/nightly-integration-golden.cfg create mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/presubmit-integration-golden.cfg create mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/.integration-partials.yaml create mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/.repo-metadata.json create mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/java11-integration-golden.cfg create mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/nightly-integration-golden.cfg create mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/presubmit-integration-golden.cfg create mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/release-please-update/.github/release-please.yml create mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/release-please-update/.repo-metadata.json create mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/standard/.repo-metadata.json create mode 100644 library_generation/test/resources/test-owlbot/testdata/FooGrpcGolden.java create mode 100644 library_generation/test/resources/test-owlbot/testdata/FooProtoGolden.java create mode 100644 library_generation/test/resources/test-owlbot/testdata/SampleClass.java create mode 100644 library_generation/test/resources/test-owlbot/testdata/SampleClassGolden.java create mode 100644 library_generation/test/resources/test-owlbot/testdata/SampleCopyMethodGolden.java create mode 100644 library_generation/test/resources/test-owlbot/testdata/SampleDeprecateClass.java create mode 100644 library_generation/test/resources/test-owlbot/testdata/SampleDeprecateMethodGolden.java create mode 100644 library_generation/test/resources/test-owlbot/testdata/mock-synth-golden-multiple-prs.log create mode 100644 library_generation/test/resources/test-owlbot/testdata/mock-synth-golden-squash-prs.log create mode 100644 library_generation/test/resources/test-owlbot/testdata/mock-synth-golden.log create mode 100644 library_generation/test/resources/test-owlbot/testdata/multi-config.yaml create mode 100644 library_generation/test/resources/test-owlbot/testdata/sponge-log-golden.xml create mode 100644 library_generation/test/resources/test-owlbot/testdata/src/foo/FooGrpc.java create mode 100644 library_generation/test/resources/test-owlbot/testdata/src/foo/FooProto.java create mode 100644 library_generation/test/resources/test-owlbot/testdata/synth-with-flag.py create mode 100644 library_generation/test/resources/test-owlbot/testdata/synth-with-syntax-error-py create mode 100644 library_generation/test/resources/test-owlbot/testdata/synth.metadata create mode 100644 library_generation/test/resources/test-owlbot/testdata/synth.py create mode 100644 library_generation/test/resources/test-owlbot/testdata/test-pull-request-interleaved-with-commit.log create mode 100644 library_generation/test/resources/test-owlbot/testdata/test-working-repo-golden.log diff --git a/library_generation/requirements.in b/library_generation/requirements.in index 0e2b25238d..0d95852e61 100644 --- a/library_generation/requirements.in +++ b/library_generation/requirements.in @@ -26,3 +26,4 @@ jinja2==3.1.4 # a list where typing extensions is pinned to >=4.0.1. This will produce an error saying "all requirements # must have their versions pinned with ==". The following line pins the dependency to a specific version via == typing-extensions==4.0.1 +requests-mock # used in owlbot unit tests diff --git a/library_generation/test/owlbot/synthtool/languages/java_unit_tests.py b/library_generation/test/owlbot/synthtool/languages/java_unit_tests.py new file mode 100644 index 0000000000..86fbfe98bd --- /dev/null +++ b/library_generation/test/owlbot/synthtool/languages/java_unit_tests.py @@ -0,0 +1,314 @@ +# 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 +# +# https://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. + +import os +import shutil +import tempfile +import unittest +import xml.etree.ElementTree as elementTree +import yaml +from pathlib import Path +from synthtool.languages import java +import requests_mock +from . import util + +TEST_OWLBOT = Path(__file__).parent.parent.parent.parent / "resources" / "test-owlbot" +FIXTURES = Path(__file__).parent.parent / "resources" / "test-owlbot" / "fixtures" +TEMPLATES_PATH = ( + Path(__file__).parent.parent.parent / "owlbot" / "synthtool" / "templates" +) + +SAMPLE_METADATA = """ + + com.google.cloud + libraries-bom + + 3.3.0 + 3.3.0 + + 1.0.0 + 1.1.0 + 1.1.1 + 1.2.0 + 2.0.0 + 2.1.0 + 2.2.0 + 2.2.1 + 2.3.0 + 2.4.0 + 2.5.0 + 2.6.0 + 2.7.0 + 2.7.1 + 2.8.0 + 2.9.0 + 3.0.0 + 3.1.0 + 3.1.1 + 3.2.0 + 3.3.0 + + 20191218182827 + + +""" + + +class JavaUnitTests(unittest.TestCase): + + def test_version_from_maven_metadata(self): + self.assertEqual("3.3.0", java.version_from_maven_metadata(SAMPLE_METADATA)) + + def test_latest_maven_version(self): + with requests_mock.Mocker() as m: + m.get( + "https://repo1.maven.org/maven2/com/google/cloud/libraries-bom/maven-metadata.xml", + text=SAMPLE_METADATA, + ) + self.assertEqual( + "3.3.0", + java.latest_maven_version( + group_id="com.google.cloud", artifact_id="libraries-bom" + ), + ) + + def test_working_common_templates(self): + def assert_valid_xml(file): + try: + elementTree.parse(file) + except elementTree.ParseError: + self.fail(f"unable to parse XML: {file}") + + def assert_valid_yaml(file): + with open(file, "r") as stream: + try: + yaml.safe_load(stream) + except yaml.YAMLError: + self.fail(f"unable to parse YAML: {file}") + + with util.copied_fixtures_dir( + FIXTURES / "java_templates" / "standard" + ) as workdir: + # generate the common templates + java.common_templates(template_path=TEMPLATES_PATH) + assert os.path.isfile("renovate.json") + + # lint xml, yaml files + # use os.walk because glob ignores hidden directories + for dirpath, _, filenames in os.walk(workdir): + for file in filenames: + (_, ext) = os.path.splitext(file) + if ext == ".xml": + assert_valid_xml(os.path.join(dirpath, file)) + elif ext == ".yaml" or ext == ".yml": + assert_valid_yaml(os.path.join(dirpath, file)) + + def test_remove_method(self): + with tempfile.TemporaryDirectory() as tempdir: + shutil.copyfile( + "tests/testdata/SampleClass.java", tempdir + "/SampleClass.java" + ) + + java.remove_method( + tempdir + "/SampleClass.java", "public static void foo()" + ) + java.remove_method(tempdir + "/SampleClass.java", "public void asdf()") + self.assert_matches_golden( + "tests/testdata/SampleClassGolden.java", tempdir + "/SampleClass.java" + ) + + def test_copy_and_rename_method(self): + with tempfile.TemporaryDirectory() as tempdir: + cwd = os.getcwd() + os.chdir(TEST_OWLBOT) + shutil.copyfile("testdata/SampleClass.java", tempdir + "/SampleClass.java") + + java.copy_and_rename_method( + tempdir + "/SampleClass.java", + "public static void foo()", + "foo", + "foobar", + ) + java.copy_and_rename_method( + tempdir + "/SampleClass.java", "public void asdf()", "asdf", "xyz" + ) + self.assert_matches_golden( + "testdata/SampleCopyMethodGolden.java", + tempdir + "/SampleClass.java", + ) + os.chdir(cwd) + + def test_deprecate_method(self): + # with tempfile.TemporaryDirectory() as tempdir: + if True: + cwd = os.getcwd() + os.chdir(TEST_OWLBOT) + tempdir = tempfile.mkdtemp() + shutil.copyfile( + "testdata/SampleDeprecateClass.java", + tempdir + "/SampleDeprecateClass.java", + ) + deprecation_warning = """This method will be removed in the next major version.\nUse {{@link #{new_method}()}} instead""" + additional_comment = ( + """{new_method} has the same functionality as foobar.""" + ) + java.deprecate_method( + tempdir + "/SampleDeprecateClass.java", + "public void foo(String bar)", + deprecation_warning.format(new_method="sample"), + ) + + # adding a comment when a javadoc and annotation already exists + java.deprecate_method( + tempdir + "/SampleDeprecateClass.java", + "public void bar(String bar)", + deprecation_warning.format(new_method="sample"), + ) + java.deprecate_method( + tempdir + "/SampleDeprecateClass.java", + "public void cat(String bar)", + additional_comment.format(new_method="sample"), + ) + + self.assert_matches_golden( + "testdata/SampleDeprecateMethodGolden.java", + tempdir + "/SampleDeprecateClass.java", + ) + os.chdir(cwd) + + def test_fix_proto_license(self): + with tempfile.TemporaryDirectory() as tempdir: + temppath = Path(tempdir).resolve() + os.mkdir(temppath / "src") + shutil.copyfile( + "tests/testdata/src/foo/FooProto.java", temppath / "src/FooProto.java" + ) + + java.fix_proto_headers(temppath) + self.assert_matches_golden( + "tests/testdata/FooProtoGolden.java", temppath / "src/FooProto.java" + ) + + def test_fix_proto_license_idempotent(self): + with tempfile.TemporaryDirectory() as tempdir: + temppath = Path(tempdir).resolve() + os.mkdir(temppath / "src") + shutil.copyfile( + "tests/testdata/src/foo/FooProto.java", temppath / "src/FooProto.java" + ) + + # run the header fix twice + java.fix_proto_headers(temppath) + java.fix_proto_headers(temppath) + self.assert_matches_golden( + "tests/testdata/FooProtoGolden.java", temppath / "src/FooProto.java" + ) + + def test_fix_grpc_license(self): + with tempfile.TemporaryDirectory() as tempdir: + temppath = Path(tempdir).resolve() + os.mkdir(temppath / "src") + shutil.copyfile( + "tests/testdata/src/foo/FooGrpc.java", temppath / "src/FooGrpc.java" + ) + + java.fix_grpc_headers(temppath) + self.assert_matches_golden( + "tests/testdata/FooGrpcGolden.java", temppath / "src/FooGrpc.java" + ) + + def test_fix_grpc_license_idempotent(self): + with tempfile.TemporaryDirectory() as tempdir: + temppath = Path(tempdir).resolve() + os.mkdir(temppath / "src") + shutil.copyfile( + "tests/testdata/src/foo/FooGrpc.java", temppath / "src/FooGrpc.java" + ) + + # run the header fix twice + java.fix_grpc_headers(temppath) + java.fix_grpc_headers(temppath) + self.assert_matches_golden( + "tests/testdata/FooGrpcGolden.java", temppath / "src/FooGrpc.java" + ) + + def test_release_please_handle_releases(self): + with util.copied_fixtures_dir( + FIXTURES / "java_templates" / "release-please-update" + ): + # generate the common templates + java.common_templates(template_path=TEMPLATES_PATH) + + assert os.path.isfile(".github/release-please.yml") + with open(".github/release-please.yml") as fp: + assert ( + fp.read() + == """branches: + - branch: 1.127.12-sp + bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-lts + bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-yoshi + """ + ) + + def test_defaults(self): + with util.copied_fixtures_dir(FIXTURES / "java_templates" / "defaults_test"): + java.common_templates(template_path=TEMPLATES_PATH) + assert os.path.isfile(".kokoro/nightly/integration.cfg") + self.assert_matches_golden( + "nightly-integration-golden.cfg", ".kokoro/nightly/integration.cfg" + ) + assert os.path.isfile(".kokoro/nightly/java11-integration.cfg") + self.assert_matches_golden( + "java11-integration-golden.cfg", + ".kokoro/nightly/java11-integration.cfg", + ) + assert os.path.isfile(".kokoro/presubmit/integration.cfg") + self.assert_matches_golden( + "presubmit-integration-golden.cfg", ".kokoro/presubmit/integration.cfg" + ) + + def test_merge_partials(self): + with util.copied_fixtures_dir(FIXTURES / "java_templates" / "partials_test"): + java.common_templates(template_path=TEMPLATES_PATH) + assert os.path.isfile(".kokoro/nightly/integration.cfg") + self.assert_matches_golden( + "nightly-integration-golden.cfg", ".kokoro/nightly/integration.cfg" + ) + assert os.path.isfile(".kokoro/nightly/java11-integration.cfg") + self.assert_matches_golden( + "java11-integration-golden.cfg", + ".kokoro/nightly/java11-integration.cfg", + ) + assert os.path.isfile(".kokoro/presubmit/integration.cfg") + self.assert_matches_golden( + "presubmit-integration-golden.cfg", ".kokoro/presubmit/integration.cfg" + ) + + @staticmethod + def assert_matches_golden(expected, actual): + matching_lines = 0 + with open(actual, "rt") as fp: + with open(expected, "rt") as golden: + while True: + matching_lines += 1 + log_line = fp.readline() + expected = golden.readline() + assert repr(log_line) == repr(expected) + if not log_line: + break + assert matching_lines > 0 diff --git a/library_generation/test/owlbot/synthtool/languages/util.py b/library_generation/test/owlbot/synthtool/languages/util.py new file mode 100644 index 0000000000..da54846768 --- /dev/null +++ b/library_generation/test/owlbot/synthtool/languages/util.py @@ -0,0 +1,126 @@ +# 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 +# +# https://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. + +import contextlib +import subprocess +import os +import pathlib +import shutil +import sys +import tempfile +import typing + + +def make_working_repo(working_dir: str, default_branch: str = "main"): + """Create a local repo that resembles a real repo. + + Specifically, it has a history of synth.py changes that actually change the + generated output. + """ + subprocess.check_call(["git", "init"], cwd=working_dir) + subprocess.check_call(["git", "checkout", "-b", default_branch], cwd=working_dir) + subprocess.check_call( + [ + "git", + "remote", + "add", + "origin", + "https://github.com/googleapis/nodejs-vision.git", + ] + ) + working_path = pathlib.Path(working_dir) + # The simplest possible synth.py. It generates one file with one line of text. + template = """import time +import json +import uuid +import subprocess + +# comment + +with open("generated.txt", "wt") as f: + f.write("a\\n") +metadata = { "updateTime": str(uuid.uuid4()), + "sources": [ + { + "git": { + "name": ".", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": subprocess.run(["git", "log", "-1", "--pretty=%H"], universal_newlines=True, stdout=subprocess.PIPE).stdout.strip(), + } + }] +} +with open("synth.metadata", "wt") as f: + json.dump(metadata, f) +""" + # Write version a. + synth_py_path = working_path / "synth.py" + synth_py_path.write_text(template) + subprocess.check_call([sys.executable, str(synth_py_path)], cwd=working_dir) + subprocess.check_call(["git", "add", "-A"], cwd=working_dir) + subprocess.check_call(["git", "commit", "-m", "a"], cwd=working_dir) + + # Write version b. + text = template.replace('"a\\n"', '"b\\n"') + synth_py_path.write_text(text) + subprocess.check_call(["git", "commit", "-am", "b"], cwd=working_dir) + + # Write a version that has no effect on output. + text = text.replace("# comment", "# a different comment") + synth_py_path.write_text(text) + subprocess.check_call(["git", "commit", "-am", "comment"], cwd=working_dir) + + # Write version c. + text = text.replace('"b\\n"', '"c\\n"') + synth_py_path.write_text(text) + subprocess.check_call( + ["git", "commit", "-am", "c subject\n\nbody line 1\nbody line 2"], + cwd=working_dir, + ) + + return text + + +@contextlib.contextmanager +def chdir(path: typing.Union[pathlib.Path, str]): + """Context Manager to change the current working directory and restore the + previous working directory after completing the context. + + Args: + path (pathlib.Path, str) - The new current working directory. + Yields: + pathlib.Path - The new current working directory. + """ + old_cwd = os.getcwd() + os.chdir(str(path)) + try: + yield pathlib.Path(path) + finally: + os.chdir(old_cwd) + + +@contextlib.contextmanager +def copied_fixtures_dir(source: pathlib.Path): + """Context Manager to copy from a fixtures directory into a new temporary directory + and change the current working directory to that copy. Restores the original + current working directory after completing the context. + + Args: + source (pathlib.Path) - The directory to copy. + Yields: + pathlib.Path - The temporary directory with the copied contents. + """ + with tempfile.TemporaryDirectory() as tempdir: + workdir = shutil.copytree(source, pathlib.Path(tempdir) / "workspace") + with chdir(workdir): + yield workdir diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/.repo-metadata.json b/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/.repo-metadata.json new file mode 100644 index 0000000000..840e69ca7a --- /dev/null +++ b/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_shortname": "cloudasset", + "name_pretty": "Cloud Asset Inventory", + "product_documentation": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview", + "api_reference": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview", + "api_description": "provides inventory services based on a time series database. This database keeps a five week history of Google Cloud asset metadata. The Cloud Asset Inventory export service allows you to export all asset metadata at a certain timestamp or export event change history during a timeframe.", + "client_documentation": "https://googleapis.dev/java/google-cloud-asset/latest/index.html", + "issue_tracker": "https://issuetracker.google.com/issues/new?component=187210&template=0", + "release_level": "stable", + "transport": "grpc", + "requires_billing": true, + "language": "java", + "repo": "googleapis/java-asset", + "repo_short": "java-asset", + "distribution_name": "com.google.cloud:google-cloud-asset", + "library_type": "GAPIC_AUTO", + "api_id": "cloudasset.googleapis.com" +} \ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/java11-integration-golden.cfg b/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/java11-integration-golden.cfg new file mode 100644 index 0000000000..5d14a782d0 --- /dev/null +++ b/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/java11-integration-golden.cfg @@ -0,0 +1,38 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-public-resources/java11014" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "ENABLE_FLAKYBOT" + value: "false" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} + diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/nightly-integration-golden.cfg b/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/nightly-integration-golden.cfg new file mode 100644 index 0000000000..f1ccba78f8 --- /dev/null +++ b/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/nightly-integration-golden.cfg @@ -0,0 +1,38 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "ENABLE_FLAKYBOT" + value: "false" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} + diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/presubmit-integration-golden.cfg b/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/presubmit-integration-golden.cfg new file mode 100644 index 0000000000..5864c603e5 --- /dev/null +++ b/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/presubmit-integration-golden.cfg @@ -0,0 +1,34 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} + diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/.integration-partials.yaml b/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/.integration-partials.yaml new file mode 100644 index 0000000000..bbc59eabda --- /dev/null +++ b/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/.integration-partials.yaml @@ -0,0 +1,10 @@ +integration_append: | + env_vars: { + key: "INTEGRATION_TEST_ARGS" + value: "-P bigtable-emulator-it" + } + + env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" + } diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/.repo-metadata.json b/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/.repo-metadata.json new file mode 100644 index 0000000000..840e69ca7a --- /dev/null +++ b/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_shortname": "cloudasset", + "name_pretty": "Cloud Asset Inventory", + "product_documentation": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview", + "api_reference": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview", + "api_description": "provides inventory services based on a time series database. This database keeps a five week history of Google Cloud asset metadata. The Cloud Asset Inventory export service allows you to export all asset metadata at a certain timestamp or export event change history during a timeframe.", + "client_documentation": "https://googleapis.dev/java/google-cloud-asset/latest/index.html", + "issue_tracker": "https://issuetracker.google.com/issues/new?component=187210&template=0", + "release_level": "stable", + "transport": "grpc", + "requires_billing": true, + "language": "java", + "repo": "googleapis/java-asset", + "repo_short": "java-asset", + "distribution_name": "com.google.cloud:google-cloud-asset", + "library_type": "GAPIC_AUTO", + "api_id": "cloudasset.googleapis.com" +} \ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/java11-integration-golden.cfg b/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/java11-integration-golden.cfg new file mode 100644 index 0000000000..b83c0b7e8d --- /dev/null +++ b/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/java11-integration-golden.cfg @@ -0,0 +1,47 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-public-resources/java11014" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "ENABLE_FLAKYBOT" + value: "false" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} + +env_vars: { + key: "INTEGRATION_TEST_ARGS" + value: "-P bigtable-emulator-it" +} + +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/nightly-integration-golden.cfg b/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/nightly-integration-golden.cfg new file mode 100644 index 0000000000..85c9fdae32 --- /dev/null +++ b/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/nightly-integration-golden.cfg @@ -0,0 +1,47 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "ENABLE_FLAKYBOT" + value: "false" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} + +env_vars: { + key: "INTEGRATION_TEST_ARGS" + value: "-P bigtable-emulator-it" +} + +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/presubmit-integration-golden.cfg b/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/presubmit-integration-golden.cfg new file mode 100644 index 0000000000..f2a119bdc8 --- /dev/null +++ b/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/presubmit-integration-golden.cfg @@ -0,0 +1,43 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} + +env_vars: { + key: "INTEGRATION_TEST_ARGS" + value: "-P bigtable-emulator-it" +} + +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/release-please-update/.github/release-please.yml b/library_generation/test/resources/test-owlbot/fixtures/java_templates/release-please-update/.github/release-please.yml new file mode 100644 index 0000000000..807174cce1 --- /dev/null +++ b/library_generation/test/resources/test-owlbot/fixtures/java_templates/release-please-update/.github/release-please.yml @@ -0,0 +1,6 @@ +releaseType: java-yoshi +bumpMinorPreMajor: true +branches: +- releaseType: java-lts + bumpMinorPreMajor: true + branch: 1.127.12-sp \ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/release-please-update/.repo-metadata.json b/library_generation/test/resources/test-owlbot/fixtures/java_templates/release-please-update/.repo-metadata.json new file mode 100644 index 0000000000..840e69ca7a --- /dev/null +++ b/library_generation/test/resources/test-owlbot/fixtures/java_templates/release-please-update/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_shortname": "cloudasset", + "name_pretty": "Cloud Asset Inventory", + "product_documentation": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview", + "api_reference": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview", + "api_description": "provides inventory services based on a time series database. This database keeps a five week history of Google Cloud asset metadata. The Cloud Asset Inventory export service allows you to export all asset metadata at a certain timestamp or export event change history during a timeframe.", + "client_documentation": "https://googleapis.dev/java/google-cloud-asset/latest/index.html", + "issue_tracker": "https://issuetracker.google.com/issues/new?component=187210&template=0", + "release_level": "stable", + "transport": "grpc", + "requires_billing": true, + "language": "java", + "repo": "googleapis/java-asset", + "repo_short": "java-asset", + "distribution_name": "com.google.cloud:google-cloud-asset", + "library_type": "GAPIC_AUTO", + "api_id": "cloudasset.googleapis.com" +} \ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/standard/.repo-metadata.json b/library_generation/test/resources/test-owlbot/fixtures/java_templates/standard/.repo-metadata.json new file mode 100644 index 0000000000..840e69ca7a --- /dev/null +++ b/library_generation/test/resources/test-owlbot/fixtures/java_templates/standard/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_shortname": "cloudasset", + "name_pretty": "Cloud Asset Inventory", + "product_documentation": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview", + "api_reference": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview", + "api_description": "provides inventory services based on a time series database. This database keeps a five week history of Google Cloud asset metadata. The Cloud Asset Inventory export service allows you to export all asset metadata at a certain timestamp or export event change history during a timeframe.", + "client_documentation": "https://googleapis.dev/java/google-cloud-asset/latest/index.html", + "issue_tracker": "https://issuetracker.google.com/issues/new?component=187210&template=0", + "release_level": "stable", + "transport": "grpc", + "requires_billing": true, + "language": "java", + "repo": "googleapis/java-asset", + "repo_short": "java-asset", + "distribution_name": "com.google.cloud:google-cloud-asset", + "library_type": "GAPIC_AUTO", + "api_id": "cloudasset.googleapis.com" +} \ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/testdata/FooGrpcGolden.java b/library_generation/test/resources/test-owlbot/testdata/FooGrpcGolden.java new file mode 100644 index 0000000000..64f7bb90e2 --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/FooGrpcGolden.java @@ -0,0 +1,22 @@ +/* + * Copyright 2024 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 + * + * https://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. + */ +package foo; + +// This class is intentionally missing a license header + +class FooGrpc { + +} diff --git a/library_generation/test/resources/test-owlbot/testdata/FooProtoGolden.java b/library_generation/test/resources/test-owlbot/testdata/FooProtoGolden.java new file mode 100644 index 0000000000..75bfe578be --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/FooProtoGolden.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: foo/foo_proto.proto + +package foo; + +// This class is intentionally missing a license header + +class FooProto { + +} \ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/testdata/SampleClass.java b/library_generation/test/resources/test-owlbot/testdata/SampleClass.java new file mode 100644 index 0000000000..849548b9da --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/SampleClass.java @@ -0,0 +1,29 @@ +/* + * 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 + * + * https://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. + */ + +package dlp; + +class ExampleClass { + public static void foo() { + System.out.println("bar"); + } + + public static class InnerClass { + public void asdf() { + System.out.println("qwer"); + } + } +} diff --git a/library_generation/test/resources/test-owlbot/testdata/SampleClassGolden.java b/library_generation/test/resources/test-owlbot/testdata/SampleClassGolden.java new file mode 100644 index 0000000000..dbe1fe9d18 --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/SampleClassGolden.java @@ -0,0 +1,23 @@ +/* + * 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 + * + * https://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. + */ + +package dlp; + +class ExampleClass { + + public static class InnerClass { + } +} diff --git a/library_generation/test/resources/test-owlbot/testdata/SampleCopyMethodGolden.java b/library_generation/test/resources/test-owlbot/testdata/SampleCopyMethodGolden.java new file mode 100644 index 0000000000..02ce855bc9 --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/SampleCopyMethodGolden.java @@ -0,0 +1,37 @@ +/* + * 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 + * + * https://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. + */ + +package dlp; + +class ExampleClass { + public static void foo() { + System.out.println("bar"); + } + + public static void foobar() { + System.out.println("bar"); + } + + public static class InnerClass { + public void asdf() { + System.out.println("qwer"); + } + + public void xyz() { + System.out.println("qwer"); + } + } +} diff --git a/library_generation/test/resources/test-owlbot/testdata/SampleDeprecateClass.java b/library_generation/test/resources/test-owlbot/testdata/SampleDeprecateClass.java new file mode 100644 index 0000000000..d2ae795106 --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/SampleDeprecateClass.java @@ -0,0 +1,40 @@ +/* + * Copyright 2021 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 + * + * https://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. + */ + +class ExampleClass { + public void cat(String bar) { + for (int i = 0; i < 3; i++) { + System.out.println("this is a test " + bar); + } + } + + @Beta + @Generated() + public void foo(String bar) { + for (int i = 0; i < 3; i++) { + System.out.println("this is a test " + bar); + } + } + + /** + * This is an existing comment. + */ + public void bar(String bar) { + for (int i = 0; i < 3; i++) { + System.out.println("this is a test " + bar); + } + } +} diff --git a/library_generation/test/resources/test-owlbot/testdata/SampleDeprecateMethodGolden.java b/library_generation/test/resources/test-owlbot/testdata/SampleDeprecateMethodGolden.java new file mode 100644 index 0000000000..a5107d9ce6 --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/SampleDeprecateMethodGolden.java @@ -0,0 +1,52 @@ +/* + * Copyright 2021 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 + * + * https://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. + */ + +class ExampleClass { + /** + * @deprecated sample has the same functionality as foobar. + */ + @Deprecated + public void cat(String bar) { + for (int i = 0; i < 3; i++) { + System.out.println("this is a test " + bar); + } + } + + /** + * @deprecated This method will be removed in the next major version. + * Use {@link #sample()} instead + */ + @Beta + @Generated() + @Deprecated + public void foo(String bar) { + for (int i = 0; i < 3; i++) { + System.out.println("this is a test " + bar); + } + } + + /** + * This is an existing comment. + * @deprecated This method will be removed in the next major version. + * Use {@link #sample()} instead + */ + @Deprecated + public void bar(String bar) { + for (int i = 0; i < 3; i++) { + System.out.println("this is a test " + bar); + } + } +} diff --git a/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden-multiple-prs.log b/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden-multiple-prs.log new file mode 100644 index 0000000000..d3834a6a8e --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden-multiple-prs.log @@ -0,0 +1,63 @@ +commit e0840aa69d02d143ba5471d46ec35262dd439990 +Author: Jeffrey Rennie +Date: Wed Apr 22 12:32:34 2020 -0700 + + Wrote c-more to c.txt. + +diff --git a/c.txt b/c.txt +index 3410062..0794b8a 100644 +--- a/c.txt ++++ b/c.txt +@@ -1 +1 @@ +-c +\ No newline at end of file ++c-more +\ No newline at end of file + +commit 031bb12825e298259de6626b08de4d1f1dc90f9c +Author: Jeffrey Rennie +Date: Wed Apr 22 12:32:33 2020 -0700 + + Wrote c to c.txt. + +diff --git a/c.txt b/c.txt +new file mode 100644 +index 0000000..3410062 +--- /dev/null ++++ b/c.txt +@@ -0,0 +1 @@ ++c +\ No newline at end of file + +commit f917b406627d2af14ef42d7ab21223f2a35b8e79 +Author: Jeffrey Rennie +Date: Wed Apr 22 12:32:32 2020 -0700 + + 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. + +diff --git a/a.txt b/a.txt +new file mode 100644 +index 0000000..2e65efe +--- /dev/null ++++ b/a.txt +@@ -0,0 +1 @@ ++a +\ No newline at end of file + +commit a2e7e520a5d7a75cc14392b9546fd9ede270cd0c +Author: Jeffrey Rennie +Date: Wed Apr 22 12:32:28 2020 -0700 + + Added Readme + +diff --git a/README.md b/README.md +new file mode 100644 +index 0000000..df3f6c7 +--- /dev/null ++++ b/README.md +@@ -0,0 +1 @@ ++Well done. +\ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden-squash-prs.log b/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden-squash-prs.log new file mode 100644 index 0000000000..44129f152e --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden-squash-prs.log @@ -0,0 +1,45 @@ +commit b2feb453f021a09e486919dfe79980c38125a22e +Author: Jeffrey Rennie +Date: Wed May 6 09:15:08 2020 -0700 + + changes triggered by multiple versions + + * Wrote c-more to c.txt. + + * Wrote c to c.txt. + + * 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. + +diff --git a/a.txt b/a.txt +new file mode 100644 +index 0000000..2e65efe +--- /dev/null ++++ b/a.txt +@@ -0,0 +1 @@ ++a +\ No newline at end of file +diff --git a/c.txt b/c.txt +new file mode 100644 +index 0000000..0794b8a +--- /dev/null ++++ b/c.txt +@@ -0,0 +1 @@ ++c-more +\ No newline at end of file + +commit 3a3e7a2e74a010875449e9d0df16d2a1a9d1e612 +Author: Jeffrey Rennie +Date: Wed May 6 09:15:04 2020 -0700 + + Added Readme + +diff --git a/README.md b/README.md +new file mode 100644 +index 0000000..df3f6c7 +--- /dev/null ++++ b/README.md +@@ -0,0 +1 @@ ++Well done. +\ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden.log b/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden.log new file mode 100644 index 0000000000..cdf8d9f1ca --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden.log @@ -0,0 +1,94 @@ +commit 54361d2aa96ee5588cb351a329a117d710a86923 +Author: Jeffrey Rennie +Date: Wed Apr 22 12:32:01 2020 -0700 + + Wrote c-more to c.txt. + +diff --git a/c.txt b/c.txt +index 3410062..0794b8a 100644 +--- a/c.txt ++++ b/c.txt +@@ -1 +1 @@ +-c +\ No newline at end of file ++c-more +\ No newline at end of file + +commit aa21ac6ba918a9acd43a4b7d40e670cbbd8d6844 +Author: Jeffrey Rennie +Date: Wed Apr 22 12:32:00 2020 -0700 + + Wrote c to c.txt. + +diff --git a/c.txt b/c.txt +new file mode 100644 +index 0000000..3410062 +--- /dev/null ++++ b/c.txt +@@ -0,0 +1 @@ ++c +\ No newline at end of file + +commit 43b5bd7e9722ac86d646611960cb35e931e27b4a +Author: Jeffrey Rennie +Date: Wed Apr 22 12:31:59 2020 -0700 + + Wrote z to a.txt. + +diff --git a/a.txt b/a.txt +index 2e65efe..fa7af8b 100644 +--- a/a.txt ++++ b/a.txt +@@ -1 +1 @@ +-a +\ No newline at end of file ++z +\ No newline at end of file + +commit bc5fdf7171096d7831509fb1499a4995dce15f8e +Author: Jeffrey Rennie +Date: Wed Apr 22 12:31:59 2020 -0700 + + Wrote b to b.txt. + +diff --git a/b.txt b/b.txt +new file mode 100644 +index 0000000..63d8dbd +--- /dev/null ++++ b/b.txt +@@ -0,0 +1 @@ ++b +\ No newline at end of file + +commit 3a33e468e6525c59b6cdf9c9957bf146ca5516a4 +Author: Jeffrey Rennie +Date: Wed Apr 22 12:31:58 2020 -0700 + + 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. + +diff --git a/a.txt b/a.txt +new file mode 100644 +index 0000000..2e65efe +--- /dev/null ++++ b/a.txt +@@ -0,0 +1 @@ ++a +\ No newline at end of file + +commit 999712c922bea926058c9d7091f507f73768236e +Author: Jeffrey Rennie +Date: Wed Apr 22 12:31:57 2020 -0700 + + Added Readme + +diff --git a/README.md b/README.md +new file mode 100644 +index 0000000..df3f6c7 +--- /dev/null ++++ b/README.md +@@ -0,0 +1 @@ ++Well done. +\ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/testdata/multi-config.yaml b/library_generation/test/resources/test-owlbot/testdata/multi-config.yaml new file mode 100644 index 0000000000..559180a0e9 --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/multi-config.yaml @@ -0,0 +1,5 @@ +libraries: + - name: test1 + repository: googleapis/test1 + - name: test2 + repository: googleapis/test2 diff --git a/library_generation/test/resources/test-owlbot/testdata/sponge-log-golden.xml b/library_generation/test/resources/test-owlbot/testdata/sponge-log-golden.xml new file mode 100644 index 0000000000..376df820de --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/sponge-log-golden.xml @@ -0,0 +1,28 @@ + + + + + + + some output data + + + + + + + + something failed + + + + + + + + something skipped + + + + + \ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/testdata/src/foo/FooGrpc.java b/library_generation/test/resources/test-owlbot/testdata/src/foo/FooGrpc.java new file mode 100644 index 0000000000..be6abc0d64 --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/src/foo/FooGrpc.java @@ -0,0 +1,7 @@ +package foo; + +// This class is intentionally missing a license header + +class FooGrpc { + +} diff --git a/library_generation/test/resources/test-owlbot/testdata/src/foo/FooProto.java b/library_generation/test/resources/test-owlbot/testdata/src/foo/FooProto.java new file mode 100644 index 0000000000..c3aee1cffe --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/src/foo/FooProto.java @@ -0,0 +1,10 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: foo/foo_proto.proto + +package foo; + +// This class is intentionally missing a license header + +class FooProto { + +} \ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/testdata/synth-with-flag.py b/library_generation/test/resources/test-owlbot/testdata/synth-with-flag.py new file mode 100644 index 0000000000..23684d883c --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/synth-with-flag.py @@ -0,0 +1,51 @@ +# Copyright 2018 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. + +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +import synthtool.gcp as gcp +import subprocess +import logging + +logging.basicConfig(level=logging.DEBUG) + +AUTOSYNTH_MULTIPLE_COMMITS = True + +# Run the gapic generator +gapic = gcp.GAPICGenerator() +versions = ["v1", "v1p1beta1", "v1p2beta1", "v1p3beta1", "v1p4beta1"] +for version in versions: + library = gapic.node_library("vision", version) + s.copy(library, excludes=["src/index.js", "README.md", "package.json"]) + +# Copy common templates +common_templates = gcp.CommonTemplates() +templates = common_templates.node_library() +s.copy(templates) + +# [START fix-dead-link] +s.replace( + "**/doc/google/protobuf/doc_timestamp.js", + r"https:\/\/cloud\.google\.com[\s\*]*http:\/\/(.*)[\s\*]*\)", + r"https://\1)", +) + +s.replace(r"**/doc/google/protobuf/doc_timestamp.js", r"toISOString\]", "toISOString)") +# [END fix-dead-link] + +# Node.js specific cleanup +subprocess.run(["npm", "install"]) +subprocess.run(["npm", "run", "fix"]) +subprocess.run(["npx", "compileProtos", "src"]) diff --git a/library_generation/test/resources/test-owlbot/testdata/synth-with-syntax-error-py b/library_generation/test/resources/test-owlbot/testdata/synth-with-syntax-error-py new file mode 100644 index 0000000000..ddb4adda1d --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/synth-with-syntax-error-py @@ -0,0 +1,53 @@ +# Copyright 2018 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. + +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +import synthtool.gcp as gcp +import subprocess +import logging + +logging.basicConfig(level=logging.DEBUG) + +AUTOSYNTH_MULTIPLE_COMMITS = True + +# Run the gapic generator +gapic = gcp.GAPICGenerator() +versions = ["v1", "v1p1beta1", "v1p2beta1", "v1p3beta1", "v1p4beta1"] +for version in versions: + library = gapic.node_library("vision", version) + s.copy(library, excludes=["src/index.js", "README.md", "package.json"]) + +# Copy common templates +common_templates = gcp.CommonTemplates() +templates = common_templates.node_library() +s.copy(templates) + +# [START fix-dead-link] +s.replace( + "**/doc/google/protobuf/doc_timestamp.js", + "https:\/\/cloud\.google\.com[\s\*]*http:\/\/(.*)[\s\*]*\)", + r"https://\1)", +) + +s.replace("**/doc/google/protobuf/doc_timestamp.js", "toISOString\]", "toISOString)") +# [END fix-dead-link] + +# Node.js specific cleanup +subprocess.run(["npm", "install"]) +subprocess.run(["npm", "run", "fix"]) +subprocess.run(["npx", "compileProtos", "src"]) + +" \ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/testdata/synth.metadata b/library_generation/test/resources/test-owlbot/testdata/synth.metadata new file mode 100644 index 0000000000..cc4795b68f --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/synth.metadata @@ -0,0 +1,79 @@ +{ + "updateTime": "2020-02-07T20:29:26.289603Z", + "sources": [ + { + "generator": { + "name": "artman", + "version": "0.44.4", + "dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585", + "internalRef": "293710856" + } + }, + { + "template": { + "name": "node_library", + "origin": "synthtool.gcp", + "version": "2020.2.4" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "vision", + "apiVersion": "v1", + "language": "nodejs", + "generator": "gapic", + "config": "google/cloud/vision/artman_vision_v1.yaml" + } + }, + { + "client": { + "source": "googleapis", + "apiName": "vision", + "apiVersion": "v1p1beta1", + "language": "nodejs", + "generator": "gapic", + "config": "google/cloud/vision/artman_vision_v1p1beta1.yaml" + } + }, + { + "client": { + "source": "googleapis", + "apiName": "vision", + "apiVersion": "v1p2beta1", + "language": "nodejs", + "generator": "gapic", + "config": "google/cloud/vision/artman_vision_v1p2beta1.yaml" + } + }, + { + "client": { + "source": "googleapis", + "apiName": "vision", + "apiVersion": "v1p3beta1", + "language": "nodejs", + "generator": "gapic", + "config": "google/cloud/vision/artman_vision_v1p3beta1.yaml" + } + }, + { + "client": { + "source": "googleapis", + "apiName": "vision", + "apiVersion": "v1p4beta1", + "language": "nodejs", + "generator": "gapic", + "config": "google/cloud/vision/artman_vision_v1p4beta1.yaml" + } + } + ] +} \ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/testdata/synth.py b/library_generation/test/resources/test-owlbot/testdata/synth.py new file mode 100644 index 0000000000..874982a40e --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/synth.py @@ -0,0 +1,49 @@ +# Copyright 2018 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. + +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +import synthtool.gcp as gcp +import subprocess +import logging + +logging.basicConfig(level=logging.DEBUG) + +# Run the gapic generator +gapic = gcp.GAPICGenerator() +versions = ["v1", "v1p1beta1", "v1p2beta1", "v1p3beta1", "v1p4beta1"] +for version in versions: + library = gapic.node_library("vision", version) + s.copy(library, excludes=["src/index.js", "README.md", "package.json"]) + +# Copy common templates +common_templates = gcp.CommonTemplates() +templates = common_templates.node_library() +s.copy(templates) + +# [START fix-dead-link] +s.replace( + "**/doc/google/protobuf/doc_timestamp.js", + r"https:\/\/cloud\.google\.com[\s\*]*http:\/\/(.*)[\s\*]*\)", + r"https://\1)", +) + +s.replace(r"**/doc/google/protobuf/doc_timestamp.js", r"toISOString\]", "toISOString)") +# [END fix-dead-link] + +# Node.js specific cleanup +subprocess.run(["npm", "install"]) +subprocess.run(["npm", "run", "fix"]) +subprocess.run(["npx", "compileProtos", "src"]) diff --git a/library_generation/test/resources/test-owlbot/testdata/test-pull-request-interleaved-with-commit.log b/library_generation/test/resources/test-owlbot/testdata/test-pull-request-interleaved-with-commit.log new file mode 100644 index 0000000000..2ebf6b35bc --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/test-pull-request-interleaved-with-commit.log @@ -0,0 +1,154 @@ +commit e570163043b53638e1e2bee3530f99e26ffcd940 +Author: Jeffrey Rennie +Date: Wed Apr 22 12:43:41 2020 -0700 + + 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. + +diff --git a/generated.txt b/generated.txt +index f2ad6c7..4bcfe98 100644 +--- a/generated.txt ++++ b/generated.txt +@@ -1 +1 @@ +-c ++d + +commit a23e3c7740b1a10b02b75c43de2f296d86528552 +Author: Jeffrey Rennie +Date: Wed Apr 22 12:43:40 2020 -0700 + + merged PR + +diff --git a/generated.txt b/generated.txt +index 7898192..f2ad6c7 100644 +--- a/generated.txt ++++ b/generated.txt +@@ -1 +1 @@ +-a ++c + +commit 9f23c45dbbb98ce4e838f938deee19743dd663bf +Author: Jeffrey Rennie +Date: Wed Apr 22 12:43:39 2020 -0700 + + d + +diff --git a/synth.py b/synth.py +index 87a045e..75134fb 100644 +--- a/synth.py ++++ b/synth.py +@@ -6,7 +6,7 @@ import subprocess + # a different comment + + with open("generated.txt", "wt") as f: +- f.write("c\n") ++ f.write("d\n") + metadata = { "updateTime": str(uuid.uuid4()), + "sources": [ + { + +commit 45fa98150a8d95e6f0160146e81329bb790dae60 +Author: Jeffrey Rennie +Date: Wed Apr 22 12:43:39 2020 -0700 + + c subject + + body line 1 + body line 2 + +diff --git a/synth.py b/synth.py +index dd32b27..87a045e 100644 +--- a/synth.py ++++ b/synth.py +@@ -6,7 +6,7 @@ import subprocess + # a different comment + + with open("generated.txt", "wt") as f: +- f.write("b\n") ++ f.write("c\n") + metadata = { "updateTime": str(uuid.uuid4()), + "sources": [ + { + +commit 5c0ceaa865322fe1545493cf39f63f3e5703fe05 +Author: Jeffrey Rennie +Date: Wed Apr 22 12:43:39 2020 -0700 + + comment + +diff --git a/synth.py b/synth.py +index 17c9866..dd32b27 100644 +--- a/synth.py ++++ b/synth.py +@@ -3,7 +3,7 @@ import json + import uuid + import subprocess + +-# comment ++# a different comment + + with open("generated.txt", "wt") as f: + f.write("b\n") + +commit 789daf62b48e249d86b5ec43c19ab7b570579d68 +Author: Jeffrey Rennie +Date: Wed Apr 22 12:43:38 2020 -0700 + + b + +diff --git a/synth.py b/synth.py +index dcdf3f9..17c9866 100644 +--- a/synth.py ++++ b/synth.py +@@ -6,7 +6,7 @@ import subprocess + # comment + + with open("generated.txt", "wt") as f: +- f.write("a\n") ++ f.write("b\n") + metadata = { "updateTime": str(uuid.uuid4()), + "sources": [ + { + +commit 4e9fc46ea3d4469dd262c47c5267ac55a9d58965 +Author: Jeffrey Rennie +Date: Wed Apr 22 12:43:38 2020 -0700 + + a + +diff --git a/generated.txt b/generated.txt +new file mode 100644 +index 0000000..7898192 +--- /dev/null ++++ b/generated.txt +@@ -0,0 +1 @@ ++a +diff --git a/synth.py b/synth.py +new file mode 100644 +index 0000000..dcdf3f9 +--- /dev/null ++++ b/synth.py +@@ -0,0 +1,21 @@ ++import time ++import json ++import uuid ++import subprocess ++ ++# comment ++ ++with open("generated.txt", "wt") as f: ++ f.write("a\n") ++metadata = { "updateTime": str(uuid.uuid4()), ++ "sources": [ ++ { ++ "git": { ++ "name": ".", ++ "remote": "https://github.com/googleapis/synthtool.git", ++ "sha": subprocess.run(["git", "log", "-1", "--pretty=%H"], universal_newlines=True, stdout=subprocess.PIPE).stdout.strip(), ++ } ++ }] ++} ++with open("synth.metadata", "wt") as f: ++ json.dump(metadata, f) diff --git a/library_generation/test/resources/test-owlbot/testdata/test-working-repo-golden.log b/library_generation/test/resources/test-owlbot/testdata/test-working-repo-golden.log new file mode 100644 index 0000000000..b6e4c673a0 --- /dev/null +++ b/library_generation/test/resources/test-owlbot/testdata/test-working-repo-golden.log @@ -0,0 +1,120 @@ +commit 6bf5f882984445a6b6eba698cdf3ac512c7c66ed +Author: Jeffrey Rennie +Date: Wed Apr 22 12:41:11 2020 -0700 + + 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. + +diff --git a/generated.txt b/generated.txt +index 7898192..f2ad6c7 100644 +--- a/generated.txt ++++ b/generated.txt +@@ -1 +1 @@ +-a ++c + +commit 904056ecd9e5c6abd9c0d2bdf6349407bf7faa25 +Author: Jeffrey Rennie +Date: Wed Apr 22 12:41:10 2020 -0700 + + c subject + + body line 1 + body line 2 + +diff --git a/synth.py b/synth.py +index dd32b27..87a045e 100644 +--- a/synth.py ++++ b/synth.py +@@ -6,7 +6,7 @@ import subprocess + # a different comment + + with open("generated.txt", "wt") as f: +- f.write("b\n") ++ f.write("c\n") + metadata = { "updateTime": str(uuid.uuid4()), + "sources": [ + { + +commit 2bf83602623685bba7b61446dbff733aa2392b73 +Author: Jeffrey Rennie +Date: Wed Apr 22 12:41:10 2020 -0700 + + comment + +diff --git a/synth.py b/synth.py +index 17c9866..dd32b27 100644 +--- a/synth.py ++++ b/synth.py +@@ -3,7 +3,7 @@ import json + import uuid + import subprocess + +-# comment ++# a different comment + + with open("generated.txt", "wt") as f: + f.write("b\n") + +commit 22bf44f4e60d101062d1ffa594b0d731fb1a5638 +Author: Jeffrey Rennie +Date: Wed Apr 22 12:41:09 2020 -0700 + + b + +diff --git a/synth.py b/synth.py +index dcdf3f9..17c9866 100644 +--- a/synth.py ++++ b/synth.py +@@ -6,7 +6,7 @@ import subprocess + # comment + + with open("generated.txt", "wt") as f: +- f.write("a\n") ++ f.write("b\n") + metadata = { "updateTime": str(uuid.uuid4()), + "sources": [ + { + +commit 9c0257db60692736f8154abd098b10397a6facce +Author: Jeffrey Rennie +Date: Wed Apr 22 12:41:09 2020 -0700 + + a + +diff --git a/generated.txt b/generated.txt +new file mode 100644 +index 0000000..7898192 +--- /dev/null ++++ b/generated.txt +@@ -0,0 +1 @@ ++a +diff --git a/synth.py b/synth.py +new file mode 100644 +index 0000000..dcdf3f9 +--- /dev/null ++++ b/synth.py +@@ -0,0 +1,21 @@ ++import time ++import json ++import uuid ++import subprocess ++ ++# comment ++ ++with open("generated.txt", "wt") as f: ++ f.write("a\n") ++metadata = { "updateTime": str(uuid.uuid4()), ++ "sources": [ ++ { ++ "git": { ++ "name": ".", ++ "remote": "https://github.com/googleapis/synthtool.git", ++ "sha": subprocess.run(["git", "log", "-1", "--pretty=%H"], universal_newlines=True, stdout=subprocess.PIPE).stdout.strip(), ++ } ++ }] ++} ++with open("synth.metadata", "wt") as f: ++ json.dump(metadata, f) From 66c82056bc8557d930577840e813522b7c5518fe Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Mon, 23 Sep 2024 18:11:30 -0400 Subject: [PATCH 02/17] fix broken tests --- .../owlbot/synthtool/gcp/common.py | 12 +-- .../workflows/update_generation_config.yaml | 3 +- .../synthtool/languages/java_unit_tests.py | 88 ++++++++----------- 3 files changed, 43 insertions(+), 60 deletions(-) diff --git a/library_generation/owlbot/synthtool/gcp/common.py b/library_generation/owlbot/synthtool/gcp/common.py index b115665af6..f22b6647da 100644 --- a/library_generation/owlbot/synthtool/gcp/common.py +++ b/library_generation/owlbot/synthtool/gcp/common.py @@ -28,11 +28,6 @@ logger = logging.getLogger() logger.setLevel(logging.DEBUG) - - -DEFAULT_TEMPLATES_PATH = "synthtool/gcp/templates" -LOCAL_TEMPLATES: Optional[str] = os.environ.get("SYNTHTOOL_TEMPLATES") - # Originally brought from gcp/partials.py. # These are the default locations to look up _DEFAULT_PARTIAL_FILES = [ @@ -44,11 +39,12 @@ class CommonTemplates: def __init__(self, template_path: Optional[Path] = None): - if LOCAL_TEMPLATES is None: + local_templates = os.environ.get("SYNTHTOOL_TEMPLATES") + if local_templates is None: logger.error("env var SYNTHTOOL_TEMPLATES must be set") sys.exit(1) - logger.debug(f"Using local templates at {LOCAL_TEMPLATES}") - self._template_root = Path(LOCAL_TEMPLATES) + logger.debug(f"Using local templates at {local_templates}") + self._template_root = Path(local_templates) self._templates = templates.Templates(self._template_root) self.excludes = [] # type: List[str] diff --git a/library_generation/owlbot/templates/java_library/.github/workflows/update_generation_config.yaml b/library_generation/owlbot/templates/java_library/.github/workflows/update_generation_config.yaml index e7d5690e0e..0dbdc19a4a 100644 --- a/library_generation/owlbot/templates/java_library/.github/workflows/update_generation_config.yaml +++ b/library_generation/owlbot/templates/java_library/.github/workflows/update_generation_config.yaml @@ -18,7 +18,7 @@ on: schedule: - cron: '0 2 * * *' workflow_dispatch: - +{% raw %} jobs: update-generation-config: runs-on: ubuntu-22.04 @@ -40,3 +40,4 @@ jobs: --repo ${{ github.repository }} env: GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} +{% endraw %} diff --git a/library_generation/test/owlbot/synthtool/languages/java_unit_tests.py b/library_generation/test/owlbot/synthtool/languages/java_unit_tests.py index 86fbfe98bd..ba19498a9b 100644 --- a/library_generation/test/owlbot/synthtool/languages/java_unit_tests.py +++ b/library_generation/test/owlbot/synthtool/languages/java_unit_tests.py @@ -17,6 +17,8 @@ import tempfile import unittest import xml.etree.ElementTree as elementTree +from unittest import mock + import yaml from pathlib import Path from synthtool.languages import java @@ -24,9 +26,14 @@ from . import util TEST_OWLBOT = Path(__file__).parent.parent.parent.parent / "resources" / "test-owlbot" -FIXTURES = Path(__file__).parent.parent / "resources" / "test-owlbot" / "fixtures" +FIXTURES = ( + Path(__file__).parent.parent.parent.parent + / "resources" + / "test-owlbot" + / "fixtures" +) TEMPLATES_PATH = ( - Path(__file__).parent.parent.parent / "owlbot" / "synthtool" / "templates" + Path(__file__).parent.parent.parent.parent.parent / "owlbot" / "templates" ) SAMPLE_METADATA = """ @@ -83,6 +90,7 @@ def test_latest_maven_version(self): ), ) + @mock.patch.dict(os.environ, {"SYNTHTOOL_TEMPLATES": f"{TEMPLATES_PATH}"}) def test_working_common_templates(self): def assert_valid_xml(file): try: @@ -116,17 +124,18 @@ def assert_valid_yaml(file): def test_remove_method(self): with tempfile.TemporaryDirectory() as tempdir: - shutil.copyfile( - "tests/testdata/SampleClass.java", tempdir + "/SampleClass.java" - ) + cwd = os.getcwd() + os.chdir(TEST_OWLBOT) + shutil.copyfile("testdata/SampleClass.java", tempdir + "/SampleClass.java") java.remove_method( tempdir + "/SampleClass.java", "public static void foo()" ) java.remove_method(tempdir + "/SampleClass.java", "public void asdf()") self.assert_matches_golden( - "tests/testdata/SampleClassGolden.java", tempdir + "/SampleClass.java" + "testdata/SampleClassGolden.java", tempdir + "/SampleClass.java" ) + os.chdir(cwd) def test_copy_and_rename_method(self): with tempfile.TemporaryDirectory() as tempdir: @@ -150,11 +159,9 @@ def test_copy_and_rename_method(self): os.chdir(cwd) def test_deprecate_method(self): - # with tempfile.TemporaryDirectory() as tempdir: - if True: + with tempfile.TemporaryDirectory() as tempdir: cwd = os.getcwd() os.chdir(TEST_OWLBOT) - tempdir = tempfile.mkdtemp() shutil.copyfile( "testdata/SampleDeprecateClass.java", tempdir + "/SampleDeprecateClass.java", @@ -189,60 +196,73 @@ def test_deprecate_method(self): def test_fix_proto_license(self): with tempfile.TemporaryDirectory() as tempdir: + cwd = os.getcwd() + os.chdir(TEST_OWLBOT) temppath = Path(tempdir).resolve() os.mkdir(temppath / "src") shutil.copyfile( - "tests/testdata/src/foo/FooProto.java", temppath / "src/FooProto.java" + "testdata/src/foo/FooProto.java", temppath / "src/FooProto.java" ) java.fix_proto_headers(temppath) self.assert_matches_golden( - "tests/testdata/FooProtoGolden.java", temppath / "src/FooProto.java" + "testdata/FooProtoGolden.java", temppath / "src/FooProto.java" ) + os.chdir(cwd) def test_fix_proto_license_idempotent(self): with tempfile.TemporaryDirectory() as tempdir: + cwd = os.getcwd() + os.chdir(TEST_OWLBOT) temppath = Path(tempdir).resolve() os.mkdir(temppath / "src") shutil.copyfile( - "tests/testdata/src/foo/FooProto.java", temppath / "src/FooProto.java" + "testdata/src/foo/FooProto.java", temppath / "src/FooProto.java" ) # run the header fix twice java.fix_proto_headers(temppath) java.fix_proto_headers(temppath) self.assert_matches_golden( - "tests/testdata/FooProtoGolden.java", temppath / "src/FooProto.java" + "testdata/FooProtoGolden.java", temppath / "src/FooProto.java" ) + os.chdir(cwd) def test_fix_grpc_license(self): with tempfile.TemporaryDirectory() as tempdir: + cwd = os.getcwd() + os.chdir(TEST_OWLBOT) temppath = Path(tempdir).resolve() os.mkdir(temppath / "src") shutil.copyfile( - "tests/testdata/src/foo/FooGrpc.java", temppath / "src/FooGrpc.java" + "testdata/src/foo/FooGrpc.java", temppath / "src/FooGrpc.java" ) java.fix_grpc_headers(temppath) self.assert_matches_golden( - "tests/testdata/FooGrpcGolden.java", temppath / "src/FooGrpc.java" + "testdata/FooGrpcGolden.java", temppath / "src/FooGrpc.java" ) + os.chdir(cwd) def test_fix_grpc_license_idempotent(self): with tempfile.TemporaryDirectory() as tempdir: + cwd = os.getcwd() + os.chdir(TEST_OWLBOT) temppath = Path(tempdir).resolve() os.mkdir(temppath / "src") shutil.copyfile( - "tests/testdata/src/foo/FooGrpc.java", temppath / "src/FooGrpc.java" + "testdata/src/foo/FooGrpc.java", temppath / "src/FooGrpc.java" ) # run the header fix twice java.fix_grpc_headers(temppath) java.fix_grpc_headers(temppath) self.assert_matches_golden( - "tests/testdata/FooGrpcGolden.java", temppath / "src/FooGrpc.java" + "testdata/FooGrpcGolden.java", temppath / "src/FooGrpc.java" ) + os.chdir(cwd) + @mock.patch.dict(os.environ, {"SYNTHTOOL_TEMPLATES": f"{TEMPLATES_PATH}"}) def test_release_please_handle_releases(self): with util.copied_fixtures_dir( FIXTURES / "java_templates" / "release-please-update" @@ -265,40 +285,6 @@ def test_release_please_handle_releases(self): """ ) - def test_defaults(self): - with util.copied_fixtures_dir(FIXTURES / "java_templates" / "defaults_test"): - java.common_templates(template_path=TEMPLATES_PATH) - assert os.path.isfile(".kokoro/nightly/integration.cfg") - self.assert_matches_golden( - "nightly-integration-golden.cfg", ".kokoro/nightly/integration.cfg" - ) - assert os.path.isfile(".kokoro/nightly/java11-integration.cfg") - self.assert_matches_golden( - "java11-integration-golden.cfg", - ".kokoro/nightly/java11-integration.cfg", - ) - assert os.path.isfile(".kokoro/presubmit/integration.cfg") - self.assert_matches_golden( - "presubmit-integration-golden.cfg", ".kokoro/presubmit/integration.cfg" - ) - - def test_merge_partials(self): - with util.copied_fixtures_dir(FIXTURES / "java_templates" / "partials_test"): - java.common_templates(template_path=TEMPLATES_PATH) - assert os.path.isfile(".kokoro/nightly/integration.cfg") - self.assert_matches_golden( - "nightly-integration-golden.cfg", ".kokoro/nightly/integration.cfg" - ) - assert os.path.isfile(".kokoro/nightly/java11-integration.cfg") - self.assert_matches_golden( - "java11-integration-golden.cfg", - ".kokoro/nightly/java11-integration.cfg", - ) - assert os.path.isfile(".kokoro/presubmit/integration.cfg") - self.assert_matches_golden( - "presubmit-integration-golden.cfg", ".kokoro/presubmit/integration.cfg" - ) - @staticmethod def assert_matches_golden(expected, actual): matching_lines = 0 From 557c937a326b14960d2b8a0ee7d14579a9eeca65 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Mon, 23 Sep 2024 18:38:22 -0400 Subject: [PATCH 03/17] code refactor --- .../test/owlbot/synthtool/languages/java_unit_tests.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/library_generation/test/owlbot/synthtool/languages/java_unit_tests.py b/library_generation/test/owlbot/synthtool/languages/java_unit_tests.py index ba19498a9b..40779e3c4a 100644 --- a/library_generation/test/owlbot/synthtool/languages/java_unit_tests.py +++ b/library_generation/test/owlbot/synthtool/languages/java_unit_tests.py @@ -110,7 +110,7 @@ def assert_valid_yaml(file): ) as workdir: # generate the common templates java.common_templates(template_path=TEMPLATES_PATH) - assert os.path.isfile("renovate.json") + self.assertTrue(os.path.isfile("renovate.json")) # lint xml, yaml files # use os.walk because glob ignores hidden directories @@ -270,7 +270,7 @@ def test_release_please_handle_releases(self): # generate the common templates java.common_templates(template_path=TEMPLATES_PATH) - assert os.path.isfile(".github/release-please.yml") + self.assertTrue(os.path.isfile(".github/release-please.yml")) with open(".github/release-please.yml") as fp: assert ( fp.read() @@ -285,8 +285,7 @@ def test_release_please_handle_releases(self): """ ) - @staticmethod - def assert_matches_golden(expected, actual): + def assert_matches_golden(self, expected, actual): matching_lines = 0 with open(actual, "rt") as fp: with open(expected, "rt") as golden: @@ -294,7 +293,7 @@ def assert_matches_golden(expected, actual): matching_lines += 1 log_line = fp.readline() expected = golden.readline() - assert repr(log_line) == repr(expected) + self.assertEqual(repr(log_line), repr(expected)) if not log_line: break assert matching_lines > 0 From 372b3a6ae0b6272a38b98d6485fe807f7d5d62f5 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Mon, 23 Sep 2024 18:53:30 -0400 Subject: [PATCH 04/17] fix broken test --- .../synthtool/languages/java_unit_tests.py | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/library_generation/test/owlbot/synthtool/languages/java_unit_tests.py b/library_generation/test/owlbot/synthtool/languages/java_unit_tests.py index 40779e3c4a..459b2c1a00 100644 --- a/library_generation/test/owlbot/synthtool/languages/java_unit_tests.py +++ b/library_generation/test/owlbot/synthtool/languages/java_unit_tests.py @@ -272,17 +272,17 @@ def test_release_please_handle_releases(self): self.assertTrue(os.path.isfile(".github/release-please.yml")) with open(".github/release-please.yml") as fp: - assert ( - fp.read() - == """branches: - - branch: 1.127.12-sp - bumpMinorPreMajor: true - handleGHRelease: true - releaseType: java-lts - bumpMinorPreMajor: true - handleGHRelease: true - releaseType: java-yoshi - """ + self.assertEqual( + fp.read(), + """branches: +- branch: 1.127.12-sp + bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-lts +bumpMinorPreMajor: true +handleGHRelease: true +releaseType: java-yoshi +""", ) def assert_matches_golden(self, expected, actual): From 2176479b5d03f1220cc2478419f414077a6e35fa Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Mon, 23 Sep 2024 18:59:14 -0400 Subject: [PATCH 05/17] add init --- library_generation/test/owlbot/synthtool/languages/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 library_generation/test/owlbot/synthtool/languages/__init__.py diff --git a/library_generation/test/owlbot/synthtool/languages/__init__.py b/library_generation/test/owlbot/synthtool/languages/__init__.py new file mode 100644 index 0000000000..e69de29bb2 From 60ac88ce92634242162a4ee7c02fafe5106dd367 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Mon, 23 Sep 2024 19:39:49 -0400 Subject: [PATCH 06/17] change test dir --- .../owlbot/{synthtool/languages => }/java_unit_tests.py | 8 ++++---- .../test/owlbot/synthtool/languages/__init__.py | 0 .../test/owlbot/{synthtool/languages => }/util.py | 0 3 files changed, 4 insertions(+), 4 deletions(-) rename library_generation/test/owlbot/{synthtool/languages => }/java_unit_tests.py (97%) delete mode 100644 library_generation/test/owlbot/synthtool/languages/__init__.py rename library_generation/test/owlbot/{synthtool/languages => }/util.py (100%) diff --git a/library_generation/test/owlbot/synthtool/languages/java_unit_tests.py b/library_generation/test/owlbot/java_unit_tests.py similarity index 97% rename from library_generation/test/owlbot/synthtool/languages/java_unit_tests.py rename to library_generation/test/owlbot/java_unit_tests.py index 459b2c1a00..1c7c394d2c 100644 --- a/library_generation/test/owlbot/synthtool/languages/java_unit_tests.py +++ b/library_generation/test/owlbot/java_unit_tests.py @@ -23,17 +23,17 @@ from pathlib import Path from synthtool.languages import java import requests_mock -from . import util +from library_generation.test.owlbot import util -TEST_OWLBOT = Path(__file__).parent.parent.parent.parent / "resources" / "test-owlbot" +TEST_OWLBOT = Path(__file__).parent.parent / "resources" / "test-owlbot" FIXTURES = ( - Path(__file__).parent.parent.parent.parent + Path(__file__).parent.parent / "resources" / "test-owlbot" / "fixtures" ) TEMPLATES_PATH = ( - Path(__file__).parent.parent.parent.parent.parent / "owlbot" / "templates" + Path(__file__).parent.parent.parent / "owlbot" / "templates" ) SAMPLE_METADATA = """ diff --git a/library_generation/test/owlbot/synthtool/languages/__init__.py b/library_generation/test/owlbot/synthtool/languages/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/library_generation/test/owlbot/synthtool/languages/util.py b/library_generation/test/owlbot/util.py similarity index 100% rename from library_generation/test/owlbot/synthtool/languages/util.py rename to library_generation/test/owlbot/util.py From c491e1f5cbfeac5a161b3177c86d5404ed08f9e5 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Mon, 23 Sep 2024 19:41:45 -0400 Subject: [PATCH 07/17] lint python --- library_generation/test/owlbot/java_unit_tests.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/library_generation/test/owlbot/java_unit_tests.py b/library_generation/test/owlbot/java_unit_tests.py index 1c7c394d2c..f148bfa0d2 100644 --- a/library_generation/test/owlbot/java_unit_tests.py +++ b/library_generation/test/owlbot/java_unit_tests.py @@ -26,15 +26,8 @@ from library_generation.test.owlbot import util TEST_OWLBOT = Path(__file__).parent.parent / "resources" / "test-owlbot" -FIXTURES = ( - Path(__file__).parent.parent - / "resources" - / "test-owlbot" - / "fixtures" -) -TEMPLATES_PATH = ( - Path(__file__).parent.parent.parent / "owlbot" / "templates" -) +FIXTURES = Path(__file__).parent.parent / "resources" / "test-owlbot" / "fixtures" +TEMPLATES_PATH = Path(__file__).parent.parent.parent / "owlbot" / "templates" SAMPLE_METADATA = """ From fce7274fb85337d8376f7c51671d1b05164243ac Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Mon, 23 Sep 2024 19:42:10 -0400 Subject: [PATCH 08/17] remove installing synthtool --- .github/workflows/verify_library_generation.yaml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/verify_library_generation.yaml b/.github/workflows/verify_library_generation.yaml index 26478b982a..352207660f 100644 --- a/.github/workflows/verify_library_generation.yaml +++ b/.github/workflows/verify_library_generation.yaml @@ -88,21 +88,6 @@ jobs: pushd library_generation pip install -r requirements.txt popd - - name: install synthtool - shell: bash - run: | - set -ex - mkdir -p /tmp/synthtool - pushd /tmp/synthtool - if [ ! -d "synthtool" ]; then - git clone https://github.com/googleapis/synthtool.git - fi - pushd "synthtool" - - git reset --hard origin/no-java-templates - - python3 -m pip install -e . - python3 -m pip install -r requirements.in - name: Run shell unit tests run: | set -x From 0b371513b80a7487a6aaad23f1e842fa0f2eed75 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Mon, 23 Sep 2024 19:46:27 -0400 Subject: [PATCH 09/17] change package --- library_generation/test/owlbot/java_unit_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library_generation/test/owlbot/java_unit_tests.py b/library_generation/test/owlbot/java_unit_tests.py index f148bfa0d2..bf7c4f3643 100644 --- a/library_generation/test/owlbot/java_unit_tests.py +++ b/library_generation/test/owlbot/java_unit_tests.py @@ -21,8 +21,8 @@ import yaml from pathlib import Path -from synthtool.languages import java import requests_mock +from library_generation.owlbot.synthtool.languages import java from library_generation.test.owlbot import util TEST_OWLBOT = Path(__file__).parent.parent / "resources" / "test-owlbot" From ef0fb581184adfe382fc3b626eae2ef5db946e5e Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Mon, 23 Sep 2024 19:52:54 -0400 Subject: [PATCH 10/17] regenerate requirement.txt --- library_generation/requirements.txt | 509 ++++++++++++++-------------- 1 file changed, 257 insertions(+), 252 deletions(-) diff --git a/library_generation/requirements.txt b/library_generation/requirements.txt index f0cd46cd41..9eb09cde8b 100644 --- a/library_generation/requirements.txt +++ b/library_generation/requirements.txt @@ -20,29 +20,29 @@ attrs==23.2.0 \ --hash=sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30 \ --hash=sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1 # via -r requirements.in -black==24.8.0 \ - --hash=sha256:09cdeb74d494ec023ded657f7092ba518e8cf78fa8386155e4a03fdcc44679e6 \ - --hash=sha256:1f13f7f386f86f8121d76599114bb8c17b69d962137fc70efe56137727c7047e \ - --hash=sha256:2500945420b6784c38b9ee885af039f5e7471ef284ab03fa35ecdde4688cd83f \ - --hash=sha256:2b59b250fdba5f9a9cd9d0ece6e6d993d91ce877d121d161e4698af3eb9c1018 \ - --hash=sha256:3c4285573d4897a7610054af5a890bde7c65cb466040c5f0c8b732812d7f0e5e \ - --hash=sha256:505289f17ceda596658ae81b61ebbe2d9b25aa78067035184ed0a9d855d18afd \ - --hash=sha256:62e8730977f0b77998029da7971fa896ceefa2c4c4933fcd593fa599ecbf97a4 \ - --hash=sha256:649f6d84ccbae73ab767e206772cc2d7a393a001070a4c814a546afd0d423aed \ - --hash=sha256:6e55d30d44bed36593c3163b9bc63bf58b3b30e4611e4d88a0c3c239930ed5b2 \ - --hash=sha256:707a1ca89221bc8a1a64fb5e15ef39cd755633daa672a9db7498d1c19de66a42 \ - --hash=sha256:72901b4913cbac8972ad911dc4098d5753704d1f3c56e44ae8dce99eecb0e3af \ - --hash=sha256:73bbf84ed136e45d451a260c6b73ed674652f90a2b3211d6a35e78054563a9bb \ - --hash=sha256:7c046c1d1eeb7aea9335da62472481d3bbf3fd986e093cffd35f4385c94ae368 \ - --hash=sha256:81c6742da39f33b08e791da38410f32e27d632260e599df7245cccee2064afeb \ - --hash=sha256:837fd281f1908d0076844bc2b801ad2d369c78c45cf800cad7b61686051041af \ - --hash=sha256:972085c618ee94f402da1af548a4f218c754ea7e5dc70acb168bfaca4c2542ed \ - --hash=sha256:9e84e33b37be070ba135176c123ae52a51f82306def9f7d063ee302ecab2cf47 \ - --hash=sha256:b19c9ad992c7883ad84c9b22aaa73562a16b819c1d8db7a1a1a49fb7ec13c7d2 \ - --hash=sha256:d6417535d99c37cee4091a2f24eb2b6d5ec42b144d50f1f2e436d9fe1916fe1a \ - --hash=sha256:eab4dd44ce80dea27dc69db40dab62d4ca96112f87996bca68cd75639aeb2e4c \ - --hash=sha256:f490dbd59680d809ca31efdae20e634f3fae27fba3ce0ba3208333b713bc3920 \ - --hash=sha256:fb6e2c0b86bbd43dee042e48059c9ad7830abd5c94b0bc518c0eeec57c3eddc1 +black==24.4.2 \ + --hash=sha256:257d724c2c9b1660f353b36c802ccece186a30accc7742c176d29c146df6e474 \ + --hash=sha256:37aae07b029fa0174d39daf02748b379399b909652a806e5708199bd93899da1 \ + --hash=sha256:415e686e87dbbe6f4cd5ef0fbf764af7b89f9057b97c908742b6008cc554b9c0 \ + --hash=sha256:48a85f2cb5e6799a9ef05347b476cce6c182d6c71ee36925a6c194d074336ef8 \ + --hash=sha256:7768a0dbf16a39aa5e9a3ded568bb545c8c2727396d063bbaf847df05b08cd96 \ + --hash=sha256:7e122b1c4fb252fd85df3ca93578732b4749d9be076593076ef4d07a0233c3e1 \ + --hash=sha256:88c57dc656038f1ab9f92b3eb5335ee9b021412feaa46330d5eba4e51fe49b04 \ + --hash=sha256:8e537d281831ad0e71007dcdcbe50a71470b978c453fa41ce77186bbe0ed6021 \ + --hash=sha256:98e123f1d5cfd42f886624d84464f7756f60ff6eab89ae845210631714f6db94 \ + --hash=sha256:accf49e151c8ed2c0cdc528691838afd217c50412534e876a19270fea1e28e2d \ + --hash=sha256:b1530ae42e9d6d5b670a34db49a94115a64596bc77710b1d05e9801e62ca0a7c \ + --hash=sha256:b9176b9832e84308818a99a561e90aa479e73c523b3f77afd07913380ae2eab7 \ + --hash=sha256:bdde6f877a18f24844e381d45e9947a49e97933573ac9d4345399be37621e26c \ + --hash=sha256:be8bef99eb46d5021bf053114442914baeb3649a89dc5f3a555c88737e5e98fc \ + --hash=sha256:bf10f7310db693bb62692609b397e8d67257c55f949abde4c67f9cc574492cc7 \ + --hash=sha256:c872b53057f000085da66a19c55d68f6f8ddcac2642392ad3a355878406fbd4d \ + --hash=sha256:d36ed1124bb81b32f8614555b34cc4259c3fbc7eec17870e8ff8ded335b58d8c \ + --hash=sha256:da33a1a5e49c4122ccdfd56cd021ff1ebc4a1ec4e2d01594fef9b6f267a9e741 \ + --hash=sha256:dd1b5a14e417189db4c7b64a6540f31730713d173f0b63e55fabd52d61d8fdce \ + --hash=sha256:e151054aa00bad1f4e1f04919542885f89f5f7d086b8a59e5000e6c616896ffb \ + --hash=sha256:eaea3008c281f1038edb473c1aa8ed8143a5535ff18f978a318f10302b254063 \ + --hash=sha256:ef703f83fc32e131e9bcc0a5094cfe85599e7109f896fe8bc96cc402f3eb4b6e # via -r requirements.in certifi==2024.8.30 \ --hash=sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8 \ @@ -178,145 +178,149 @@ jinja2==3.1.4 \ --hash=sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369 \ --hash=sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d # via -r requirements.in -lxml==5.3.0 \ - --hash=sha256:01220dca0d066d1349bd6a1726856a78f7929f3878f7e2ee83c296c69495309e \ - --hash=sha256:02ced472497b8362c8e902ade23e3300479f4f43e45f4105c85ef43b8db85229 \ - --hash=sha256:052d99051e77a4f3e8482c65014cf6372e61b0a6f4fe9edb98503bb5364cfee3 \ - --hash=sha256:07da23d7ee08577760f0a71d67a861019103e4812c87e2fab26b039054594cc5 \ - --hash=sha256:094cb601ba9f55296774c2d57ad68730daa0b13dc260e1f941b4d13678239e70 \ - --hash=sha256:0a7056921edbdd7560746f4221dca89bb7a3fe457d3d74267995253f46343f15 \ - --hash=sha256:0c120f43553ec759f8de1fee2f4794452b0946773299d44c36bfe18e83caf002 \ - --hash=sha256:0d7b36afa46c97875303a94e8f3ad932bf78bace9e18e603f2085b652422edcd \ - --hash=sha256:0fdf3a3059611f7585a78ee10399a15566356116a4288380921a4b598d807a22 \ - --hash=sha256:109fa6fede314cc50eed29e6e56c540075e63d922455346f11e4d7a036d2b8cf \ - --hash=sha256:146173654d79eb1fc97498b4280c1d3e1e5d58c398fa530905c9ea50ea849b22 \ - --hash=sha256:1473427aff3d66a3fa2199004c3e601e6c4500ab86696edffdbc84954c72d832 \ - --hash=sha256:1483fd3358963cc5c1c9b122c80606a3a79ee0875bcac0204149fa09d6ff2727 \ - --hash=sha256:168f2dfcfdedf611eb285efac1516c8454c8c99caf271dccda8943576b67552e \ - --hash=sha256:17e8d968d04a37c50ad9c456a286b525d78c4a1c15dd53aa46c1d8e06bf6fa30 \ - --hash=sha256:18feb4b93302091b1541221196a2155aa296c363fd233814fa11e181adebc52f \ - --hash=sha256:1afe0a8c353746e610bd9031a630a95bcfb1a720684c3f2b36c4710a0a96528f \ - --hash=sha256:1d04f064bebdfef9240478f7a779e8c5dc32b8b7b0b2fc6a62e39b928d428e51 \ - --hash=sha256:1fdc9fae8dd4c763e8a31e7630afef517eab9f5d5d31a278df087f307bf601f4 \ - --hash=sha256:1ffc23010330c2ab67fac02781df60998ca8fe759e8efde6f8b756a20599c5de \ - --hash=sha256:20094fc3f21ea0a8669dc4c61ed7fa8263bd37d97d93b90f28fc613371e7a875 \ - --hash=sha256:213261f168c5e1d9b7535a67e68b1f59f92398dd17a56d934550837143f79c42 \ - --hash=sha256:218c1b2e17a710e363855594230f44060e2025b05c80d1f0661258142b2add2e \ - --hash=sha256:23e0553b8055600b3bf4a00b255ec5c92e1e4aebf8c2c09334f8368e8bd174d6 \ - --hash=sha256:25f1b69d41656b05885aa185f5fdf822cb01a586d1b32739633679699f220391 \ - --hash=sha256:2b3778cb38212f52fac9fe913017deea2fdf4eb1a4f8e4cfc6b009a13a6d3fcc \ - --hash=sha256:2bc9fd5ca4729af796f9f59cd8ff160fe06a474da40aca03fcc79655ddee1a8b \ - --hash=sha256:2c226a06ecb8cdef28845ae976da407917542c5e6e75dcac7cc33eb04aaeb237 \ - --hash=sha256:2c3406b63232fc7e9b8783ab0b765d7c59e7c59ff96759d8ef9632fca27c7ee4 \ - --hash=sha256:2c86bf781b12ba417f64f3422cfc302523ac9cd1d8ae8c0f92a1c66e56ef2e86 \ - --hash=sha256:2d9b8d9177afaef80c53c0a9e30fa252ff3036fb1c6494d427c066a4ce6a282f \ - --hash=sha256:2dec2d1130a9cda5b904696cec33b2cfb451304ba9081eeda7f90f724097300a \ - --hash=sha256:2dfab5fa6a28a0b60a20638dc48e6343c02ea9933e3279ccb132f555a62323d8 \ - --hash=sha256:2ecdd78ab768f844c7a1d4a03595038c166b609f6395e25af9b0f3f26ae1230f \ - --hash=sha256:315f9542011b2c4e1d280e4a20ddcca1761993dda3afc7a73b01235f8641e903 \ - --hash=sha256:36aef61a1678cb778097b4a6eeae96a69875d51d1e8f4d4b491ab3cfb54b5a03 \ - --hash=sha256:384aacddf2e5813a36495233b64cb96b1949da72bef933918ba5c84e06af8f0e \ - --hash=sha256:3879cc6ce938ff4eb4900d901ed63555c778731a96365e53fadb36437a131a99 \ - --hash=sha256:3c174dc350d3ec52deb77f2faf05c439331d6ed5e702fc247ccb4e6b62d884b7 \ - --hash=sha256:3eb44520c4724c2e1a57c0af33a379eee41792595023f367ba3952a2d96c2aab \ - --hash=sha256:406246b96d552e0503e17a1006fd27edac678b3fcc9f1be71a2f94b4ff61528d \ - --hash=sha256:41ce1f1e2c7755abfc7e759dc34d7d05fd221723ff822947132dc934d122fe22 \ - --hash=sha256:423b121f7e6fa514ba0c7918e56955a1d4470ed35faa03e3d9f0e3baa4c7e492 \ - --hash=sha256:44264ecae91b30e5633013fb66f6ddd05c006d3e0e884f75ce0b4755b3e3847b \ - --hash=sha256:482c2f67761868f0108b1743098640fbb2a28a8e15bf3f47ada9fa59d9fe08c3 \ - --hash=sha256:4b0c7a688944891086ba192e21c5229dea54382f4836a209ff8d0a660fac06be \ - --hash=sha256:4c1fefd7e3d00921c44dc9ca80a775af49698bbfd92ea84498e56acffd4c5469 \ - --hash=sha256:4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f \ - --hash=sha256:501d0d7e26b4d261fca8132854d845e4988097611ba2531408ec91cf3fd9d20a \ - --hash=sha256:516f491c834eb320d6c843156440fe7fc0d50b33e44387fcec5b02f0bc118a4c \ - --hash=sha256:51806cfe0279e06ed8500ce19479d757db42a30fd509940b1701be9c86a5ff9a \ - --hash=sha256:562e7494778a69086f0312ec9689f6b6ac1c6b65670ed7d0267e49f57ffa08c4 \ - --hash=sha256:56b9861a71575f5795bde89256e7467ece3d339c9b43141dbdd54544566b3b94 \ - --hash=sha256:5b8f5db71b28b8c404956ddf79575ea77aa8b1538e8b2ef9ec877945b3f46442 \ - --hash=sha256:5c2fb570d7823c2bbaf8b419ba6e5662137f8166e364a8b2b91051a1fb40ab8b \ - --hash=sha256:5c54afdcbb0182d06836cc3d1be921e540be3ebdf8b8a51ee3ef987537455f84 \ - --hash=sha256:5d6a6972b93c426ace71e0be9a6f4b2cfae9b1baed2eed2006076a746692288c \ - --hash=sha256:609251a0ca4770e5a8768ff902aa02bf636339c5a93f9349b48eb1f606f7f3e9 \ - --hash=sha256:62d172f358f33a26d6b41b28c170c63886742f5b6772a42b59b4f0fa10526cb1 \ - --hash=sha256:62f7fdb0d1ed2065451f086519865b4c90aa19aed51081979ecd05a21eb4d1be \ - --hash=sha256:658f2aa69d31e09699705949b5fc4719cbecbd4a97f9656a232e7d6c7be1a367 \ - --hash=sha256:65ab5685d56914b9a2a34d67dd5488b83213d680b0c5d10b47f81da5a16b0b0e \ - --hash=sha256:68934b242c51eb02907c5b81d138cb977b2129a0a75a8f8b60b01cb8586c7b21 \ - --hash=sha256:68b87753c784d6acb8a25b05cb526c3406913c9d988d51f80adecc2b0775d6aa \ - --hash=sha256:69959bd3167b993e6e710b99051265654133a98f20cec1d9b493b931942e9c16 \ - --hash=sha256:6a7095eeec6f89111d03dabfe5883a1fd54da319c94e0fb104ee8f23616b572d \ - --hash=sha256:6b038cc86b285e4f9fea2ba5ee76e89f21ed1ea898e287dc277a25884f3a7dfe \ - --hash=sha256:6ba0d3dcac281aad8a0e5b14c7ed6f9fa89c8612b47939fc94f80b16e2e9bc83 \ - --hash=sha256:6e91cf736959057f7aac7adfc83481e03615a8e8dd5758aa1d95ea69e8931dba \ - --hash=sha256:6ee8c39582d2652dcd516d1b879451500f8db3fe3607ce45d7c5957ab2596040 \ - --hash=sha256:6f651ebd0b21ec65dfca93aa629610a0dbc13dbc13554f19b0113da2e61a4763 \ - --hash=sha256:71a8dd38fbd2f2319136d4ae855a7078c69c9a38ae06e0c17c73fd70fc6caad8 \ - --hash=sha256:74068c601baff6ff021c70f0935b0c7bc528baa8ea210c202e03757c68c5a4ff \ - --hash=sha256:7437237c6a66b7ca341e868cda48be24b8701862757426852c9b3186de1da8a2 \ - --hash=sha256:747a3d3e98e24597981ca0be0fd922aebd471fa99d0043a3842d00cdcad7ad6a \ - --hash=sha256:74bcb423462233bc5d6066e4e98b0264e7c1bed7541fff2f4e34fe6b21563c8b \ - --hash=sha256:78d9b952e07aed35fe2e1a7ad26e929595412db48535921c5013edc8aa4a35ce \ - --hash=sha256:7b1cd427cb0d5f7393c31b7496419da594fe600e6fdc4b105a54f82405e6626c \ - --hash=sha256:7d3d1ca42870cdb6d0d29939630dbe48fa511c203724820fc0fd507b2fb46577 \ - --hash=sha256:7e2f58095acc211eb9d8b5771bf04df9ff37d6b87618d1cbf85f92399c98dae8 \ - --hash=sha256:7f41026c1d64043a36fda21d64c5026762d53a77043e73e94b71f0521939cc71 \ - --hash=sha256:81b4e48da4c69313192d8c8d4311e5d818b8be1afe68ee20f6385d0e96fc9512 \ - --hash=sha256:86a6b24b19eaebc448dc56b87c4865527855145d851f9fc3891673ff97950540 \ - --hash=sha256:874a216bf6afaf97c263b56371434e47e2c652d215788396f60477540298218f \ - --hash=sha256:89e043f1d9d341c52bf2af6d02e6adde62e0a46e6755d5eb60dc6e4f0b8aeca2 \ - --hash=sha256:8c72e9563347c7395910de6a3100a4840a75a6f60e05af5e58566868d5eb2d6a \ - --hash=sha256:8dc2c0395bea8254d8daebc76dcf8eb3a95ec2a46fa6fae5eaccee366bfe02ce \ - --hash=sha256:8f0de2d390af441fe8b2c12626d103540b5d850d585b18fcada58d972b74a74e \ - --hash=sha256:92e67a0be1639c251d21e35fe74df6bcc40cba445c2cda7c4a967656733249e2 \ - --hash=sha256:94d6c3782907b5e40e21cadf94b13b0842ac421192f26b84c45f13f3c9d5dc27 \ - --hash=sha256:97acf1e1fd66ab53dacd2c35b319d7e548380c2e9e8c54525c6e76d21b1ae3b1 \ - --hash=sha256:9ada35dd21dc6c039259596b358caab6b13f4db4d4a7f8665764d616daf9cc1d \ - --hash=sha256:9c52100e2c2dbb0649b90467935c4b0de5528833c76a35ea1a2691ec9f1ee7a1 \ - --hash=sha256:9e41506fec7a7f9405b14aa2d5c8abbb4dbbd09d88f9496958b6d00cb4d45330 \ - --hash=sha256:9e4b47ac0f5e749cfc618efdf4726269441014ae1d5583e047b452a32e221920 \ - --hash=sha256:9fb81d2824dff4f2e297a276297e9031f46d2682cafc484f49de182aa5e5df99 \ - --hash=sha256:a0eabd0a81625049c5df745209dc7fcef6e2aea7793e5f003ba363610aa0a3ff \ - --hash=sha256:a3d819eb6f9b8677f57f9664265d0a10dd6551d227afb4af2b9cd7bdc2ccbf18 \ - --hash=sha256:a87de7dd873bf9a792bf1e58b1c3887b9264036629a5bf2d2e6579fe8e73edff \ - --hash=sha256:aa617107a410245b8660028a7483b68e7914304a6d4882b5ff3d2d3eb5948d8c \ - --hash=sha256:aac0bbd3e8dd2d9c45ceb82249e8bdd3ac99131a32b4d35c8af3cc9db1657179 \ - --hash=sha256:ab6dd83b970dc97c2d10bc71aa925b84788c7c05de30241b9e96f9b6d9ea3080 \ - --hash=sha256:ace2c2326a319a0bb8a8b0e5b570c764962e95818de9f259ce814ee666603f19 \ - --hash=sha256:ae5fe5c4b525aa82b8076c1a59d642c17b6e8739ecf852522c6321852178119d \ - --hash=sha256:b11a5d918a6216e521c715b02749240fb07ae5a1fefd4b7bf12f833bc8b4fe70 \ - --hash=sha256:b1c8c20847b9f34e98080da785bb2336ea982e7f913eed5809e5a3c872900f32 \ - --hash=sha256:b369d3db3c22ed14c75ccd5af429086f166a19627e84a8fdade3f8f31426e52a \ - --hash=sha256:b710bc2b8292966b23a6a0121f7a6c51d45d2347edcc75f016ac123b8054d3f2 \ - --hash=sha256:bd96517ef76c8654446fc3db9242d019a1bb5fe8b751ba414765d59f99210b79 \ - --hash=sha256:c00f323cc00576df6165cc9d21a4c21285fa6b9989c5c39830c3903dc4303ef3 \ - --hash=sha256:c162b216070f280fa7da844531169be0baf9ccb17263cf5a8bf876fcd3117fa5 \ - --hash=sha256:c1a69e58a6bb2de65902051d57fde951febad631a20a64572677a1052690482f \ - --hash=sha256:c1f794c02903c2824fccce5b20c339a1a14b114e83b306ff11b597c5f71a1c8d \ - --hash=sha256:c24037349665434f375645fa9d1f5304800cec574d0310f618490c871fd902b3 \ - --hash=sha256:c300306673aa0f3ed5ed9372b21867690a17dba38c68c44b287437c362ce486b \ - --hash=sha256:c56a1d43b2f9ee4786e4658c7903f05da35b923fb53c11025712562d5cc02753 \ - --hash=sha256:c6379f35350b655fd817cd0d6cbeef7f265f3ae5fedb1caae2eb442bbeae9ab9 \ - --hash=sha256:c802e1c2ed9f0c06a65bc4ed0189d000ada8049312cfeab6ca635e39c9608957 \ - --hash=sha256:cb83f8a875b3d9b458cada4f880fa498646874ba4011dc974e071a0a84a1b033 \ - --hash=sha256:cf120cce539453ae086eacc0130a324e7026113510efa83ab42ef3fcfccac7fb \ - --hash=sha256:dd36439be765e2dde7660212b5275641edbc813e7b24668831a5c8ac91180656 \ - --hash=sha256:dd5350b55f9fecddc51385463a4f67a5da829bc741e38cf689f38ec9023f54ab \ - --hash=sha256:df5c7333167b9674aa8ae1d4008fa4bc17a313cc490b2cca27838bbdcc6bb15b \ - --hash=sha256:e63601ad5cd8f860aa99d109889b5ac34de571c7ee902d6812d5d9ddcc77fa7d \ - --hash=sha256:e92ce66cd919d18d14b3856906a61d3f6b6a8500e0794142338da644260595cd \ - --hash=sha256:e99f5507401436fdcc85036a2e7dc2e28d962550afe1cbfc07c40e454256a859 \ - --hash=sha256:ea2e2f6f801696ad7de8aec061044d6c8c0dd4037608c7cab38a9a4d316bfb11 \ - --hash=sha256:eafa2c8658f4e560b098fe9fc54539f86528651f61849b22111a9b107d18910c \ - --hash=sha256:ecd4ad8453ac17bc7ba3868371bffb46f628161ad0eefbd0a855d2c8c32dd81a \ - --hash=sha256:ee70d08fd60c9565ba8190f41a46a54096afa0eeb8f76bd66f2c25d3b1b83005 \ - --hash=sha256:eec1bb8cdbba2925bedc887bc0609a80e599c75b12d87ae42ac23fd199445654 \ - --hash=sha256:ef0c1fe22171dd7c7c27147f2e9c3e86f8bdf473fed75f16b0c2e84a5030ce80 \ - --hash=sha256:f2901429da1e645ce548bf9171784c0f74f0718c3f6150ce166be39e4dd66c3e \ - --hash=sha256:f422a209d2455c56849442ae42f25dbaaba1c6c3f501d58761c619c7836642ec \ - --hash=sha256:f65e5120863c2b266dbcc927b306c5b78e502c71edf3295dfcb9501ec96e5fc7 \ - --hash=sha256:f7d4a670107d75dfe5ad080bed6c341d18c4442f9378c9f58e5851e86eb79965 \ - --hash=sha256:f914c03e6a31deb632e2daa881fe198461f4d06e57ac3d0e05bbcab8eae01945 \ - --hash=sha256:fb66442c2546446944437df74379e9cf9e9db353e61301d1a0e26482f43f0dd8 +lxml==5.2.2 \ + --hash=sha256:02437fb7308386867c8b7b0e5bc4cd4b04548b1c5d089ffb8e7b31009b961dc3 \ + --hash=sha256:02f6a8eb6512fdc2fd4ca10a49c341c4e109aa6e9448cc4859af5b949622715a \ + --hash=sha256:05f8757b03208c3f50097761be2dea0aba02e94f0dc7023ed73a7bb14ff11eb0 \ + --hash=sha256:06668e39e1f3c065349c51ac27ae430719d7806c026fec462e5693b08b95696b \ + --hash=sha256:07542787f86112d46d07d4f3c4e7c760282011b354d012dc4141cc12a68cef5f \ + --hash=sha256:08ea0f606808354eb8f2dfaac095963cb25d9d28e27edcc375d7b30ab01abbf6 \ + --hash=sha256:0969e92af09c5687d769731e3f39ed62427cc72176cebb54b7a9d52cc4fa3b73 \ + --hash=sha256:0a028b61a2e357ace98b1615fc03f76eb517cc028993964fe08ad514b1e8892d \ + --hash=sha256:0b3f5016e00ae7630a4b83d0868fca1e3d494c78a75b1c7252606a3a1c5fc2ad \ + --hash=sha256:13e69be35391ce72712184f69000cda04fc89689429179bc4c0ae5f0b7a8c21b \ + --hash=sha256:16a8326e51fcdffc886294c1e70b11ddccec836516a343f9ed0f82aac043c24a \ + --hash=sha256:19b4e485cd07b7d83e3fe3b72132e7df70bfac22b14fe4bf7a23822c3a35bff5 \ + --hash=sha256:1a2569a1f15ae6c8c64108a2cd2b4a858fc1e13d25846be0666fc144715e32ab \ + --hash=sha256:1a7aca7964ac4bb07680d5c9d63b9d7028cace3e2d43175cb50bba8c5ad33316 \ + --hash=sha256:1b590b39ef90c6b22ec0be925b211298e810b4856909c8ca60d27ffbca6c12e6 \ + --hash=sha256:1d8a701774dfc42a2f0b8ccdfe7dbc140500d1049e0632a611985d943fcf12df \ + --hash=sha256:1e275ea572389e41e8b039ac076a46cb87ee6b8542df3fff26f5baab43713bca \ + --hash=sha256:2304d3c93f2258ccf2cf7a6ba8c761d76ef84948d87bf9664e14d203da2cd264 \ + --hash=sha256:23441e2b5339bc54dc949e9e675fa35efe858108404ef9aa92f0456929ef6fe8 \ + --hash=sha256:23cfafd56887eaed93d07bc4547abd5e09d837a002b791e9767765492a75883f \ + --hash=sha256:28bf95177400066596cdbcfc933312493799382879da504633d16cf60bba735b \ + --hash=sha256:2eb2227ce1ff998faf0cd7fe85bbf086aa41dfc5af3b1d80867ecfe75fb68df3 \ + --hash=sha256:2fb0ba3e8566548d6c8e7dd82a8229ff47bd8fb8c2da237607ac8e5a1b8312e5 \ + --hash=sha256:303f540ad2dddd35b92415b74b900c749ec2010e703ab3bfd6660979d01fd4ed \ + --hash=sha256:339ee4a4704bc724757cd5dd9dc8cf4d00980f5d3e6e06d5847c1b594ace68ab \ + --hash=sha256:33ce9e786753743159799fdf8e92a5da351158c4bfb6f2db0bf31e7892a1feb5 \ + --hash=sha256:343ab62e9ca78094f2306aefed67dcfad61c4683f87eee48ff2fd74902447726 \ + --hash=sha256:34e17913c431f5ae01d8658dbf792fdc457073dcdfbb31dc0cc6ab256e664a8d \ + --hash=sha256:364d03207f3e603922d0d3932ef363d55bbf48e3647395765f9bfcbdf6d23632 \ + --hash=sha256:38b67afb0a06b8575948641c1d6d68e41b83a3abeae2ca9eed2ac59892b36706 \ + --hash=sha256:3a745cc98d504d5bd2c19b10c79c61c7c3df9222629f1b6210c0368177589fb8 \ + --hash=sha256:3b019d4ee84b683342af793b56bb35034bd749e4cbdd3d33f7d1107790f8c472 \ + --hash=sha256:3b6a30a9ab040b3f545b697cb3adbf3696c05a3a68aad172e3fd7ca73ab3c835 \ + --hash=sha256:3d1e35572a56941b32c239774d7e9ad724074d37f90c7a7d499ab98761bd80cf \ + --hash=sha256:3d98de734abee23e61f6b8c2e08a88453ada7d6486dc7cdc82922a03968928db \ + --hash=sha256:453d037e09a5176d92ec0fd282e934ed26d806331a8b70ab431a81e2fbabf56d \ + --hash=sha256:45f9494613160d0405682f9eee781c7e6d1bf45f819654eb249f8f46a2c22545 \ + --hash=sha256:4820c02195d6dfb7b8508ff276752f6b2ff8b64ae5d13ebe02e7667e035000b9 \ + --hash=sha256:49095a38eb333aaf44c06052fd2ec3b8f23e19747ca7ec6f6c954ffea6dbf7be \ + --hash=sha256:4aefd911793b5d2d7a921233a54c90329bf3d4a6817dc465f12ffdfe4fc7b8fe \ + --hash=sha256:4bc6cb140a7a0ad1f7bc37e018d0ed690b7b6520ade518285dc3171f7a117905 \ + --hash=sha256:4c30a2f83677876465f44c018830f608fa3c6a8a466eb223535035fbc16f3438 \ + --hash=sha256:50127c186f191b8917ea2fb8b206fbebe87fd414a6084d15568c27d0a21d60db \ + --hash=sha256:50ccb5d355961c0f12f6cf24b7187dbabd5433f29e15147a67995474f27d1776 \ + --hash=sha256:519895c99c815a1a24a926d5b60627ce5ea48e9f639a5cd328bda0515ea0f10c \ + --hash=sha256:54401c77a63cc7d6dc4b4e173bb484f28a5607f3df71484709fe037c92d4f0ed \ + --hash=sha256:546cf886f6242dff9ec206331209db9c8e1643ae642dea5fdbecae2453cb50fd \ + --hash=sha256:55ce6b6d803890bd3cc89975fca9de1dff39729b43b73cb15ddd933b8bc20484 \ + --hash=sha256:56793b7a1a091a7c286b5f4aa1fe4ae5d1446fe742d00cdf2ffb1077865db10d \ + --hash=sha256:57f0a0bbc9868e10ebe874e9f129d2917750adf008fe7b9c1598c0fbbfdde6a6 \ + --hash=sha256:5b8c041b6265e08eac8a724b74b655404070b636a8dd6d7a13c3adc07882ef30 \ + --hash=sha256:5e097646944b66207023bc3c634827de858aebc226d5d4d6d16f0b77566ea182 \ + --hash=sha256:60499fe961b21264e17a471ec296dcbf4365fbea611bf9e303ab69db7159ce61 \ + --hash=sha256:610b5c77428a50269f38a534057444c249976433f40f53e3b47e68349cca1425 \ + --hash=sha256:625e3ef310e7fa3a761d48ca7ea1f9d8718a32b1542e727d584d82f4453d5eeb \ + --hash=sha256:657a972f46bbefdbba2d4f14413c0d079f9ae243bd68193cb5061b9732fa54c1 \ + --hash=sha256:69ab77a1373f1e7563e0fb5a29a8440367dec051da6c7405333699d07444f511 \ + --hash=sha256:6a520b4f9974b0a0a6ed73c2154de57cdfd0c8800f4f15ab2b73238ffed0b36e \ + --hash=sha256:6d68ce8e7b2075390e8ac1e1d3a99e8b6372c694bbe612632606d1d546794207 \ + --hash=sha256:6dcc3d17eac1df7859ae01202e9bb11ffa8c98949dcbeb1069c8b9a75917e01b \ + --hash=sha256:6dfdc2bfe69e9adf0df4915949c22a25b39d175d599bf98e7ddf620a13678585 \ + --hash=sha256:739e36ef7412b2bd940f75b278749106e6d025e40027c0b94a17ef7968d55d56 \ + --hash=sha256:7429e7faa1a60cad26ae4227f4dd0459efde239e494c7312624ce228e04f6391 \ + --hash=sha256:74da9f97daec6928567b48c90ea2c82a106b2d500f397eeb8941e47d30b1ca85 \ + --hash=sha256:74e4f025ef3db1c6da4460dd27c118d8cd136d0391da4e387a15e48e5c975147 \ + --hash=sha256:75a9632f1d4f698b2e6e2e1ada40e71f369b15d69baddb8968dcc8e683839b18 \ + --hash=sha256:76acba4c66c47d27c8365e7c10b3d8016a7da83d3191d053a58382311a8bf4e1 \ + --hash=sha256:79d1fb9252e7e2cfe4de6e9a6610c7cbb99b9708e2c3e29057f487de5a9eaefa \ + --hash=sha256:7ce7ad8abebe737ad6143d9d3bf94b88b93365ea30a5b81f6877ec9c0dee0a48 \ + --hash=sha256:7ed07b3062b055d7a7f9d6557a251cc655eed0b3152b76de619516621c56f5d3 \ + --hash=sha256:7ff762670cada8e05b32bf1e4dc50b140790909caa8303cfddc4d702b71ea184 \ + --hash=sha256:8268cbcd48c5375f46e000adb1390572c98879eb4f77910c6053d25cc3ac2c67 \ + --hash=sha256:875a3f90d7eb5c5d77e529080d95140eacb3c6d13ad5b616ee8095447b1d22e7 \ + --hash=sha256:89feb82ca055af0fe797a2323ec9043b26bc371365847dbe83c7fd2e2f181c34 \ + --hash=sha256:8a7e24cb69ee5f32e003f50e016d5fde438010c1022c96738b04fc2423e61706 \ + --hash=sha256:8ab6a358d1286498d80fe67bd3d69fcbc7d1359b45b41e74c4a26964ca99c3f8 \ + --hash=sha256:8b8df03a9e995b6211dafa63b32f9d405881518ff1ddd775db4e7b98fb545e1c \ + --hash=sha256:8cf85a6e40ff1f37fe0f25719aadf443686b1ac7652593dc53c7ef9b8492b115 \ + --hash=sha256:8e8d351ff44c1638cb6e980623d517abd9f580d2e53bfcd18d8941c052a5a009 \ + --hash=sha256:9164361769b6ca7769079f4d426a41df6164879f7f3568be9086e15baca61466 \ + --hash=sha256:96e85aa09274955bb6bd483eaf5b12abadade01010478154b0ec70284c1b1526 \ + --hash=sha256:981a06a3076997adf7c743dcd0d7a0415582661e2517c7d961493572e909aa1d \ + --hash=sha256:9cd5323344d8ebb9fb5e96da5de5ad4ebab993bbf51674259dbe9d7a18049525 \ + --hash=sha256:9d6c6ea6a11ca0ff9cd0390b885984ed31157c168565702959c25e2191674a14 \ + --hash=sha256:a02d3c48f9bb1e10c7788d92c0c7db6f2002d024ab6e74d6f45ae33e3d0288a3 \ + --hash=sha256:a233bb68625a85126ac9f1fc66d24337d6e8a0f9207b688eec2e7c880f012ec0 \ + --hash=sha256:a2f6a1bc2460e643785a2cde17293bd7a8f990884b822f7bca47bee0a82fc66b \ + --hash=sha256:a6d17e0370d2516d5bb9062c7b4cb731cff921fc875644c3d751ad857ba9c5b1 \ + --hash=sha256:a6d2092797b388342c1bc932077ad232f914351932353e2e8706851c870bca1f \ + --hash=sha256:ab67ed772c584b7ef2379797bf14b82df9aa5f7438c5b9a09624dd834c1c1aaf \ + --hash=sha256:ac6540c9fff6e3813d29d0403ee7a81897f1d8ecc09a8ff84d2eea70ede1cdbf \ + --hash=sha256:ae4073a60ab98529ab8a72ebf429f2a8cc612619a8c04e08bed27450d52103c0 \ + --hash=sha256:ae791f6bd43305aade8c0e22f816b34f3b72b6c820477aab4d18473a37e8090b \ + --hash=sha256:aef5474d913d3b05e613906ba4090433c515e13ea49c837aca18bde190853dff \ + --hash=sha256:b0b3f2df149efb242cee2ffdeb6674b7f30d23c9a7af26595099afaf46ef4e88 \ + --hash=sha256:b128092c927eaf485928cec0c28f6b8bead277e28acf56800e972aa2c2abd7a2 \ + --hash=sha256:b16db2770517b8799c79aa80f4053cd6f8b716f21f8aca962725a9565ce3ee40 \ + --hash=sha256:b336b0416828022bfd5a2e3083e7f5ba54b96242159f83c7e3eebaec752f1716 \ + --hash=sha256:b47633251727c8fe279f34025844b3b3a3e40cd1b198356d003aa146258d13a2 \ + --hash=sha256:b537bd04d7ccd7c6350cdaaaad911f6312cbd61e6e6045542f781c7f8b2e99d2 \ + --hash=sha256:b5e4ef22ff25bfd4ede5f8fb30f7b24446345f3e79d9b7455aef2836437bc38a \ + --hash=sha256:b74b9ea10063efb77a965a8d5f4182806fbf59ed068b3c3fd6f30d2ac7bee734 \ + --hash=sha256:bb2dc4898180bea79863d5487e5f9c7c34297414bad54bcd0f0852aee9cfdb87 \ + --hash=sha256:bbc4b80af581e18568ff07f6395c02114d05f4865c2812a1f02f2eaecf0bfd48 \ + --hash=sha256:bcc98f911f10278d1daf14b87d65325851a1d29153caaf146877ec37031d5f36 \ + --hash=sha256:be49ad33819d7dcc28a309b86d4ed98e1a65f3075c6acd3cd4fe32103235222b \ + --hash=sha256:bec4bd9133420c5c52d562469c754f27c5c9e36ee06abc169612c959bd7dbb07 \ + --hash=sha256:c2faf60c583af0d135e853c86ac2735ce178f0e338a3c7f9ae8f622fd2eb788c \ + --hash=sha256:c689d0d5381f56de7bd6966a4541bff6e08bf8d3871bbd89a0c6ab18aa699573 \ + --hash=sha256:c7079d5eb1c1315a858bbf180000757db8ad904a89476653232db835c3114001 \ + --hash=sha256:cb3942960f0beb9f46e2a71a3aca220d1ca32feb5a398656be934320804c0df9 \ + --hash=sha256:cd9e78285da6c9ba2d5c769628f43ef66d96ac3085e59b10ad4f3707980710d3 \ + --hash=sha256:cf2a978c795b54c539f47964ec05e35c05bd045db5ca1e8366988c7f2fe6b3ce \ + --hash=sha256:d14a0d029a4e176795cef99c056d58067c06195e0c7e2dbb293bf95c08f772a3 \ + --hash=sha256:d237ba6664b8e60fd90b8549a149a74fcc675272e0e95539a00522e4ca688b04 \ + --hash=sha256:d26a618ae1766279f2660aca0081b2220aca6bd1aa06b2cf73f07383faf48927 \ + --hash=sha256:d28cb356f119a437cc58a13f8135ab8a4c8ece18159eb9194b0d269ec4e28083 \ + --hash=sha256:d4ed0c7cbecde7194cd3228c044e86bf73e30a23505af852857c09c24e77ec5d \ + --hash=sha256:d83e2d94b69bf31ead2fa45f0acdef0757fa0458a129734f59f67f3d2eb7ef32 \ + --hash=sha256:d8bbcd21769594dbba9c37d3c819e2d5847656ca99c747ddb31ac1701d0c0ed9 \ + --hash=sha256:d9b342c76003c6b9336a80efcc766748a333573abf9350f4094ee46b006ec18f \ + --hash=sha256:dc911208b18842a3a57266d8e51fc3cfaccee90a5351b92079beed912a7914c2 \ + --hash=sha256:dfa7c241073d8f2b8e8dbc7803c434f57dbb83ae2a3d7892dd068d99e96efe2c \ + --hash=sha256:e282aedd63c639c07c3857097fc0e236f984ceb4089a8b284da1c526491e3f3d \ + --hash=sha256:e290d79a4107d7d794634ce3e985b9ae4f920380a813717adf61804904dc4393 \ + --hash=sha256:e3d9d13603410b72787579769469af730c38f2f25505573a5888a94b62b920f8 \ + --hash=sha256:e481bba1e11ba585fb06db666bfc23dbe181dbafc7b25776156120bf12e0d5a6 \ + --hash=sha256:e49b052b768bb74f58c7dda4e0bdf7b79d43a9204ca584ffe1fb48a6f3c84c66 \ + --hash=sha256:eb00b549b13bd6d884c863554566095bf6fa9c3cecb2e7b399c4bc7904cb33b5 \ + --hash=sha256:ec87c44f619380878bd49ca109669c9f221d9ae6883a5bcb3616785fa8f94c97 \ + --hash=sha256:edcfa83e03370032a489430215c1e7783128808fd3e2e0a3225deee278585196 \ + --hash=sha256:f11ae142f3a322d44513de1018b50f474f8f736bc3cd91d969f464b5bfef8836 \ + --hash=sha256:f2a09f6184f17a80897172863a655467da2b11151ec98ba8d7af89f17bf63dae \ + --hash=sha256:f5b65529bb2f21ac7861a0e94fdbf5dc0daab41497d18223b46ee8515e5ad297 \ + --hash=sha256:f60fdd125d85bf9c279ffb8e94c78c51b3b6a37711464e1f5f31078b45002421 \ + --hash=sha256:f61efaf4bed1cc0860e567d2ecb2363974d414f7f1f124b1df368bbf183453a6 \ + --hash=sha256:f90e552ecbad426eab352e7b2933091f2be77115bb16f09f78404861c8322981 \ + --hash=sha256:f956196ef61369f1685d14dad80611488d8dc1ef00be57c0c5a03064005b0f30 \ + --hash=sha256:fb91819461b1b56d06fa4bcf86617fac795f6a99d12239fb0c68dbeba41a0a30 \ + --hash=sha256:fbc9d316552f9ef7bba39f4edfad4a734d3d6f93341232a9dddadec4f15d425f \ + --hash=sha256:ff69a9a0b4b17d78170c73abe2ab12084bdf1691550c5629ad1fe7849433f324 \ + --hash=sha256:ffb2be176fed4457e445fe540617f0252a72a8bc56208fd65a690fdb1f57660b # via -r requirements.in markupsafe==2.1.5 \ --hash=sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf \ @@ -415,64 +419,68 @@ platformdirs==4.3.6 \ # via # black # virtualenv -PyYAML==6.0.2 \ - --hash=sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff \ - --hash=sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48 \ - --hash=sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086 \ - --hash=sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e \ - --hash=sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133 \ - --hash=sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5 \ - --hash=sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484 \ - --hash=sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee \ - --hash=sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5 \ - --hash=sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68 \ - --hash=sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a \ - --hash=sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf \ - --hash=sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99 \ - --hash=sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8 \ - --hash=sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85 \ - --hash=sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19 \ - --hash=sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc \ - --hash=sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a \ - --hash=sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1 \ - --hash=sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317 \ - --hash=sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c \ - --hash=sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631 \ - --hash=sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d \ - --hash=sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652 \ - --hash=sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5 \ - --hash=sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e \ - --hash=sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b \ - --hash=sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8 \ - --hash=sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476 \ - --hash=sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706 \ - --hash=sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563 \ - --hash=sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237 \ - --hash=sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b \ - --hash=sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083 \ - --hash=sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180 \ - --hash=sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425 \ - --hash=sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e \ - --hash=sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f \ - --hash=sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725 \ - --hash=sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183 \ - --hash=sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab \ - --hash=sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774 \ - --hash=sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725 \ - --hash=sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e \ - --hash=sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5 \ - --hash=sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d \ - --hash=sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290 \ - --hash=sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44 \ - --hash=sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed \ - --hash=sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4 \ - --hash=sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba \ - --hash=sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12 \ - --hash=sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4 +pyyaml==6.0.1 \ + --hash=sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5 \ + --hash=sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc \ + --hash=sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df \ + --hash=sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741 \ + --hash=sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206 \ + --hash=sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27 \ + --hash=sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595 \ + --hash=sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62 \ + --hash=sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98 \ + --hash=sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696 \ + --hash=sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290 \ + --hash=sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9 \ + --hash=sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d \ + --hash=sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6 \ + --hash=sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867 \ + --hash=sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47 \ + --hash=sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486 \ + --hash=sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6 \ + --hash=sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3 \ + --hash=sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007 \ + --hash=sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938 \ + --hash=sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0 \ + --hash=sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c \ + --hash=sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735 \ + --hash=sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d \ + --hash=sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28 \ + --hash=sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4 \ + --hash=sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba \ + --hash=sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8 \ + --hash=sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef \ + --hash=sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5 \ + --hash=sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd \ + --hash=sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3 \ + --hash=sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0 \ + --hash=sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515 \ + --hash=sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c \ + --hash=sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c \ + --hash=sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924 \ + --hash=sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34 \ + --hash=sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43 \ + --hash=sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859 \ + --hash=sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673 \ + --hash=sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54 \ + --hash=sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a \ + --hash=sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b \ + --hash=sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab \ + --hash=sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa \ + --hash=sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c \ + --hash=sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585 \ + --hash=sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d \ + --hash=sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f # via -r requirements.in requests==2.32.3 \ --hash=sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760 \ --hash=sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6 + # via + # -r requirements.in + # requests-mock +requests-mock==1.12.1 \ + --hash=sha256:b1e37054004cdd5e56c84454cc7df12b25f90f382159087f4b6915aaeef39563 \ + --hash=sha256:e9e12e333b525156e82a3c852f22016b9158220d2f47454de9cae8a77d371401 # via -r requirements.in smmap==5.0.1 \ --hash=sha256:dceeb6c0028fdb6734471eb07c0cd2aae706ccaecab45965ee83f11c8d3b1f62 \ @@ -496,42 +504,39 @@ virtualenv==20.26.5 \ --hash=sha256:4f3ac17b81fba3ce3bd6f4ead2749a72da5929c01774948e243db9ba41df4ff6 \ --hash=sha256:ce489cac131aa58f4b25e321d6d186171f78e6cb13fafbf32a840cee67733ff4 # via nox -watchdog==4.0.2 \ - --hash=sha256:0b4359067d30d5b864e09c8597b112fe0a0a59321a0f331498b013fb097406b4 \ - --hash=sha256:0d8a7e523ef03757a5aa29f591437d64d0d894635f8a50f370fe37f913ce4e19 \ - --hash=sha256:0e83619a2d5d436a7e58a1aea957a3c1ccbf9782c43c0b4fed80580e5e4acd1a \ - --hash=sha256:10b6683df70d340ac3279eff0b2766813f00f35a1d37515d2c99959ada8f05fa \ - --hash=sha256:132937547a716027bd5714383dfc40dc66c26769f1ce8a72a859d6a48f371f3a \ - --hash=sha256:1cdcfd8142f604630deef34722d695fb455d04ab7cfe9963055df1fc69e6727a \ - --hash=sha256:2d468028a77b42cc685ed694a7a550a8d1771bb05193ba7b24006b8241a571a1 \ - --hash=sha256:32be97f3b75693a93c683787a87a0dc8db98bb84701539954eef991fb35f5fbc \ - --hash=sha256:770eef5372f146997638d737c9a3c597a3b41037cfbc5c41538fc27c09c3a3f9 \ - --hash=sha256:7c7d4bf585ad501c5f6c980e7be9c4f15604c7cc150e942d82083b31a7548930 \ - --hash=sha256:88456d65f207b39f1981bf772e473799fcdc10801062c36fd5ad9f9d1d463a73 \ - --hash=sha256:914285126ad0b6eb2258bbbcb7b288d9dfd655ae88fa28945be05a7b475a800b \ - --hash=sha256:936acba76d636f70db8f3c66e76aa6cb5136a936fc2a5088b9ce1c7a3508fc83 \ - --hash=sha256:980b71510f59c884d684b3663d46e7a14b457c9611c481e5cef08f4dd022eed7 \ - --hash=sha256:984306dc4720da5498b16fc037b36ac443816125a3705dfde4fd90652d8028ef \ - --hash=sha256:a2cffa171445b0efa0726c561eca9a27d00a1f2b83846dbd5a4f639c4f8ca8e1 \ - --hash=sha256:aa160781cafff2719b663c8a506156e9289d111d80f3387cf3af49cedee1f040 \ - --hash=sha256:b2c45f6e1e57ebb4687690c05bc3a2c1fb6ab260550c4290b8abb1335e0fd08b \ - --hash=sha256:b4dfbb6c49221be4535623ea4474a4d6ee0a9cef4a80b20c28db4d858b64e270 \ - --hash=sha256:baececaa8edff42cd16558a639a9b0ddf425f93d892e8392a56bf904f5eff22c \ - --hash=sha256:bcfd02377be80ef3b6bc4ce481ef3959640458d6feaae0bd43dd90a43da90a7d \ - --hash=sha256:c0b14488bd336c5b1845cee83d3e631a1f8b4e9c5091ec539406e4a324f882d8 \ - --hash=sha256:c100d09ac72a8a08ddbf0629ddfa0b8ee41740f9051429baa8e31bb903ad7508 \ - --hash=sha256:c344453ef3bf875a535b0488e3ad28e341adbd5a9ffb0f7d62cefacc8824ef2b \ - --hash=sha256:c50f148b31b03fbadd6d0b5980e38b558046b127dc483e5e4505fcef250f9503 \ - --hash=sha256:c82253cfc9be68e3e49282831afad2c1f6593af80c0daf1287f6a92657986757 \ - --hash=sha256:cd67c7df93eb58f360c43802acc945fa8da70c675b6fa37a241e17ca698ca49b \ - --hash=sha256:d7ab624ff2f663f98cd03c8b7eedc09375a911794dfea6bf2a359fcc266bff29 \ - --hash=sha256:e252f8ca942a870f38cf785aef420285431311652d871409a64e2a0a52a2174c \ - --hash=sha256:ede7f010f2239b97cc79e6cb3c249e72962404ae3865860855d5cbe708b0fd22 \ - --hash=sha256:eeea812f38536a0aa859972d50c76e37f4456474b02bd93674d1947cf1e39578 \ - --hash=sha256:f15edcae3830ff20e55d1f4e743e92970c847bcddc8b7509bcd172aa04de506e \ - --hash=sha256:f5315a8c8dd6dd9425b974515081fc0aadca1d1d61e078d2246509fd756141ee \ - --hash=sha256:f6ee8dedd255087bc7fe82adf046f0b75479b989185fb0bdf9a98b612170eac7 \ - --hash=sha256:f7c739888c20f99824f7aa9d31ac8a97353e22d0c0e54703a547a218f6637eb3 +watchdog==4.0.1 \ + --hash=sha256:0144c0ea9997b92615af1d94afc0c217e07ce2c14912c7b1a5731776329fcfc7 \ + --hash=sha256:03e70d2df2258fb6cb0e95bbdbe06c16e608af94a3ffbd2b90c3f1e83eb10767 \ + --hash=sha256:093b23e6906a8b97051191a4a0c73a77ecc958121d42346274c6af6520dec175 \ + --hash=sha256:123587af84260c991dc5f62a6e7ef3d1c57dfddc99faacee508c71d287248459 \ + --hash=sha256:17e32f147d8bf9657e0922c0940bcde863b894cd871dbb694beb6704cfbd2fb5 \ + --hash=sha256:206afc3d964f9a233e6ad34618ec60b9837d0582b500b63687e34011e15bb429 \ + --hash=sha256:4107ac5ab936a63952dea2a46a734a23230aa2f6f9db1291bf171dac3ebd53c6 \ + --hash=sha256:4513ec234c68b14d4161440e07f995f231be21a09329051e67a2118a7a612d2d \ + --hash=sha256:611be3904f9843f0529c35a3ff3fd617449463cb4b73b1633950b3d97fa4bfb7 \ + --hash=sha256:62c613ad689ddcb11707f030e722fa929f322ef7e4f18f5335d2b73c61a85c28 \ + --hash=sha256:667f3c579e813fcbad1b784db7a1aaa96524bed53437e119f6a2f5de4db04235 \ + --hash=sha256:6e8c70d2cd745daec2a08734d9f63092b793ad97612470a0ee4cbb8f5f705c57 \ + --hash=sha256:7577b3c43e5909623149f76b099ac49a1a01ca4e167d1785c76eb52fa585745a \ + --hash=sha256:998d2be6976a0ee3a81fb8e2777900c28641fb5bfbd0c84717d89bca0addcdc5 \ + --hash=sha256:a3c2c317a8fb53e5b3d25790553796105501a235343f5d2bf23bb8649c2c8709 \ + --hash=sha256:ab998f567ebdf6b1da7dc1e5accfaa7c6992244629c0fdaef062f43249bd8dee \ + --hash=sha256:ac7041b385f04c047fcc2951dc001671dee1b7e0615cde772e84b01fbf68ee84 \ + --hash=sha256:bca36be5707e81b9e6ce3208d92d95540d4ca244c006b61511753583c81c70dd \ + --hash=sha256:c9904904b6564d4ee8a1ed820db76185a3c96e05560c776c79a6ce5ab71888ba \ + --hash=sha256:cad0bbd66cd59fc474b4a4376bc5ac3fc698723510cbb64091c2a793b18654db \ + --hash=sha256:d10a681c9a1d5a77e75c48a3b8e1a9f2ae2928eda463e8d33660437705659682 \ + --hash=sha256:d4925e4bf7b9bddd1c3de13c9b8a2cdb89a468f640e66fbfabaf735bd85b3e35 \ + --hash=sha256:d7b9f5f3299e8dd230880b6c55504a1f69cf1e4316275d1b215ebdd8187ec88d \ + --hash=sha256:da2dfdaa8006eb6a71051795856bedd97e5b03e57da96f98e375682c48850645 \ + --hash=sha256:dddba7ca1c807045323b6af4ff80f5ddc4d654c8bce8317dde1bd96b128ed253 \ + --hash=sha256:e7921319fe4430b11278d924ef66d4daa469fafb1da679a2e48c935fa27af193 \ + --hash=sha256:e93f451f2dfa433d97765ca2634628b789b49ba8b504fdde5837cdcf25fdb53b \ + --hash=sha256:eebaacf674fa25511e8867028d281e602ee6500045b57f43b08778082f7f8b44 \ + --hash=sha256:ef0107bbb6a55f5be727cfc2ef945d5676b97bffb8425650dadbb184be9f9a2b \ + --hash=sha256:f0de0f284248ab40188f23380b03b59126d1479cd59940f2a34f8852db710625 \ + --hash=sha256:f27279d060e2ab24c0aa98363ff906d2386aa6c4dc2f1a374655d4e02a6c5e5e \ + --hash=sha256:f8affdf3c0f0466e69f5b3917cdd042f89c8c63aebdb9f7c078996f607cdb0f5 # via -r requirements.in # WARNING: The following packages were not pinned, but pip requires them to be From 0308d33d6c7a54f561bbf12cb83b252ad359bff0 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Mon, 23 Sep 2024 20:14:13 -0400 Subject: [PATCH 11/17] change package --- .../owlbot/src/fix-license-headers.py | 2 +- .../owlbot/synthtool/gcp/common.py | 3 - .../owlbot/synthtool/languages/java.py | 81 +------------------ .../owlbot/synthtool/transforms.py | 2 +- 4 files changed, 5 insertions(+), 83 deletions(-) diff --git a/library_generation/owlbot/src/fix-license-headers.py b/library_generation/owlbot/src/fix-license-headers.py index 1c690b5d39..78ddf31adb 100644 --- a/library_generation/owlbot/src/fix-license-headers.py +++ b/library_generation/owlbot/src/fix-license-headers.py @@ -14,7 +14,7 @@ from pathlib import Path import glob -from synthtool.languages import java +from library_generation.owlbot.synthtool.languages import java root = Path(".").resolve() diff --git a/library_generation/owlbot/synthtool/gcp/common.py b/library_generation/owlbot/synthtool/gcp/common.py index f22b6647da..5cd648be36 100644 --- a/library_generation/owlbot/synthtool/gcp/common.py +++ b/library_generation/owlbot/synthtool/gcp/common.py @@ -14,13 +14,10 @@ import json import os -import re import sys -import shutil import yaml from pathlib import Path from typing import Dict, List, Optional -import jinja2 import logging from synthtool import _tracked_paths diff --git a/library_generation/owlbot/synthtool/languages/java.py b/library_generation/owlbot/synthtool/languages/java.py index 9e6dcaeed4..36f6fc88d4 100644 --- a/library_generation/owlbot/synthtool/languages/java.py +++ b/library_generation/owlbot/synthtool/languages/java.py @@ -12,16 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -import glob import os import xml.etree.ElementTree as ET import re import requests import yaml -import synthtool as s -import synthtool.gcp as gcp +import library_generation.owlbot.synthtool as s +import library_generation.owlbot.synthtool.gcp as gcp import logging -from synthtool.gcp import common, samples, snippets +from library_generation.owlbot.synthtool.gcp import common, samples, snippets from pathlib import Path from typing import Any, Optional, Dict, Iterable, List from datetime import date @@ -166,80 +165,6 @@ def version_from_maven_metadata(metadata: str) -> Optional[str]: return None -def _common_generation( - service: str, - version: str, - library: Path, - package_pattern: str, - suffix: str = "", - destination_name: str = None, - cloud_api: bool = True, - diregapic: bool = False, - preserve_gapic: bool = False, -): - """Helper function to execution the common generation cleanup actions. - - Fixes headers for protobuf classes and generated gRPC stub services. Copies - code and samples to their final destinations by convention. Runs the code - formatter on the generated code. - - Args: - service (str): Name of the service. - version (str): Service API version. - library (Path): Path to the temp directory with the generated library. - package_pattern (str): Package name template for fixing file headers. - suffix (str, optional): Suffix that the generated library folder. The - artman output differs from bazel's output directory. Defaults to "". - destination_name (str, optional): Override the service name for the - destination of the output code. Defaults to the service name. - preserve_gapic (bool, optional): Whether to preserve the gapic directory - prefix. Default False. - """ - - if destination_name is None: - destination_name = service - - cloud_prefix = "cloud-" if cloud_api else "" - package_name = package_pattern.format(service=service, version=version) - proto_library_name = f"proto-google-{cloud_prefix}{service}-{version}" - grpc_library_name = f"grpc-google-{cloud_prefix}{service}-{version}" - gapic_library_name = f"gapic-google-{cloud_prefix}{service}-{version}" - fix_proto_headers(library / f"{proto_library_name}{suffix}") - fix_grpc_headers(library / f"{grpc_library_name}{suffix}", package_name) - - if preserve_gapic: - s.copy( - [library / f"{gapic_library_name}{suffix}/src"], - f"{gapic_library_name}/src", - required=True, - ) - else: - s.copy( - [library / f"{gapic_library_name}{suffix}/src"], - f"google-{cloud_prefix}{destination_name}/src", - required=True, - ) - - s.copy( - [library / f"{grpc_library_name}{suffix}/src"], - f"{grpc_library_name}/src", - # For REST-only clients, like java-compute, gRPC artifact does not exist - required=(not diregapic), - ) - s.copy( - [library / f"{proto_library_name}{suffix}/src"], - f"{proto_library_name}/src", - required=True, - ) - - if preserve_gapic: - format_code(f"{gapic_library_name}/src") - else: - format_code(f"google-{cloud_prefix}{destination_name}/src") - format_code(f"{grpc_library_name}/src") - format_code(f"{proto_library_name}/src") - - def _merge_release_please(destination_text: str): handle_gh_release_key = "handleGHRelease" branches_key = "branches" diff --git a/library_generation/owlbot/synthtool/transforms.py b/library_generation/owlbot/synthtool/transforms.py index cf87995847..c14980ea6b 100644 --- a/library_generation/owlbot/synthtool/transforms.py +++ b/library_generation/owlbot/synthtool/transforms.py @@ -20,7 +20,7 @@ import sys import logging -from synthtool import _tracked_paths +from library_generation.owlbot.synthtool import _tracked_paths PathOrStr = Union[str, Path] ListOfPathsOrStrs = Iterable[Union[str, Path]] From f654d83dcd079b23e4edc3c9b6d7495a124c2787 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Mon, 23 Sep 2024 20:36:44 -0400 Subject: [PATCH 12/17] fix package --- library_generation/owlbot/synthtool/__init__.py | 2 -- library_generation/owlbot/synthtool/languages/java.py | 6 +++--- library_generation/owlbot/synthtool/transforms.py | 2 +- library_generation/test/owlbot/java_unit_tests.py | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/library_generation/owlbot/synthtool/__init__.py b/library_generation/owlbot/synthtool/__init__.py index 6e5f1f12e2..e2d44deaf0 100644 --- a/library_generation/owlbot/synthtool/__init__.py +++ b/library_generation/owlbot/synthtool/__init__.py @@ -14,8 +14,6 @@ """Synthtool synthesizes libraries from disparate sources.""" -import sys - from synthtool.transforms import ( move, replace, diff --git a/library_generation/owlbot/synthtool/languages/java.py b/library_generation/owlbot/synthtool/languages/java.py index 36f6fc88d4..3b8d321937 100644 --- a/library_generation/owlbot/synthtool/languages/java.py +++ b/library_generation/owlbot/synthtool/languages/java.py @@ -17,10 +17,10 @@ import re import requests import yaml -import library_generation.owlbot.synthtool as s -import library_generation.owlbot.synthtool.gcp as gcp +import synthtool as s +import synthtool.gcp as gcp import logging -from library_generation.owlbot.synthtool.gcp import common, samples, snippets +from synthtool.gcp import common, samples, snippets from pathlib import Path from typing import Any, Optional, Dict, Iterable, List from datetime import date diff --git a/library_generation/owlbot/synthtool/transforms.py b/library_generation/owlbot/synthtool/transforms.py index c14980ea6b..cf87995847 100644 --- a/library_generation/owlbot/synthtool/transforms.py +++ b/library_generation/owlbot/synthtool/transforms.py @@ -20,7 +20,7 @@ import sys import logging -from library_generation.owlbot.synthtool import _tracked_paths +from synthtool import _tracked_paths PathOrStr = Union[str, Path] ListOfPathsOrStrs = Iterable[Union[str, Path]] diff --git a/library_generation/test/owlbot/java_unit_tests.py b/library_generation/test/owlbot/java_unit_tests.py index bf7c4f3643..3037afd263 100644 --- a/library_generation/test/owlbot/java_unit_tests.py +++ b/library_generation/test/owlbot/java_unit_tests.py @@ -22,7 +22,7 @@ import yaml from pathlib import Path import requests_mock -from library_generation.owlbot.synthtool.languages import java +from synthtool.languages import java from library_generation.test.owlbot import util TEST_OWLBOT = Path(__file__).parent.parent / "resources" / "test-owlbot" From 3e355bd32ba4a94681079511d3e08a4eda038ec3 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Mon, 23 Sep 2024 20:43:11 -0400 Subject: [PATCH 13/17] local install --- .github/workflows/verify_library_generation.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/verify_library_generation.yaml b/.github/workflows/verify_library_generation.yaml index 352207660f..9682f8e594 100644 --- a/.github/workflows/verify_library_generation.yaml +++ b/.github/workflows/verify_library_generation.yaml @@ -87,6 +87,7 @@ jobs: set -ex pushd library_generation pip install -r requirements.txt + pip install . popd - name: Run shell unit tests run: | From d3872d59256ad73bee83b3b742c6daea57b6f860 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Mon, 23 Sep 2024 20:48:02 -0400 Subject: [PATCH 14/17] restore package --- library_generation/owlbot/src/fix-license-headers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library_generation/owlbot/src/fix-license-headers.py b/library_generation/owlbot/src/fix-license-headers.py index 78ddf31adb..1c690b5d39 100644 --- a/library_generation/owlbot/src/fix-license-headers.py +++ b/library_generation/owlbot/src/fix-license-headers.py @@ -14,7 +14,7 @@ from pathlib import Path import glob -from library_generation.owlbot.synthtool.languages import java +from synthtool.languages import java root = Path(".").resolve() From a8e8a89d82589d28055d8e30c5f23b1fd8baabb7 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Mon, 23 Sep 2024 20:50:36 -0400 Subject: [PATCH 15/17] rm unused test resources --- .../defaults_test/.repo-metadata.json | 18 ------- .../java11-integration-golden.cfg | 38 --------------- .../nightly-integration-golden.cfg | 38 --------------- .../presubmit-integration-golden.cfg | 34 -------------- .../partials_test/.integration-partials.yaml | 10 ---- .../partials_test/.repo-metadata.json | 18 ------- .../java11-integration-golden.cfg | 47 ------------------- .../nightly-integration-golden.cfg | 47 ------------------- .../presubmit-integration-golden.cfg | 43 ----------------- 9 files changed, 293 deletions(-) delete mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/.repo-metadata.json delete mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/java11-integration-golden.cfg delete mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/nightly-integration-golden.cfg delete mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/presubmit-integration-golden.cfg delete mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/.integration-partials.yaml delete mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/.repo-metadata.json delete mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/java11-integration-golden.cfg delete mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/nightly-integration-golden.cfg delete mode 100644 library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/presubmit-integration-golden.cfg diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/.repo-metadata.json b/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/.repo-metadata.json deleted file mode 100644 index 840e69ca7a..0000000000 --- a/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_shortname": "cloudasset", - "name_pretty": "Cloud Asset Inventory", - "product_documentation": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview", - "api_reference": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview", - "api_description": "provides inventory services based on a time series database. This database keeps a five week history of Google Cloud asset metadata. The Cloud Asset Inventory export service allows you to export all asset metadata at a certain timestamp or export event change history during a timeframe.", - "client_documentation": "https://googleapis.dev/java/google-cloud-asset/latest/index.html", - "issue_tracker": "https://issuetracker.google.com/issues/new?component=187210&template=0", - "release_level": "stable", - "transport": "grpc", - "requires_billing": true, - "language": "java", - "repo": "googleapis/java-asset", - "repo_short": "java-asset", - "distribution_name": "com.google.cloud:google-cloud-asset", - "library_type": "GAPIC_AUTO", - "api_id": "cloudasset.googleapis.com" -} \ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/java11-integration-golden.cfg b/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/java11-integration-golden.cfg deleted file mode 100644 index 5d14a782d0..0000000000 --- a/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/java11-integration-golden.cfg +++ /dev/null @@ -1,38 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/java11014" -} - -env_vars: { - key: "JOB_TYPE" - value: "integration" -} -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "ENABLE_FLAKYBOT" - value: "false" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} - diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/nightly-integration-golden.cfg b/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/nightly-integration-golden.cfg deleted file mode 100644 index f1ccba78f8..0000000000 --- a/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/nightly-integration-golden.cfg +++ /dev/null @@ -1,38 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "integration" -} -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "ENABLE_FLAKYBOT" - value: "false" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} - diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/presubmit-integration-golden.cfg b/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/presubmit-integration-golden.cfg deleted file mode 100644 index 5864c603e5..0000000000 --- a/library_generation/test/resources/test-owlbot/fixtures/java_templates/defaults_test/presubmit-integration-golden.cfg +++ /dev/null @@ -1,34 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "integration" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} - diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/.integration-partials.yaml b/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/.integration-partials.yaml deleted file mode 100644 index bbc59eabda..0000000000 --- a/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/.integration-partials.yaml +++ /dev/null @@ -1,10 +0,0 @@ -integration_append: | - env_vars: { - key: "INTEGRATION_TEST_ARGS" - value: "-P bigtable-emulator-it" - } - - env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" - } diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/.repo-metadata.json b/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/.repo-metadata.json deleted file mode 100644 index 840e69ca7a..0000000000 --- a/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_shortname": "cloudasset", - "name_pretty": "Cloud Asset Inventory", - "product_documentation": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview", - "api_reference": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview", - "api_description": "provides inventory services based on a time series database. This database keeps a five week history of Google Cloud asset metadata. The Cloud Asset Inventory export service allows you to export all asset metadata at a certain timestamp or export event change history during a timeframe.", - "client_documentation": "https://googleapis.dev/java/google-cloud-asset/latest/index.html", - "issue_tracker": "https://issuetracker.google.com/issues/new?component=187210&template=0", - "release_level": "stable", - "transport": "grpc", - "requires_billing": true, - "language": "java", - "repo": "googleapis/java-asset", - "repo_short": "java-asset", - "distribution_name": "com.google.cloud:google-cloud-asset", - "library_type": "GAPIC_AUTO", - "api_id": "cloudasset.googleapis.com" -} \ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/java11-integration-golden.cfg b/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/java11-integration-golden.cfg deleted file mode 100644 index b83c0b7e8d..0000000000 --- a/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/java11-integration-golden.cfg +++ /dev/null @@ -1,47 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/java11014" -} - -env_vars: { - key: "JOB_TYPE" - value: "integration" -} -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "ENABLE_FLAKYBOT" - value: "false" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} - -env_vars: { - key: "INTEGRATION_TEST_ARGS" - value: "-P bigtable-emulator-it" -} - -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/nightly-integration-golden.cfg b/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/nightly-integration-golden.cfg deleted file mode 100644 index 85c9fdae32..0000000000 --- a/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/nightly-integration-golden.cfg +++ /dev/null @@ -1,47 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "integration" -} -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "ENABLE_FLAKYBOT" - value: "false" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} - -env_vars: { - key: "INTEGRATION_TEST_ARGS" - value: "-P bigtable-emulator-it" -} - -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} diff --git a/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/presubmit-integration-golden.cfg b/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/presubmit-integration-golden.cfg deleted file mode 100644 index f2a119bdc8..0000000000 --- a/library_generation/test/resources/test-owlbot/fixtures/java_templates/partials_test/presubmit-integration-golden.cfg +++ /dev/null @@ -1,43 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "integration" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} - -env_vars: { - key: "INTEGRATION_TEST_ARGS" - value: "-P bigtable-emulator-it" -} - -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} From 700f4e732b0259d39ba75e8f09a3be630d76e8fa Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Mon, 23 Sep 2024 20:52:11 -0400 Subject: [PATCH 16/17] regen requirements --- library_generation/requirements.txt | 48 ++++++++++++++--------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/library_generation/requirements.txt b/library_generation/requirements.txt index 9eb09cde8b..a320daefa9 100644 --- a/library_generation/requirements.txt +++ b/library_generation/requirements.txt @@ -2,12 +2,12 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --generate-hashes requirements.in +# pip-compile --generate-hashes library_generation/requirements.in # absl-py==2.1.0 \ --hash=sha256:526a04eadab8b4ee719ce68f204172ead1027549089702d99b9059f129ff1308 \ --hash=sha256:7820790efbb316739cde8b4e19357243fc3608a152024288513dd968d7d959ff - # via -r requirements.in + # via -r library_generation/requirements.in argcomplete==3.5.0 \ --hash=sha256:4349400469dccfb7950bb60334a680c58d88699bff6159df61251878dc6bf74b \ --hash=sha256:d4bcf3ff544f51e16e54228a7ac7f486ed70ebf2ecfe49a63a91171c76bf029b @@ -15,11 +15,11 @@ argcomplete==3.5.0 \ attr==0.3.2 \ --hash=sha256:1ceebca768181cdcce9827611b1d728e592be5d293911539ea3d0b0bfa1146f4 \ --hash=sha256:4f4bffeea8c27387bde446675a7ac24f3b8fea1075f12d849b5f5c5181fc8336 - # via -r requirements.in + # via -r library_generation/requirements.in attrs==23.2.0 \ --hash=sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30 \ --hash=sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1 - # via -r requirements.in + # via -r library_generation/requirements.in black==24.4.2 \ --hash=sha256:257d724c2c9b1660f353b36c802ccece186a30accc7742c176d29c146df6e474 \ --hash=sha256:37aae07b029fa0174d39daf02748b379399b909652a806e5708199bd93899da1 \ @@ -43,7 +43,7 @@ black==24.4.2 \ --hash=sha256:e151054aa00bad1f4e1f04919542885f89f5f7d086b8a59e5000e6c616896ffb \ --hash=sha256:eaea3008c281f1038edb473c1aa8ed8143a5535ff18f978a318f10302b254063 \ --hash=sha256:ef703f83fc32e131e9bcc0a5094cfe85599e7109f896fe8bc96cc402f3eb4b6e - # via -r requirements.in + # via -r library_generation/requirements.in certifi==2024.8.30 \ --hash=sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8 \ --hash=sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9 @@ -144,13 +144,13 @@ click==8.1.7 \ --hash=sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28 \ --hash=sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de # via - # -r requirements.in + # -r library_generation/requirements.in # black colorlog==6.8.2 \ --hash=sha256:3e3e079a41feb5a1b64f978b5ea4f46040a94f11f0e8bbb8261e3dbbeca64d44 \ --hash=sha256:4dcbb62368e2800cb3c5abd348da7e53f6c362dda502ec27c560b2e58a66bd33 # via - # -r requirements.in + # -r library_generation/requirements.in # nox distlib==0.3.8 \ --hash=sha256:034db59a0b96f8ca18035f36290806a9a6e6bd9d1ff91e45a7f172eb17e51784 \ @@ -164,12 +164,12 @@ gitdb==4.0.11 \ --hash=sha256:81a3407ddd2ee8df444cbacea00e2d038e40150acfa3001696fe0dcf1d3adfa4 \ --hash=sha256:bf5421126136d6d0af55bc1e7c1af1c397a34f5b7bd79e776cd3e89785c2b04b # via - # -r requirements.in + # -r library_generation/requirements.in # gitpython gitpython==3.1.43 \ --hash=sha256:35f314a9f878467f5453cc1fee295c3e18e52f1b99f10f6cf5b1682e968a9e7c \ --hash=sha256:eec7ec56b92aad751f9912a73404bc02ba212a23adb2c7098ee668417051a1ff - # via -r requirements.in + # via -r library_generation/requirements.in idna==3.10 \ --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 @@ -177,7 +177,7 @@ idna==3.10 \ jinja2==3.1.4 \ --hash=sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369 \ --hash=sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d - # via -r requirements.in + # via -r library_generation/requirements.in lxml==5.2.2 \ --hash=sha256:02437fb7308386867c8b7b0e5bc4cd4b04548b1c5d089ffb8e7b31009b961dc3 \ --hash=sha256:02f6a8eb6512fdc2fd4ca10a49c341c4e109aa6e9448cc4859af5b949622715a \ @@ -321,7 +321,7 @@ lxml==5.2.2 \ --hash=sha256:fbc9d316552f9ef7bba39f4edfad4a734d3d6f93341232a9dddadec4f15d425f \ --hash=sha256:ff69a9a0b4b17d78170c73abe2ab12084bdf1691550c5629ad1fe7849433f324 \ --hash=sha256:ffb2be176fed4457e445fe540617f0252a72a8bc56208fd65a690fdb1f57660b - # via -r requirements.in + # via -r library_generation/requirements.in markupsafe==2.1.5 \ --hash=sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf \ --hash=sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff \ @@ -384,34 +384,34 @@ markupsafe==2.1.5 \ --hash=sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd \ --hash=sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68 # via - # -r requirements.in + # -r library_generation/requirements.in # jinja2 mypy-extensions==1.0.0 \ --hash=sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d \ --hash=sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782 # via - # -r requirements.in + # -r library_generation/requirements.in # black nox==2024.4.15 \ --hash=sha256:6492236efa15a460ecb98e7b67562a28b70da006ab0be164e8821177577c0565 \ --hash=sha256:ecf6700199cdfa9e5ea0a41ff5e6ef4641d09508eda6edb89d9987864115817f - # via -r requirements.in + # via -r library_generation/requirements.in packaging==23.2 \ --hash=sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5 \ --hash=sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7 # via - # -r requirements.in + # -r library_generation/requirements.in # black # nox parameterized==0.9.0 \ --hash=sha256:4e0758e3d41bea3bbd05ec14fc2c24736723f243b28d702081aef438c9372b1b \ --hash=sha256:7fc905272cefa4f364c1a3429cbbe9c0f98b793988efb5bf90aac80f08db09b1 - # via -r requirements.in + # via -r library_generation/requirements.in pathspec==0.12.1 \ --hash=sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08 \ --hash=sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712 # via - # -r requirements.in + # -r library_generation/requirements.in # black platformdirs==4.3.6 \ --hash=sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907 \ @@ -471,31 +471,31 @@ pyyaml==6.0.1 \ --hash=sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585 \ --hash=sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d \ --hash=sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f - # via -r requirements.in + # via -r library_generation/requirements.in requests==2.32.3 \ --hash=sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760 \ --hash=sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6 # via - # -r requirements.in + # -r library_generation/requirements.in # requests-mock requests-mock==1.12.1 \ --hash=sha256:b1e37054004cdd5e56c84454cc7df12b25f90f382159087f4b6915aaeef39563 \ --hash=sha256:e9e12e333b525156e82a3c852f22016b9158220d2f47454de9cae8a77d371401 - # via -r requirements.in + # via -r library_generation/requirements.in smmap==5.0.1 \ --hash=sha256:dceeb6c0028fdb6734471eb07c0cd2aae706ccaecab45965ee83f11c8d3b1f62 \ --hash=sha256:e6d8668fa5f93e706934a62d7b4db19c8d9eb8cf2adbb75ef1b675aa332b69da # via - # -r requirements.in + # -r library_generation/requirements.in # gitdb typing==3.7.4.3 \ --hash=sha256:1187fb9c82fd670d10aa07bbb6cfcfe4bdda42d6fab8d5134f04e8c4d0b71cc9 \ --hash=sha256:283d868f5071ab9ad873e5e52268d611e851c870a2ba354193026f2dfb29d8b5 - # via -r requirements.in + # via -r library_generation/requirements.in typing-extensions==4.0.1 \ --hash=sha256:4ca091dea149f945ec56afb48dae714f21e8692ef22a395223bcd328961b6a0e \ --hash=sha256:7f001e5ac290a0c0401508864c7ec868be4e701886d5b573a9528ed3973d9d3b - # via -r requirements.in + # via -r library_generation/requirements.in urllib3==2.2.3 \ --hash=sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac \ --hash=sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9 @@ -537,7 +537,7 @@ watchdog==4.0.1 \ --hash=sha256:f0de0f284248ab40188f23380b03b59126d1479cd59940f2a34f8852db710625 \ --hash=sha256:f27279d060e2ab24c0aa98363ff906d2386aa6c4dc2f1a374655d4e02a6c5e5e \ --hash=sha256:f8affdf3c0f0466e69f5b3917cdd042f89c8c63aebdb9f7c078996f607cdb0f5 - # via -r requirements.in + # via -r library_generation/requirements.in # WARNING: The following packages were not pinned, but pip requires them to be # pinned when the requirements file includes hashes and the requirement is not From 275f4ea2594ce3014f2d46a571a91d9b8b6bad4a Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Tue, 24 Sep 2024 13:54:36 -0400 Subject: [PATCH 17/17] remove unused resources --- .../mock-synth-golden-multiple-prs.log | 63 ------- .../testdata/mock-synth-golden-squash-prs.log | 45 ----- .../testdata/mock-synth-golden.log | 94 ----------- .../test-owlbot/testdata/multi-config.yaml | 5 - .../testdata/sponge-log-golden.xml | 28 ---- .../test-owlbot/testdata/synth-with-flag.py | 51 ------ .../testdata/synth-with-syntax-error-py | 53 ------ .../test-owlbot/testdata/synth.metadata | 79 --------- .../resources/test-owlbot/testdata/synth.py | 49 ------ ...t-pull-request-interleaved-with-commit.log | 154 ------------------ .../testdata/test-working-repo-golden.log | 120 -------------- 11 files changed, 741 deletions(-) delete mode 100644 library_generation/test/resources/test-owlbot/testdata/mock-synth-golden-multiple-prs.log delete mode 100644 library_generation/test/resources/test-owlbot/testdata/mock-synth-golden-squash-prs.log delete mode 100644 library_generation/test/resources/test-owlbot/testdata/mock-synth-golden.log delete mode 100644 library_generation/test/resources/test-owlbot/testdata/multi-config.yaml delete mode 100644 library_generation/test/resources/test-owlbot/testdata/sponge-log-golden.xml delete mode 100644 library_generation/test/resources/test-owlbot/testdata/synth-with-flag.py delete mode 100644 library_generation/test/resources/test-owlbot/testdata/synth-with-syntax-error-py delete mode 100644 library_generation/test/resources/test-owlbot/testdata/synth.metadata delete mode 100644 library_generation/test/resources/test-owlbot/testdata/synth.py delete mode 100644 library_generation/test/resources/test-owlbot/testdata/test-pull-request-interleaved-with-commit.log delete mode 100644 library_generation/test/resources/test-owlbot/testdata/test-working-repo-golden.log diff --git a/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden-multiple-prs.log b/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden-multiple-prs.log deleted file mode 100644 index d3834a6a8e..0000000000 --- a/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden-multiple-prs.log +++ /dev/null @@ -1,63 +0,0 @@ -commit e0840aa69d02d143ba5471d46ec35262dd439990 -Author: Jeffrey Rennie -Date: Wed Apr 22 12:32:34 2020 -0700 - - Wrote c-more to c.txt. - -diff --git a/c.txt b/c.txt -index 3410062..0794b8a 100644 ---- a/c.txt -+++ b/c.txt -@@ -1 +1 @@ --c -\ No newline at end of file -+c-more -\ No newline at end of file - -commit 031bb12825e298259de6626b08de4d1f1dc90f9c -Author: Jeffrey Rennie -Date: Wed Apr 22 12:32:33 2020 -0700 - - Wrote c to c.txt. - -diff --git a/c.txt b/c.txt -new file mode 100644 -index 0000000..3410062 ---- /dev/null -+++ b/c.txt -@@ -0,0 +1 @@ -+c -\ No newline at end of file - -commit f917b406627d2af14ef42d7ab21223f2a35b8e79 -Author: Jeffrey Rennie -Date: Wed Apr 22 12:32:32 2020 -0700 - - 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. - -diff --git a/a.txt b/a.txt -new file mode 100644 -index 0000000..2e65efe ---- /dev/null -+++ b/a.txt -@@ -0,0 +1 @@ -+a -\ No newline at end of file - -commit a2e7e520a5d7a75cc14392b9546fd9ede270cd0c -Author: Jeffrey Rennie -Date: Wed Apr 22 12:32:28 2020 -0700 - - Added Readme - -diff --git a/README.md b/README.md -new file mode 100644 -index 0000000..df3f6c7 ---- /dev/null -+++ b/README.md -@@ -0,0 +1 @@ -+Well done. -\ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden-squash-prs.log b/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden-squash-prs.log deleted file mode 100644 index 44129f152e..0000000000 --- a/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden-squash-prs.log +++ /dev/null @@ -1,45 +0,0 @@ -commit b2feb453f021a09e486919dfe79980c38125a22e -Author: Jeffrey Rennie -Date: Wed May 6 09:15:08 2020 -0700 - - changes triggered by multiple versions - - * Wrote c-more to c.txt. - - * Wrote c to c.txt. - - * 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. - -diff --git a/a.txt b/a.txt -new file mode 100644 -index 0000000..2e65efe ---- /dev/null -+++ b/a.txt -@@ -0,0 +1 @@ -+a -\ No newline at end of file -diff --git a/c.txt b/c.txt -new file mode 100644 -index 0000000..0794b8a ---- /dev/null -+++ b/c.txt -@@ -0,0 +1 @@ -+c-more -\ No newline at end of file - -commit 3a3e7a2e74a010875449e9d0df16d2a1a9d1e612 -Author: Jeffrey Rennie -Date: Wed May 6 09:15:04 2020 -0700 - - Added Readme - -diff --git a/README.md b/README.md -new file mode 100644 -index 0000000..df3f6c7 ---- /dev/null -+++ b/README.md -@@ -0,0 +1 @@ -+Well done. -\ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden.log b/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden.log deleted file mode 100644 index cdf8d9f1ca..0000000000 --- a/library_generation/test/resources/test-owlbot/testdata/mock-synth-golden.log +++ /dev/null @@ -1,94 +0,0 @@ -commit 54361d2aa96ee5588cb351a329a117d710a86923 -Author: Jeffrey Rennie -Date: Wed Apr 22 12:32:01 2020 -0700 - - Wrote c-more to c.txt. - -diff --git a/c.txt b/c.txt -index 3410062..0794b8a 100644 ---- a/c.txt -+++ b/c.txt -@@ -1 +1 @@ --c -\ No newline at end of file -+c-more -\ No newline at end of file - -commit aa21ac6ba918a9acd43a4b7d40e670cbbd8d6844 -Author: Jeffrey Rennie -Date: Wed Apr 22 12:32:00 2020 -0700 - - Wrote c to c.txt. - -diff --git a/c.txt b/c.txt -new file mode 100644 -index 0000000..3410062 ---- /dev/null -+++ b/c.txt -@@ -0,0 +1 @@ -+c -\ No newline at end of file - -commit 43b5bd7e9722ac86d646611960cb35e931e27b4a -Author: Jeffrey Rennie -Date: Wed Apr 22 12:31:59 2020 -0700 - - Wrote z to a.txt. - -diff --git a/a.txt b/a.txt -index 2e65efe..fa7af8b 100644 ---- a/a.txt -+++ b/a.txt -@@ -1 +1 @@ --a -\ No newline at end of file -+z -\ No newline at end of file - -commit bc5fdf7171096d7831509fb1499a4995dce15f8e -Author: Jeffrey Rennie -Date: Wed Apr 22 12:31:59 2020 -0700 - - Wrote b to b.txt. - -diff --git a/b.txt b/b.txt -new file mode 100644 -index 0000000..63d8dbd ---- /dev/null -+++ b/b.txt -@@ -0,0 +1 @@ -+b -\ No newline at end of file - -commit 3a33e468e6525c59b6cdf9c9957bf146ca5516a4 -Author: Jeffrey Rennie -Date: Wed Apr 22 12:31:58 2020 -0700 - - 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. - -diff --git a/a.txt b/a.txt -new file mode 100644 -index 0000000..2e65efe ---- /dev/null -+++ b/a.txt -@@ -0,0 +1 @@ -+a -\ No newline at end of file - -commit 999712c922bea926058c9d7091f507f73768236e -Author: Jeffrey Rennie -Date: Wed Apr 22 12:31:57 2020 -0700 - - Added Readme - -diff --git a/README.md b/README.md -new file mode 100644 -index 0000000..df3f6c7 ---- /dev/null -+++ b/README.md -@@ -0,0 +1 @@ -+Well done. -\ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/testdata/multi-config.yaml b/library_generation/test/resources/test-owlbot/testdata/multi-config.yaml deleted file mode 100644 index 559180a0e9..0000000000 --- a/library_generation/test/resources/test-owlbot/testdata/multi-config.yaml +++ /dev/null @@ -1,5 +0,0 @@ -libraries: - - name: test1 - repository: googleapis/test1 - - name: test2 - repository: googleapis/test2 diff --git a/library_generation/test/resources/test-owlbot/testdata/sponge-log-golden.xml b/library_generation/test/resources/test-owlbot/testdata/sponge-log-golden.xml deleted file mode 100644 index 376df820de..0000000000 --- a/library_generation/test/resources/test-owlbot/testdata/sponge-log-golden.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - some output data - - - - - - - - something failed - - - - - - - - something skipped - - - - - \ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/testdata/synth-with-flag.py b/library_generation/test/resources/test-owlbot/testdata/synth-with-flag.py deleted file mode 100644 index 23684d883c..0000000000 --- a/library_generation/test/resources/test-owlbot/testdata/synth-with-flag.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 2018 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. - -"""This script is used to synthesize generated parts of this library.""" - -import synthtool as s -import synthtool.gcp as gcp -import subprocess -import logging - -logging.basicConfig(level=logging.DEBUG) - -AUTOSYNTH_MULTIPLE_COMMITS = True - -# Run the gapic generator -gapic = gcp.GAPICGenerator() -versions = ["v1", "v1p1beta1", "v1p2beta1", "v1p3beta1", "v1p4beta1"] -for version in versions: - library = gapic.node_library("vision", version) - s.copy(library, excludes=["src/index.js", "README.md", "package.json"]) - -# Copy common templates -common_templates = gcp.CommonTemplates() -templates = common_templates.node_library() -s.copy(templates) - -# [START fix-dead-link] -s.replace( - "**/doc/google/protobuf/doc_timestamp.js", - r"https:\/\/cloud\.google\.com[\s\*]*http:\/\/(.*)[\s\*]*\)", - r"https://\1)", -) - -s.replace(r"**/doc/google/protobuf/doc_timestamp.js", r"toISOString\]", "toISOString)") -# [END fix-dead-link] - -# Node.js specific cleanup -subprocess.run(["npm", "install"]) -subprocess.run(["npm", "run", "fix"]) -subprocess.run(["npx", "compileProtos", "src"]) diff --git a/library_generation/test/resources/test-owlbot/testdata/synth-with-syntax-error-py b/library_generation/test/resources/test-owlbot/testdata/synth-with-syntax-error-py deleted file mode 100644 index ddb4adda1d..0000000000 --- a/library_generation/test/resources/test-owlbot/testdata/synth-with-syntax-error-py +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 2018 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. - -"""This script is used to synthesize generated parts of this library.""" - -import synthtool as s -import synthtool.gcp as gcp -import subprocess -import logging - -logging.basicConfig(level=logging.DEBUG) - -AUTOSYNTH_MULTIPLE_COMMITS = True - -# Run the gapic generator -gapic = gcp.GAPICGenerator() -versions = ["v1", "v1p1beta1", "v1p2beta1", "v1p3beta1", "v1p4beta1"] -for version in versions: - library = gapic.node_library("vision", version) - s.copy(library, excludes=["src/index.js", "README.md", "package.json"]) - -# Copy common templates -common_templates = gcp.CommonTemplates() -templates = common_templates.node_library() -s.copy(templates) - -# [START fix-dead-link] -s.replace( - "**/doc/google/protobuf/doc_timestamp.js", - "https:\/\/cloud\.google\.com[\s\*]*http:\/\/(.*)[\s\*]*\)", - r"https://\1)", -) - -s.replace("**/doc/google/protobuf/doc_timestamp.js", "toISOString\]", "toISOString)") -# [END fix-dead-link] - -# Node.js specific cleanup -subprocess.run(["npm", "install"]) -subprocess.run(["npm", "run", "fix"]) -subprocess.run(["npx", "compileProtos", "src"]) - -" \ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/testdata/synth.metadata b/library_generation/test/resources/test-owlbot/testdata/synth.metadata deleted file mode 100644 index cc4795b68f..0000000000 --- a/library_generation/test/resources/test-owlbot/testdata/synth.metadata +++ /dev/null @@ -1,79 +0,0 @@ -{ - "updateTime": "2020-02-07T20:29:26.289603Z", - "sources": [ - { - "generator": { - "name": "artman", - "version": "0.44.4", - "dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585", - "internalRef": "293710856" - } - }, - { - "template": { - "name": "node_library", - "origin": "synthtool.gcp", - "version": "2020.2.4" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "vision", - "apiVersion": "v1", - "language": "nodejs", - "generator": "gapic", - "config": "google/cloud/vision/artman_vision_v1.yaml" - } - }, - { - "client": { - "source": "googleapis", - "apiName": "vision", - "apiVersion": "v1p1beta1", - "language": "nodejs", - "generator": "gapic", - "config": "google/cloud/vision/artman_vision_v1p1beta1.yaml" - } - }, - { - "client": { - "source": "googleapis", - "apiName": "vision", - "apiVersion": "v1p2beta1", - "language": "nodejs", - "generator": "gapic", - "config": "google/cloud/vision/artman_vision_v1p2beta1.yaml" - } - }, - { - "client": { - "source": "googleapis", - "apiName": "vision", - "apiVersion": "v1p3beta1", - "language": "nodejs", - "generator": "gapic", - "config": "google/cloud/vision/artman_vision_v1p3beta1.yaml" - } - }, - { - "client": { - "source": "googleapis", - "apiName": "vision", - "apiVersion": "v1p4beta1", - "language": "nodejs", - "generator": "gapic", - "config": "google/cloud/vision/artman_vision_v1p4beta1.yaml" - } - } - ] -} \ No newline at end of file diff --git a/library_generation/test/resources/test-owlbot/testdata/synth.py b/library_generation/test/resources/test-owlbot/testdata/synth.py deleted file mode 100644 index 874982a40e..0000000000 --- a/library_generation/test/resources/test-owlbot/testdata/synth.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 2018 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. - -"""This script is used to synthesize generated parts of this library.""" - -import synthtool as s -import synthtool.gcp as gcp -import subprocess -import logging - -logging.basicConfig(level=logging.DEBUG) - -# Run the gapic generator -gapic = gcp.GAPICGenerator() -versions = ["v1", "v1p1beta1", "v1p2beta1", "v1p3beta1", "v1p4beta1"] -for version in versions: - library = gapic.node_library("vision", version) - s.copy(library, excludes=["src/index.js", "README.md", "package.json"]) - -# Copy common templates -common_templates = gcp.CommonTemplates() -templates = common_templates.node_library() -s.copy(templates) - -# [START fix-dead-link] -s.replace( - "**/doc/google/protobuf/doc_timestamp.js", - r"https:\/\/cloud\.google\.com[\s\*]*http:\/\/(.*)[\s\*]*\)", - r"https://\1)", -) - -s.replace(r"**/doc/google/protobuf/doc_timestamp.js", r"toISOString\]", "toISOString)") -# [END fix-dead-link] - -# Node.js specific cleanup -subprocess.run(["npm", "install"]) -subprocess.run(["npm", "run", "fix"]) -subprocess.run(["npx", "compileProtos", "src"]) diff --git a/library_generation/test/resources/test-owlbot/testdata/test-pull-request-interleaved-with-commit.log b/library_generation/test/resources/test-owlbot/testdata/test-pull-request-interleaved-with-commit.log deleted file mode 100644 index 2ebf6b35bc..0000000000 --- a/library_generation/test/resources/test-owlbot/testdata/test-pull-request-interleaved-with-commit.log +++ /dev/null @@ -1,154 +0,0 @@ -commit e570163043b53638e1e2bee3530f99e26ffcd940 -Author: Jeffrey Rennie -Date: Wed Apr 22 12:43:41 2020 -0700 - - 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. - -diff --git a/generated.txt b/generated.txt -index f2ad6c7..4bcfe98 100644 ---- a/generated.txt -+++ b/generated.txt -@@ -1 +1 @@ --c -+d - -commit a23e3c7740b1a10b02b75c43de2f296d86528552 -Author: Jeffrey Rennie -Date: Wed Apr 22 12:43:40 2020 -0700 - - merged PR - -diff --git a/generated.txt b/generated.txt -index 7898192..f2ad6c7 100644 ---- a/generated.txt -+++ b/generated.txt -@@ -1 +1 @@ --a -+c - -commit 9f23c45dbbb98ce4e838f938deee19743dd663bf -Author: Jeffrey Rennie -Date: Wed Apr 22 12:43:39 2020 -0700 - - d - -diff --git a/synth.py b/synth.py -index 87a045e..75134fb 100644 ---- a/synth.py -+++ b/synth.py -@@ -6,7 +6,7 @@ import subprocess - # a different comment - - with open("generated.txt", "wt") as f: -- f.write("c\n") -+ f.write("d\n") - metadata = { "updateTime": str(uuid.uuid4()), - "sources": [ - { - -commit 45fa98150a8d95e6f0160146e81329bb790dae60 -Author: Jeffrey Rennie -Date: Wed Apr 22 12:43:39 2020 -0700 - - c subject - - body line 1 - body line 2 - -diff --git a/synth.py b/synth.py -index dd32b27..87a045e 100644 ---- a/synth.py -+++ b/synth.py -@@ -6,7 +6,7 @@ import subprocess - # a different comment - - with open("generated.txt", "wt") as f: -- f.write("b\n") -+ f.write("c\n") - metadata = { "updateTime": str(uuid.uuid4()), - "sources": [ - { - -commit 5c0ceaa865322fe1545493cf39f63f3e5703fe05 -Author: Jeffrey Rennie -Date: Wed Apr 22 12:43:39 2020 -0700 - - comment - -diff --git a/synth.py b/synth.py -index 17c9866..dd32b27 100644 ---- a/synth.py -+++ b/synth.py -@@ -3,7 +3,7 @@ import json - import uuid - import subprocess - --# comment -+# a different comment - - with open("generated.txt", "wt") as f: - f.write("b\n") - -commit 789daf62b48e249d86b5ec43c19ab7b570579d68 -Author: Jeffrey Rennie -Date: Wed Apr 22 12:43:38 2020 -0700 - - b - -diff --git a/synth.py b/synth.py -index dcdf3f9..17c9866 100644 ---- a/synth.py -+++ b/synth.py -@@ -6,7 +6,7 @@ import subprocess - # comment - - with open("generated.txt", "wt") as f: -- f.write("a\n") -+ f.write("b\n") - metadata = { "updateTime": str(uuid.uuid4()), - "sources": [ - { - -commit 4e9fc46ea3d4469dd262c47c5267ac55a9d58965 -Author: Jeffrey Rennie -Date: Wed Apr 22 12:43:38 2020 -0700 - - a - -diff --git a/generated.txt b/generated.txt -new file mode 100644 -index 0000000..7898192 ---- /dev/null -+++ b/generated.txt -@@ -0,0 +1 @@ -+a -diff --git a/synth.py b/synth.py -new file mode 100644 -index 0000000..dcdf3f9 ---- /dev/null -+++ b/synth.py -@@ -0,0 +1,21 @@ -+import time -+import json -+import uuid -+import subprocess -+ -+# comment -+ -+with open("generated.txt", "wt") as f: -+ f.write("a\n") -+metadata = { "updateTime": str(uuid.uuid4()), -+ "sources": [ -+ { -+ "git": { -+ "name": ".", -+ "remote": "https://github.com/googleapis/synthtool.git", -+ "sha": subprocess.run(["git", "log", "-1", "--pretty=%H"], universal_newlines=True, stdout=subprocess.PIPE).stdout.strip(), -+ } -+ }] -+} -+with open("synth.metadata", "wt") as f: -+ json.dump(metadata, f) diff --git a/library_generation/test/resources/test-owlbot/testdata/test-working-repo-golden.log b/library_generation/test/resources/test-owlbot/testdata/test-working-repo-golden.log deleted file mode 100644 index b6e4c673a0..0000000000 --- a/library_generation/test/resources/test-owlbot/testdata/test-working-repo-golden.log +++ /dev/null @@ -1,120 +0,0 @@ -commit 6bf5f882984445a6b6eba698cdf3ac512c7c66ed -Author: Jeffrey Rennie -Date: Wed Apr 22 12:41:11 2020 -0700 - - 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. - -diff --git a/generated.txt b/generated.txt -index 7898192..f2ad6c7 100644 ---- a/generated.txt -+++ b/generated.txt -@@ -1 +1 @@ --a -+c - -commit 904056ecd9e5c6abd9c0d2bdf6349407bf7faa25 -Author: Jeffrey Rennie -Date: Wed Apr 22 12:41:10 2020 -0700 - - c subject - - body line 1 - body line 2 - -diff --git a/synth.py b/synth.py -index dd32b27..87a045e 100644 ---- a/synth.py -+++ b/synth.py -@@ -6,7 +6,7 @@ import subprocess - # a different comment - - with open("generated.txt", "wt") as f: -- f.write("b\n") -+ f.write("c\n") - metadata = { "updateTime": str(uuid.uuid4()), - "sources": [ - { - -commit 2bf83602623685bba7b61446dbff733aa2392b73 -Author: Jeffrey Rennie -Date: Wed Apr 22 12:41:10 2020 -0700 - - comment - -diff --git a/synth.py b/synth.py -index 17c9866..dd32b27 100644 ---- a/synth.py -+++ b/synth.py -@@ -3,7 +3,7 @@ import json - import uuid - import subprocess - --# comment -+# a different comment - - with open("generated.txt", "wt") as f: - f.write("b\n") - -commit 22bf44f4e60d101062d1ffa594b0d731fb1a5638 -Author: Jeffrey Rennie -Date: Wed Apr 22 12:41:09 2020 -0700 - - b - -diff --git a/synth.py b/synth.py -index dcdf3f9..17c9866 100644 ---- a/synth.py -+++ b/synth.py -@@ -6,7 +6,7 @@ import subprocess - # comment - - with open("generated.txt", "wt") as f: -- f.write("a\n") -+ f.write("b\n") - metadata = { "updateTime": str(uuid.uuid4()), - "sources": [ - { - -commit 9c0257db60692736f8154abd098b10397a6facce -Author: Jeffrey Rennie -Date: Wed Apr 22 12:41:09 2020 -0700 - - a - -diff --git a/generated.txt b/generated.txt -new file mode 100644 -index 0000000..7898192 ---- /dev/null -+++ b/generated.txt -@@ -0,0 +1 @@ -+a -diff --git a/synth.py b/synth.py -new file mode 100644 -index 0000000..dcdf3f9 ---- /dev/null -+++ b/synth.py -@@ -0,0 +1,21 @@ -+import time -+import json -+import uuid -+import subprocess -+ -+# comment -+ -+with open("generated.txt", "wt") as f: -+ f.write("a\n") -+metadata = { "updateTime": str(uuid.uuid4()), -+ "sources": [ -+ { -+ "git": { -+ "name": ".", -+ "remote": "https://github.com/googleapis/synthtool.git", -+ "sha": subprocess.run(["git", "log", "-1", "--pretty=%H"], universal_newlines=True, stdout=subprocess.PIPE).stdout.strip(), -+ } -+ }] -+} -+with open("synth.metadata", "wt") as f: -+ json.dump(metadata, f)