From 0ed20cf8194ecca11df7a9e9379c90b7a048f561 Mon Sep 17 00:00:00 2001 From: Burke Davison Date: Mon, 20 Mar 2023 09:42:06 -0400 Subject: [PATCH 1/2] chore: change google-cloud-vision ITSystemTest to fuzzy Palace of Fine Arts assertions --- .../com/google/cloud/vision/it/ITSystemTest.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java b/java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java index 890579508ac5..08d2c48b44ab 100644 --- a/java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java +++ b/java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java @@ -338,7 +338,8 @@ public void detectLandmarksTest() throws IOException { for (EntityAnnotation annotation : assertNotEmpty(res, res.getLandmarkAnnotationsList())) { actual.add(annotation.getDescription()); } - assertThat(actual).contains("Palace of Fine Arts"); + String allAnnotations = String.join(";", actual); + assertThat(allAnnotations).ignoringCase().contains("Palace of Fine Arts"); } @Test @@ -355,7 +356,8 @@ public void detectLandmarksUrlTest() throws Exception { for (EntityAnnotation annotation : assertNotEmpty(res, res.getLandmarkAnnotationsList())) { actual.add(annotation.getDescription()); } - assertThat(actual).contains("Palace of Fine Arts"); + String allAnnotations = String.join(";", actual); + assertThat(allAnnotations).ignoringCase().contains("Palace of Fine Arts"); } @Test @@ -366,7 +368,8 @@ public void detectLandmarksGcsTest() throws IOException { for (EntityAnnotation annotation : assertNotEmpty(res, res.getLandmarkAnnotationsList())) { actual.add(annotation.getDescription()); } - assertThat(actual).contains("Palace of Fine Arts"); + String allAnnotations = String.join(";", actual); + assertThat(allAnnotations).ignoringCase().contains("Palace of Fine Arts"); } @Test @@ -476,7 +479,8 @@ public void detectWebEntitiesGcsTest() { assertNotEmpty(res, res.getWebDetection().getWebEntitiesList())) { actual.add(entity.getDescription()); } - assertThat(actual).contains("Palace of Fine Arts"); + String allAnnotations = String.join(";", actual); + assertThat(allAnnotations).ignoringCase().contains("Palace of Fine Arts"); } @Test @@ -531,7 +535,8 @@ public void detectWebEntitiesIncludeGeoResultsGcsTest() { assertNotEmpty(res, res.getWebDetection().getWebEntitiesList())) { actual.add(entity.getDescription()); } - assertThat(actual).contains("Palace of Fine Arts"); + String allAnnotations = String.join(";", actual); + assertThat(allAnnotations).ignoringCase().contains("Palace of Fine Arts"); } @Test From fd83f4518ba9aa4a4a7d2cc0e26c4bfd7b472a83 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 20 Mar 2023 13:49:40 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- java-vision/README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/java-vision/README.md b/java-vision/README.md index 0de8e98be0c1..5304f794818b 100644 --- a/java-vision/README.md +++ b/java-vision/README.md @@ -14,7 +14,6 @@ Java idiomatic client for [Cloud Vision][product-docs]. If you are using Maven, add this to your pom.xml file: - ```xml @@ -35,7 +34,6 @@ If you are using SBT, add this to your dependencies: ```Scala libraryDependencies += "com.google.cloud" % "google-cloud-vision" % "3.11.0" ``` - ## Authentication @@ -52,7 +50,7 @@ The client application making API calls must be granted [authorization scopes][a You will need a [Google Cloud Platform Console][developer-console] project with the Cloud Vision [API enabled][enable-api]. You will need to [enable billing][enable-billing] to use Google Cloud Vision. [Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by -[installing the Google Cloud SDK][cloud-sdk] and running the following commands in command line: +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: `gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. ### Installation and setup @@ -173,14 +171,14 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-vision.svg -[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-vision&core=gav +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-vision/3.11.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles [iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy [developer-console]: https://console.developers.google.com/ [create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects -[cloud-sdk]: https://cloud.google.com/sdk/ +[cloud-cli]: https://cloud.google.com/cli [troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting [contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md [code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct