From 030a76756e2ea4af464196dcae81759728231faa Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 13:31:43 -0400 Subject: [PATCH] feat: add `matched_token_page_indices` field in Document Warehouse API v1 (#11759) BEGIN_COMMIT_OVERRIDE feat: add matched_token_page_indices field in Document Warehouse API v1 END_COMMIT_OVERRIDE - [ ] Regenerate this pull request now. PiperOrigin-RevId: 568417218 Source-Link: https://github.com/googleapis/googleapis/commit/d2668fc836a97f96874a76b3966349a5b801c3c4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/200db8468c03877accaee9b134dfd51b49218090 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRlbnR3YXJlaG91c2UvLk93bEJvdC55YW1sIiwiaCI6IjIwMGRiODQ2OGMwMzg3N2FjY2FlZTliMTM0ZGZkNTFiNDkyMTgwOTAifQ== --------- Co-authored-by: Owl Bot Co-authored-by: ohmayr --- .../CONTRIBUTING.rst | 4 ++-- .../cloud/contentwarehouse/gapic_version.py | 2 +- .../contentwarehouse_v1/gapic_version.py | 2 +- .../types/document_service.py | 7 ++++++ .../google-cloud-contentwarehouse/noxfile.py | 23 +------------------ ...data_google.cloud.contentwarehouse.v1.json | 2 +- 6 files changed, 13 insertions(+), 27 deletions(-) diff --git a/packages/google-cloud-contentwarehouse/CONTRIBUTING.rst b/packages/google-cloud-contentwarehouse/CONTRIBUTING.rst index ddde08b340d6..672a41e3439a 100644 --- a/packages/google-cloud-contentwarehouse/CONTRIBUTING.rst +++ b/packages/google-cloud-contentwarehouse/CONTRIBUTING.rst @@ -143,12 +143,12 @@ Running System Tests $ nox -s system # Run a single system test - $ nox -s system- -- -k + $ nox -s system-3.11 -- -k .. note:: - System tests are only configured to run under Python. + System tests are only configured to run under Python 3.8, 3.9, 3.10 and 3.11. For expediency, we do not run them in older versions of Python 3. This alone will not run the tests. You'll need to change some local diff --git a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse/gapic_version.py b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse/gapic_version.py index 1a229f7edfcc..360a0d13ebdd 100644 --- a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse/gapic_version.py +++ b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.7.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/gapic_version.py b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/gapic_version.py index 1a229f7edfcc..360a0d13ebdd 100644 --- a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/gapic_version.py +++ b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.7.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/document_service.py b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/document_service.py index c1cd265e68d3..f4157f65827f 100644 --- a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/document_service.py +++ b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/document_service.py @@ -220,6 +220,9 @@ class MatchingDocument(proto.Message): Experimental. Additional result info if the question-answering feature is enabled. + matched_token_page_indices (MutableSequence[int]): + Return the 1-based page indices where those + pages have one or more matched tokens. """ document: gcc_document.Document = proto.Field( @@ -236,6 +239,10 @@ class MatchingDocument(proto.Message): number=3, message="QAResult", ) + matched_token_page_indices: MutableSequence[int] = proto.RepeatedField( + proto.INT64, + number=4, + ) @property def raw_page(self): diff --git a/packages/google-cloud-contentwarehouse/noxfile.py b/packages/google-cloud-contentwarehouse/noxfile.py index 9a2acd8b6787..be54712bfa8f 100644 --- a/packages/google-cloud-contentwarehouse/noxfile.py +++ b/packages/google-cloud-contentwarehouse/noxfile.py @@ -46,7 +46,7 @@ UNIT_TEST_EXTRAS = [] UNIT_TEST_EXTRAS_BY_PYTHON = {} -SYSTEM_TEST_PYTHON_VERSIONS = [] +SYSTEM_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11"] SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -405,24 +405,3 @@ def prerelease_deps(session): session.run("python", "-c", "import google.auth; print(google.auth.__version__)") session.run("py.test", "tests/unit") - - system_test_path = os.path.join("tests", "system.py") - system_test_folder_path = os.path.join("tests", "system") - - # Only run system tests if found. - if os.path.exists(system_test_path): - session.run( - "py.test", - "--verbose", - f"--junitxml=system_{session.python}_sponge_log.xml", - system_test_path, - *session.posargs, - ) - if os.path.exists(system_test_folder_path): - session.run( - "py.test", - "--verbose", - f"--junitxml=system_{session.python}_sponge_log.xml", - system_test_folder_path, - *session.posargs, - ) diff --git a/packages/google-cloud-contentwarehouse/samples/generated_samples/snippet_metadata_google.cloud.contentwarehouse.v1.json b/packages/google-cloud-contentwarehouse/samples/generated_samples/snippet_metadata_google.cloud.contentwarehouse.v1.json index 4d8ced4c0eb8..4e798f93791e 100644 --- a/packages/google-cloud-contentwarehouse/samples/generated_samples/snippet_metadata_google.cloud.contentwarehouse.v1.json +++ b/packages/google-cloud-contentwarehouse/samples/generated_samples/snippet_metadata_google.cloud.contentwarehouse.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-contentwarehouse", - "version": "0.7.1" + "version": "0.1.0" }, "snippets": [ {