diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 889f77df..f0f3b24b 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:c43f1d918bcf817d337aa29ff833439494a158a0831508fda4ec75dc4c0d0320 + digest: sha256:f946c75373c2b0040e8e318c5e85d0cf46bc6e61d0a01f3ef94d8de974ac6790 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5b009ae8..7d90fceb 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.10.0" + ".": "2.11.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index d72044a8..631dc04f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [2.11.0](https://github.com/googleapis/python-documentai/compare/v2.10.0...v2.11.0) (2023-02-07) + + +### Features + +* Added EvaluationReference to evaluation.proto ([f374763](https://github.com/googleapis/python-documentai/commit/f37476381ca4a9adee98c8823b6d0b2287fbd71a)) +* Added latest_evaluation to processor.proto ([f374763](https://github.com/googleapis/python-documentai/commit/f37476381ca4a9adee98c8823b6d0b2287fbd71a)) + ## [2.10.0](https://github.com/googleapis/python-documentai/compare/v2.9.1...v2.10.0) (2023-01-25) diff --git a/google/cloud/documentai/gapic_version.py b/google/cloud/documentai/gapic_version.py index 00f0a8d0..bb74f811 100644 --- a/google/cloud/documentai/gapic_version.py +++ b/google/cloud/documentai/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.10.0" # {x-release-please-version} +__version__ = "2.11.0" # {x-release-please-version} diff --git a/google/cloud/documentai_v1/gapic_version.py b/google/cloud/documentai_v1/gapic_version.py index 00f0a8d0..bb74f811 100644 --- a/google/cloud/documentai_v1/gapic_version.py +++ b/google/cloud/documentai_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.10.0" # {x-release-please-version} +__version__ = "2.11.0" # {x-release-please-version} diff --git a/google/cloud/documentai_v1beta2/gapic_version.py b/google/cloud/documentai_v1beta2/gapic_version.py index 00f0a8d0..bb74f811 100644 --- a/google/cloud/documentai_v1beta2/gapic_version.py +++ b/google/cloud/documentai_v1beta2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.10.0" # {x-release-please-version} +__version__ = "2.11.0" # {x-release-please-version} diff --git a/google/cloud/documentai_v1beta3/__init__.py b/google/cloud/documentai_v1beta3/__init__.py index 9613974b..7067ada4 100644 --- a/google/cloud/documentai_v1beta3/__init__.py +++ b/google/cloud/documentai_v1beta3/__init__.py @@ -86,7 +86,7 @@ UndeployProcessorVersionResponse, ) from .types.document_schema import DocumentSchema -from .types.evaluation import Evaluation +from .types.evaluation import Evaluation, EvaluationReference from .types.geometry import BoundingPoly, NormalizedVertex, Vertex from .types.operation_metadata import CommonOperationMetadata from .types.processor import Processor, ProcessorVersion @@ -123,6 +123,7 @@ "EvaluateProcessorVersionRequest", "EvaluateProcessorVersionResponse", "Evaluation", + "EvaluationReference", "FetchProcessorTypesRequest", "FetchProcessorTypesResponse", "GcsDocument", diff --git a/google/cloud/documentai_v1beta3/gapic_version.py b/google/cloud/documentai_v1beta3/gapic_version.py index 00f0a8d0..bb74f811 100644 --- a/google/cloud/documentai_v1beta3/gapic_version.py +++ b/google/cloud/documentai_v1beta3/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.10.0" # {x-release-please-version} +__version__ = "2.11.0" # {x-release-please-version} diff --git a/google/cloud/documentai_v1beta3/types/__init__.py b/google/cloud/documentai_v1beta3/types/__init__.py index 62005726..641aeb56 100644 --- a/google/cloud/documentai_v1beta3/types/__init__.py +++ b/google/cloud/documentai_v1beta3/types/__init__.py @@ -77,7 +77,7 @@ UndeployProcessorVersionResponse, ) from .document_schema import DocumentSchema -from .evaluation import Evaluation +from .evaluation import Evaluation, EvaluationReference from .geometry import BoundingPoly, NormalizedVertex, Vertex from .operation_metadata import CommonOperationMetadata from .processor import Processor, ProcessorVersion @@ -145,6 +145,7 @@ "UndeployProcessorVersionResponse", "DocumentSchema", "Evaluation", + "EvaluationReference", "BoundingPoly", "NormalizedVertex", "Vertex", diff --git a/google/cloud/documentai_v1beta3/types/document.py b/google/cloud/documentai_v1beta3/types/document.py index aac98f6a..0f9860f7 100644 --- a/google/cloud/documentai_v1beta3/types/document.py +++ b/google/cloud/documentai_v1beta3/types/document.py @@ -1481,20 +1481,30 @@ class OperationType(proto.Enum): Add an element. REMOVE (2): Remove an element identified by ``parent``. + UPDATE (7): + Updates any fields within the given + provenance scope of the message. It 'overwrites' + the fields rather than replacing them. This is + especially relevant when we just want to update + a field value of an entity without also + affecting all the child properties. REPLACE (3): - Replace an element identified by ``parent``. - EVAL_REQUESTED (4): - Request human review for the element identified by + Currently unused. Replace an element identified by ``parent``. + EVAL_REQUESTED (4): + Deprecated. Request human review for the element identified + by ``parent``. EVAL_APPROVED (5): - Element is reviewed and approved at human - review, confidence will be set to 1.0. + Deprecated. Element is reviewed and approved + at human review, confidence will be set to 1.0. EVAL_SKIPPED (6): - Element is skipped in the validation process. + Deprecated. Element is skipped in the + validation process. """ OPERATION_TYPE_UNSPECIFIED = 0 ADD = 1 REMOVE = 2 + UPDATE = 7 REPLACE = 3 EVAL_REQUESTED = 4 EVAL_APPROVED = 5 @@ -1571,8 +1581,9 @@ class Revision(proto.Message): This field is a member of `oneof`_ ``source``. id (str): - Id of the revision. Unique within the - context of the document. + Id of the revision, internally generated by + doc proto storage. Unique within the context of + the document. parent (MutableSequence[int]): The revisions that this revision is based on. This can include one or more parent (when documents are merged.) This @@ -1583,7 +1594,9 @@ class Revision(proto.Message): eg. there are ``provenance.parent.revision`` fields that index into this field. create_time (google.protobuf.timestamp_pb2.Timestamp): - The time that the revision was created. + The time that the revision was created, + internally generated by doc proto storage at the + time of create. human_review (google.cloud.documentai_v1beta3.types.Document.Revision.HumanReview): Human Review information of this revision. """ diff --git a/google/cloud/documentai_v1beta3/types/evaluation.py b/google/cloud/documentai_v1beta3/types/evaluation.py index b73c0b70..6905adf7 100644 --- a/google/cloud/documentai_v1beta3/types/evaluation.py +++ b/google/cloud/documentai_v1beta3/types/evaluation.py @@ -21,11 +21,50 @@ __protobuf__ = proto.module( package="google.cloud.documentai.v1beta3", manifest={ + "EvaluationReference", "Evaluation", }, ) +class EvaluationReference(proto.Message): + r"""Gives a short summary of an evaluation, and links to the + evaluation itself. + + Attributes: + operation (str): + The resource name of the Long Running + Operation for the evaluation. + evaluation (str): + The resource name of the evaluation. + aggregate_metrics (google.cloud.documentai_v1beta3.types.Evaluation.Metrics): + An aggregate of the statistics for the + evaluation with fuzzy matching on. + aggregate_metrics_exact (google.cloud.documentai_v1beta3.types.Evaluation.Metrics): + An aggregate of the statistics for the + evaluation with fuzzy matching off. + """ + + operation: str = proto.Field( + proto.STRING, + number=1, + ) + evaluation: str = proto.Field( + proto.STRING, + number=2, + ) + aggregate_metrics: "Evaluation.Metrics" = proto.Field( + proto.MESSAGE, + number=4, + message="Evaluation.Metrics", + ) + aggregate_metrics_exact: "Evaluation.Metrics" = proto.Field( + proto.MESSAGE, + number=5, + message="Evaluation.Metrics", + ) + + class Evaluation(proto.Message): r"""An evaluation of a ProcessorVersion's performance. diff --git a/google/cloud/documentai_v1beta3/types/processor.py b/google/cloud/documentai_v1beta3/types/processor.py index 0a4eb1f3..085ad488 100644 --- a/google/cloud/documentai_v1beta3/types/processor.py +++ b/google/cloud/documentai_v1beta3/types/processor.py @@ -19,6 +19,7 @@ import proto # type: ignore from google.cloud.documentai_v1beta3.types import document_schema as gcd_document_schema +from google.cloud.documentai_v1beta3.types import evaluation __protobuf__ = proto.module( package="google.cloud.documentai.v1beta3", @@ -50,6 +51,9 @@ class ProcessorVersion(proto.Message): The state of the processor version. create_time (google.protobuf.timestamp_pb2.Timestamp): The time the processor version was created. + latest_evaluation (google.cloud.documentai_v1beta3.types.EvaluationReference): + The most recently invoked evaluation for the + processor version. kms_key_name (str): The KMS key name used for encryption. kms_key_version_name (str): @@ -143,6 +147,11 @@ class DeprecationInfo(proto.Message): number=7, message=timestamp_pb2.Timestamp, ) + latest_evaluation: evaluation.EvaluationReference = proto.Field( + proto.MESSAGE, + number=8, + message=evaluation.EvaluationReference, + ) kms_key_name: str = proto.Field( proto.STRING, number=9, diff --git a/noxfile.py b/noxfile.py index e716318b..95e58c52 100644 --- a/noxfile.py +++ b/noxfile.py @@ -189,9 +189,9 @@ def unit(session): def install_systemtest_dependencies(session, *constraints): # Use pre-release gRPC for system tests. - # Exclude version 1.49.0rc1 which has a known issue. - # See https://github.com/grpc/grpc/pull/30642 - session.install("--pre", "grpcio!=1.49.0rc1") + # Exclude version 1.52.0rc1 which has a known issue. + # See https://github.com/grpc/grpc/issues/32163 + session.install("--pre", "grpcio!=1.52.0rc1") session.install(*SYSTEM_TEST_STANDARD_DEPENDENCIES, *constraints) @@ -346,9 +346,7 @@ def prerelease_deps(session): unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES session.install(*unit_deps_all) system_deps_all = ( - SYSTEM_TEST_STANDARD_DEPENDENCIES - + SYSTEM_TEST_EXTERNAL_DEPENDENCIES - + SYSTEM_TEST_EXTRAS + SYSTEM_TEST_STANDARD_DEPENDENCIES + SYSTEM_TEST_EXTERNAL_DEPENDENCIES ) session.install(*system_deps_all) @@ -378,8 +376,8 @@ def prerelease_deps(session): # dependency of grpc "six", "googleapis-common-protos", - # Exclude version 1.49.0rc1 which has a known issue. See https://github.com/grpc/grpc/pull/30642 - "grpcio!=1.49.0rc1", + # Exclude version 1.52.0rc1 which has a known issue. See https://github.com/grpc/grpc/issues/32163 + "grpcio!=1.52.0rc1", "grpcio-status", "google-api-core", "proto-plus", diff --git a/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1.json index 467d2201..2cfe2fad 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-documentai", - "version": "2.10.0" + "version": "2.11.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta2.json b/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta2.json index 0092aedd..7e9df76f 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta2.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-documentai", - "version": "2.10.0" + "version": "2.11.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta3.json b/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta3.json index 1eec527b..16239d0e 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta3.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta3.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-documentai", - "version": "2.10.0" + "version": "2.11.0" }, "snippets": [ {