Skip to content

Commit

Permalink
ci: remove vision crop tests (#10074)
Browse files Browse the repository at this point in the history
* ci: remove vision crop tests

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
burkedavison and gcf-owl-bot[bot] committed Nov 22, 2023
1 parent 5352821 commit 3dfdceb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 32 deletions.
4 changes: 2 additions & 2 deletions java-vision/README.md
Expand Up @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.24.0</version>
<version>26.27.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -195,7 +195,7 @@ 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://central.sonatype.com/artifact/com.google.cloud/google-cloud-vision/3.22.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-vision/3.28.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
Expand Down
Expand Up @@ -28,8 +28,6 @@
import com.google.cloud.vision.v1.CreateProductRequest;
import com.google.cloud.vision.v1.CreateProductSetRequest;
import com.google.cloud.vision.v1.CreateReferenceImageRequest;
import com.google.cloud.vision.v1.CropHint;
import com.google.cloud.vision.v1.CropHintsAnnotation;
import com.google.cloud.vision.v1.DeleteProductRequest;
import com.google.cloud.vision.v1.DeleteProductSetRequest;
import com.google.cloud.vision.v1.DeleteReferenceImageRequest;
Expand Down Expand Up @@ -62,7 +60,6 @@
import com.google.cloud.vision.v1.SafeSearchAnnotation;
import com.google.cloud.vision.v1.TextAnnotation;
import com.google.cloud.vision.v1.UpdateProductRequest;
import com.google.cloud.vision.v1.Vertex;
import com.google.cloud.vision.v1.WebDetection;
import com.google.cloud.vision.v1.WebDetectionParams;
import com.google.common.collect.ImmutableList;
Expand All @@ -74,7 +71,6 @@
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.UUID;
Expand Down Expand Up @@ -539,32 +535,6 @@ public void detectWebEntitiesIncludeGeoResultsGcsTest() {
assertThat(allAnnotations).ignoringCase().contains("Palace of Fine Arts");
}

@Test
public void detectCropHintsTest() throws IOException {
AnnotateImageResponse res = requestAnnotatedImage("wakeupcat.jpg", Type.CROP_HINTS, false);
List<Integer> actual = new ArrayList<>();
CropHintsAnnotation annotation = res.getCropHintsAnnotation();
for (CropHint hint : assertNotEmpty(res, annotation.getCropHintsList())) {
for (Vertex vertex : assertNotEmpty(res, hint.getBoundingPoly().getVerticesList())) {
actual.add(vertex.getX());
}
}
assertEquals(Arrays.asList(210, 476, 476, 210), actual);
}

@Test
public void detectCropHintsGcsTest() throws IOException {
AnnotateImageResponse res = requestAnnotatedImage("label/wakeupcat.jpg", Type.CROP_HINTS, true);
List<Integer> actual = new ArrayList<>();
CropHintsAnnotation annotation = res.getCropHintsAnnotation();
for (CropHint hint : assertNotEmpty(res, annotation.getCropHintsList())) {
for (Vertex vertex : assertNotEmpty(res, hint.getBoundingPoly().getVerticesList())) {
actual.add(vertex.getX());
}
}
assertEquals(Arrays.asList(210, 476, 476, 210), actual);
}

@Test
public void detectDocumentTextTest() throws IOException {
AnnotateImageResponse res =
Expand Down

0 comments on commit 3dfdceb

Please sign in to comment.