Skip to content

Commit 030a767

Browse files
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: googleapis/googleapis@d2668fc Source-Link: googleapis/googleapis-gen@200db84 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRlbnR3YXJlaG91c2UvLk93bEJvdC55YW1sIiwiaCI6IjIwMGRiODQ2OGMwMzg3N2FjY2FlZTliMTM0ZGZkNTFiNDkyMTgwOTAifQ== --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: ohmayr <omairnaveed@ymail.com>
1 parent a300b07 commit 030a767

File tree

6 files changed

+13
-27
lines changed

6 files changed

+13
-27
lines changed

packages/google-cloud-contentwarehouse/CONTRIBUTING.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@ Running System Tests
143143
$ nox -s system
144144

145145
# Run a single system test
146-
$ nox -s system- -- -k <name of test>
146+
$ nox -s system-3.11 -- -k <name of test>
147147

148148

149149
.. note::
150150

151-
System tests are only configured to run under Python.
151+
System tests are only configured to run under Python 3.8, 3.9, 3.10 and 3.11.
152152
For expediency, we do not run them in older versions of Python 3.
153153

154154
This alone will not run the tests. You'll need to change some local

packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.7.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.7.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/document_service.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ class MatchingDocument(proto.Message):
220220
Experimental.
221221
Additional result info if the question-answering
222222
feature is enabled.
223+
matched_token_page_indices (MutableSequence[int]):
224+
Return the 1-based page indices where those
225+
pages have one or more matched tokens.
223226
"""
224227

225228
document: gcc_document.Document = proto.Field(
@@ -236,6 +239,10 @@ class MatchingDocument(proto.Message):
236239
number=3,
237240
message="QAResult",
238241
)
242+
matched_token_page_indices: MutableSequence[int] = proto.RepeatedField(
243+
proto.INT64,
244+
number=4,
245+
)
239246

240247
@property
241248
def raw_page(self):

packages/google-cloud-contentwarehouse/noxfile.py

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
UNIT_TEST_EXTRAS = []
4747
UNIT_TEST_EXTRAS_BY_PYTHON = {}
4848

49-
SYSTEM_TEST_PYTHON_VERSIONS = []
49+
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11"]
5050
SYSTEM_TEST_STANDARD_DEPENDENCIES = [
5151
"mock",
5252
"pytest",
@@ -405,24 +405,3 @@ def prerelease_deps(session):
405405
session.run("python", "-c", "import google.auth; print(google.auth.__version__)")
406406

407407
session.run("py.test", "tests/unit")
408-
409-
system_test_path = os.path.join("tests", "system.py")
410-
system_test_folder_path = os.path.join("tests", "system")
411-
412-
# Only run system tests if found.
413-
if os.path.exists(system_test_path):
414-
session.run(
415-
"py.test",
416-
"--verbose",
417-
f"--junitxml=system_{session.python}_sponge_log.xml",
418-
system_test_path,
419-
*session.posargs,
420-
)
421-
if os.path.exists(system_test_folder_path):
422-
session.run(
423-
"py.test",
424-
"--verbose",
425-
f"--junitxml=system_{session.python}_sponge_log.xml",
426-
system_test_folder_path,
427-
*session.posargs,
428-
)

packages/google-cloud-contentwarehouse/samples/generated_samples/snippet_metadata_google.cloud.contentwarehouse.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-contentwarehouse",
11-
"version": "0.7.1"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)