diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml new file mode 100644 index 00000000..20f3acc2 --- /dev/null +++ b/.github/generated-files-bot.yml @@ -0,0 +1,7 @@ +externalManifests: +- type: json + file: 'synth.metadata' + jsonpath: '$.generatedFiles[*]' +- type: json + file: '.github/readme/synth.metadata/synth.metadata' + jsonpath: '$.generatedFiles[*]' diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index 072565de..65138f9c 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-datalabeling.git", - "sha": "82190beb0e12c0590ccd1d2a5cd7d90553a9b5f5" + "sha": "8a28feb74b616676b5a49b2f0e34b8c4ae1a400b" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "901ddd44e9ef7887ee681b9183bbdea99437fdcc" + "sha": "b19b401571e77192f8dd38eab5fb2300a0de9324" } } ] diff --git a/.kokoro/build.sh b/.kokoro/build.sh index b2707765..a4ed6626 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -78,7 +78,7 @@ samples) if [[ -f ${SAMPLES_DIR}/pom.xml ]] then - pushd {SAMPLES_DIR} + pushd ${SAMPLES_DIR} mvn -B \ -Penable-samples \ -DtrimStackTrace=false \ diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 135434aa..4f90fc47 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -62,7 +62,7 @@ popd # V2 mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/" -pushd target/devsite +pushd target/devsite/reference # create metadata python3 -m docuploader create-metadata \ diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cfaafec..ebd48f1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.119.5](https://www.github.com/googleapis/java-datalabeling/compare/v0.119.4...v0.119.5) (2020-10-31) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.14.1 ([#308](https://www.github.com/googleapis/java-datalabeling/issues/308)) ([eac2276](https://www.github.com/googleapis/java-datalabeling/commit/eac2276ced820ccaeb39a67deb38788e999a4bc5)) + ### [0.119.4](https://www.github.com/googleapis/java-datalabeling/compare/v0.119.3...v0.119.4) (2020-10-22) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 6b2238bb..2add2547 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,4 @@ + # Code of Conduct ## Our Pledge @@ -69,12 +70,12 @@ dispute. If you are unable to resolve the matter for any reason, or if the behavior is threatening or harassing, report it. We are dedicated to providing an environment where participants feel welcome and safe. -Reports should be directed to *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the -Project Steward(s) for *[PROJECT NAME]*. It is the Project Steward’s duty to +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to receive and address reported violations of the code of conduct. They will then work with a committee consisting of representatives from the Open Source Programs Office and the Google Open Source Strategy team. If for any reason you -are uncomfortable reaching out the Project Steward, please email +are uncomfortable reaching out to the Project Steward, please email opensource@google.com. We will investigate every complaint, but you may not receive a direct response. diff --git a/README.md b/README.md index fae87db5..ddf5a03b 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 13.1.0 + 13.4.0 pom import @@ -41,18 +41,18 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-datalabeling - 0.119.3 + 0.119.4 ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-datalabeling:0.119.3' +compile 'com.google.cloud:google-cloud-datalabeling:0.119.4' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-datalabeling" % "0.119.3" +libraryDependencies += "com.google.cloud" % "google-cloud-datalabeling" % "0.119.4" ``` ## Authentication diff --git a/google-cloud-datalabeling-bom/pom.xml b/google-cloud-datalabeling-bom/pom.xml index c3b5a3c0..7c4d3623 100644 --- a/google-cloud-datalabeling-bom/pom.xml +++ b/google-cloud-datalabeling-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.cloud google-cloud-datalabeling-bom - 0.119.4 + 0.119.5 pom com.google.cloud google-cloud-shared-config - 0.9.3 + 0.9.4 Google Cloud Data Labeling BOM @@ -64,17 +64,17 @@ com.google.api.grpc proto-google-cloud-datalabeling-v1beta1 - 0.84.4 + 0.84.5 com.google.api.grpc grpc-google-cloud-datalabeling-v1beta1 - 0.84.4 + 0.84.5 com.google.cloud google-cloud-datalabeling - 0.119.4 + 0.119.5 diff --git a/google-cloud-datalabeling/pom.xml b/google-cloud-datalabeling/pom.xml index 76c01e58..ddbb59c7 100644 --- a/google-cloud-datalabeling/pom.xml +++ b/google-cloud-datalabeling/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-datalabeling - 0.119.4 + 0.119.5 jar Google Cloud Data Labeling https://github.com/googleapis/java-datalabeling @@ -11,7 +11,7 @@ com.google.cloud google-cloud-datalabeling-parent - 0.119.4 + 0.119.5 google-cloud-datalabeling diff --git a/grpc-google-cloud-datalabeling-v1beta1/pom.xml b/grpc-google-cloud-datalabeling-v1beta1/pom.xml index f3baa162..406b217e 100644 --- a/grpc-google-cloud-datalabeling-v1beta1/pom.xml +++ b/grpc-google-cloud-datalabeling-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-datalabeling-v1beta1 - 0.84.4 + 0.84.5 grpc-google-cloud-datalabeling-v1beta1 GRPC library for grpc-google-cloud-datalabeling-v1beta1 com.google.cloud google-cloud-datalabeling-parent - 0.119.4 + 0.119.5 diff --git a/pom.xml b/pom.xml index 138bbf03..fe8bf1f4 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-datalabeling-parent pom - 0.119.4 + 0.119.5 Google Cloud Data Labeling Parent https://github.com/googleapis/java-datalabeling @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 0.9.3 + 0.9.4 @@ -70,23 +70,23 @@ com.google.api.grpc proto-google-cloud-datalabeling-v1beta1 - 0.84.4 + 0.84.5 com.google.api.grpc grpc-google-cloud-datalabeling-v1beta1 - 0.84.4 + 0.84.5 com.google.cloud google-cloud-datalabeling - 0.119.4 + 0.119.5 com.google.cloud google-cloud-shared-dependencies - 0.13.0 + 0.14.1 pom import diff --git a/proto-google-cloud-datalabeling-v1beta1/pom.xml b/proto-google-cloud-datalabeling-v1beta1/pom.xml index 1e984a35..73153885 100644 --- a/proto-google-cloud-datalabeling-v1beta1/pom.xml +++ b/proto-google-cloud-datalabeling-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-datalabeling-v1beta1 - 0.84.4 + 0.84.5 proto-google-cloud-datalabeling-v1beta1 PROTO library for proto-google-cloud-datalabeling-v1beta1 com.google.cloud google-cloud-datalabeling-parent - 0.119.4 + 0.119.5 diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 4bdded92..d3c328f4 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-datalabeling - 0.119.3 + 0.119.4 @@ -42,7 +42,7 @@ com.google.truth truth - 1.0.1 + 1.1 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 59fbfa7d..a3225a75 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-datalabeling - 0.119.3 + 0.119.4 @@ -40,7 +40,7 @@ com.google.truth truth - 1.0.1 + 1.1 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 0a1604a1..e2aa9676 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 13.1.0 + 13.4.0 pom import @@ -53,7 +53,7 @@ com.google.truth truth - 1.0.1 + 1.1 test diff --git a/samples/snippets/src/main/java/com/example/datalabeling/CreateAnnotationSpecSet.java b/samples/snippets/src/main/java/com/example/datalabeling/CreateAnnotationSpecSet.java index 1564fdf5..4d9a3823 100644 --- a/samples/snippets/src/main/java/com/example/datalabeling/CreateAnnotationSpecSet.java +++ b/samples/snippets/src/main/java/com/example/datalabeling/CreateAnnotationSpecSet.java @@ -47,14 +47,14 @@ static void createAnnotationSpecSet(String projectId) throws IOException { } // [START datalabeling_create_annotation_spec_set_beta] - DataLabelingServiceSettings settings = DataLabelingServiceSettings - .newBuilder() - // [END datalabeling_create_annotation_spec_set_beta] - .setEndpoint(endpoint) - // [START datalabeling_create_annotation_spec_set_beta] - .build(); + DataLabelingServiceSettings settings = + DataLabelingServiceSettings.newBuilder() + // [END datalabeling_create_annotation_spec_set_beta] + .setEndpoint(endpoint) + // [START datalabeling_create_annotation_spec_set_beta] + .build(); try (DataLabelingServiceClient dataLabelingServiceClient = - DataLabelingServiceClient.create(settings)) { + DataLabelingServiceClient.create(settings)) { ProjectName projectName = ProjectName.of(projectId); List annotationSpecs = new ArrayList<>(); diff --git a/samples/snippets/src/main/java/com/example/datalabeling/CreateDataset.java b/samples/snippets/src/main/java/com/example/datalabeling/CreateDataset.java index b3c13bc5..9f4fa8df 100644 --- a/samples/snippets/src/main/java/com/example/datalabeling/CreateDataset.java +++ b/samples/snippets/src/main/java/com/example/datalabeling/CreateDataset.java @@ -38,14 +38,14 @@ static void createDataset(String projectId, String datasetName) throws IOExcepti } // [START datalabeling_create_dataset_beta] - DataLabelingServiceSettings settings = DataLabelingServiceSettings - .newBuilder() - // [END datalabeling_create_dataset_beta] - .setEndpoint(endpoint) - // [START datalabeling_create_dataset_beta] - .build(); + DataLabelingServiceSettings settings = + DataLabelingServiceSettings.newBuilder() + // [END datalabeling_create_dataset_beta] + .setEndpoint(endpoint) + // [START datalabeling_create_dataset_beta] + .build(); try (DataLabelingServiceClient dataLabelingServiceClient = - DataLabelingServiceClient.create(settings)) { + DataLabelingServiceClient.create(settings)) { ProjectName projectName = ProjectName.of(projectId); Dataset dataset = diff --git a/samples/snippets/src/main/java/com/example/datalabeling/CreateInstruction.java b/samples/snippets/src/main/java/com/example/datalabeling/CreateInstruction.java index ac06bd37..75621899 100644 --- a/samples/snippets/src/main/java/com/example/datalabeling/CreateInstruction.java +++ b/samples/snippets/src/main/java/com/example/datalabeling/CreateInstruction.java @@ -43,32 +43,32 @@ static void createInstruction(String projectId, String pdfUri) throws IOExceptio } // [START datalabeling_create_instruction_beta] - DataLabelingServiceSettings settings = DataLabelingServiceSettings - .newBuilder() - // [END datalabeling_create_instruction_beta] - .setEndpoint(endpoint) - // [START datalabeling_create_instruction_beta] - .build(); + DataLabelingServiceSettings settings = + DataLabelingServiceSettings.newBuilder() + // [END datalabeling_create_instruction_beta] + .setEndpoint(endpoint) + // [START datalabeling_create_instruction_beta] + .build(); try (DataLabelingServiceClient dataLabelingServiceClient = - DataLabelingServiceClient.create(settings)) { + DataLabelingServiceClient.create(settings)) { ProjectName projectName = ProjectName.of(projectId); // There are two types of instructions: CSV (CsvInstruction) or PDF (PdfInstruction) - PdfInstruction pdfInstruction = PdfInstruction.newBuilder() - .setGcsFileUri(pdfUri) - .build(); + PdfInstruction pdfInstruction = PdfInstruction.newBuilder().setGcsFileUri(pdfUri).build(); - Instruction instruction = Instruction.newBuilder() - .setDisplayName("YOUR_INSTRUCTION_DISPLAY_NAME") - .setDescription("YOUR_DESCRIPTION") - .setDataType(DataType.IMAGE) // DataTypes: AUDIO, IMAGE, VIDEO, TEXT - .setPdfInstruction(pdfInstruction) // .setCsvInstruction() or .setPdfInstruction() - .build(); + Instruction instruction = + Instruction.newBuilder() + .setDisplayName("YOUR_INSTRUCTION_DISPLAY_NAME") + .setDescription("YOUR_DESCRIPTION") + .setDataType(DataType.IMAGE) // DataTypes: AUDIO, IMAGE, VIDEO, TEXT + .setPdfInstruction(pdfInstruction) // .setCsvInstruction() or .setPdfInstruction() + .build(); - CreateInstructionRequest createInstructionRequest = CreateInstructionRequest.newBuilder() - .setInstruction(instruction) - .setParent(projectName.toString()) - .build(); + CreateInstructionRequest createInstructionRequest = + CreateInstructionRequest.newBuilder() + .setInstruction(instruction) + .setParent(projectName.toString()) + .build(); OperationFuture operation = dataLabelingServiceClient.createInstructionAsync(createInstructionRequest); diff --git a/samples/snippets/src/main/java/com/example/datalabeling/ExportData.java b/samples/snippets/src/main/java/com/example/datalabeling/ExportData.java index d38c5c71..235fc635 100644 --- a/samples/snippets/src/main/java/com/example/datalabeling/ExportData.java +++ b/samples/snippets/src/main/java/com/example/datalabeling/ExportData.java @@ -51,28 +51,26 @@ static void exportData(String datasetName, String annotatedDatasetName, String g } // [START datalabeling_export_data_beta] - DataLabelingServiceSettings settings = DataLabelingServiceSettings - .newBuilder() - // [END datalabeling_export_data_beta] - .setEndpoint(endpoint) - // [START datalabeling_export_data_beta] - .build(); + DataLabelingServiceSettings settings = + DataLabelingServiceSettings.newBuilder() + // [END datalabeling_export_data_beta] + .setEndpoint(endpoint) + // [START datalabeling_export_data_beta] + .build(); try (DataLabelingServiceClient dataLabelingServiceClient = - DataLabelingServiceClient.create(settings)) { - GcsDestination gcsDestination = GcsDestination.newBuilder() - .setOutputUri(gcsOutputUri) - .setMimeType("text/csv") - .build(); + DataLabelingServiceClient.create(settings)) { + GcsDestination gcsDestination = + GcsDestination.newBuilder().setOutputUri(gcsOutputUri).setMimeType("text/csv").build(); - OutputConfig outputConfig = OutputConfig.newBuilder() - .setGcsDestination(gcsDestination) - .build(); + OutputConfig outputConfig = + OutputConfig.newBuilder().setGcsDestination(gcsDestination).build(); - ExportDataRequest exportDataRequest = ExportDataRequest.newBuilder() - .setName(datasetName) - .setOutputConfig(outputConfig) - .setAnnotatedDataset(annotatedDatasetName) - .build(); + ExportDataRequest exportDataRequest = + ExportDataRequest.newBuilder() + .setName(datasetName) + .setOutputConfig(outputConfig) + .setAnnotatedDataset(annotatedDatasetName) + .build(); OperationFuture operation = dataLabelingServiceClient.exportDataAsync(exportDataRequest); diff --git a/samples/snippets/src/main/java/com/example/datalabeling/ImportData.java b/samples/snippets/src/main/java/com/example/datalabeling/ImportData.java index ec1b36fb..e9d861e0 100644 --- a/samples/snippets/src/main/java/com/example/datalabeling/ImportData.java +++ b/samples/snippets/src/main/java/com/example/datalabeling/ImportData.java @@ -44,28 +44,25 @@ static void importData(String datasetName, String gcsSourceUri) throws IOExcepti } // [START datalabeling_import_data_beta] - DataLabelingServiceSettings settings = DataLabelingServiceSettings - .newBuilder() - // [END datalabeling_import_data_beta] - .setEndpoint(endpoint) - // [START datalabeling_import_data_beta] - .build(); + DataLabelingServiceSettings settings = + DataLabelingServiceSettings.newBuilder() + // [END datalabeling_import_data_beta] + .setEndpoint(endpoint) + // [START datalabeling_import_data_beta] + .build(); try (DataLabelingServiceClient dataLabelingServiceClient = - DataLabelingServiceClient.create(settings)) { - GcsSource gcsSource = GcsSource.newBuilder() - .setInputUri(gcsSourceUri) - .setMimeType("text/csv") - .build(); + DataLabelingServiceClient.create(settings)) { + GcsSource gcsSource = + GcsSource.newBuilder().setInputUri(gcsSourceUri).setMimeType("text/csv").build(); - InputConfig inputConfig = InputConfig.newBuilder() - .setDataType(DataType.IMAGE) // DataTypes: AUDIO, IMAGE, VIDEO, TEXT - .setGcsSource(gcsSource) - .build(); + InputConfig inputConfig = + InputConfig.newBuilder() + .setDataType(DataType.IMAGE) // DataTypes: AUDIO, IMAGE, VIDEO, TEXT + .setGcsSource(gcsSource) + .build(); - ImportDataRequest importDataRequest = ImportDataRequest.newBuilder() - .setName(datasetName) - .setInputConfig(inputConfig) - .build(); + ImportDataRequest importDataRequest = + ImportDataRequest.newBuilder().setName(datasetName).setInputConfig(inputConfig).build(); OperationFuture operation = dataLabelingServiceClient.importDataAsync(importDataRequest); diff --git a/samples/snippets/src/main/java/com/example/datalabeling/LabelImage.java b/samples/snippets/src/main/java/com/example/datalabeling/LabelImage.java index e00c9805..1e4f1a8b 100644 --- a/samples/snippets/src/main/java/com/example/datalabeling/LabelImage.java +++ b/samples/snippets/src/main/java/com/example/datalabeling/LabelImage.java @@ -36,7 +36,8 @@ class LabelImage { static void labelImage( String formattedInstructionName, String formattedAnnotationSpecSetName, - String formattedDatasetName) throws IOException { + String formattedDatasetName) + throws IOException { // String formattedInstructionName = DataLabelingServiceClient.formatInstructionName( // "YOUR_PROJECT_ID", "YOUR_INSTRUCTION_UUID"); // String formattedAnnotationSpecSetName = @@ -52,14 +53,14 @@ static void labelImage( } // [START datalabeling_label_image_beta] - DataLabelingServiceSettings settings = DataLabelingServiceSettings - .newBuilder() - // [END datalabeling_label_image_beta] - .setEndpoint(endpoint) - // [START datalabeling_label_image_beta] - .build(); + DataLabelingServiceSettings settings = + DataLabelingServiceSettings.newBuilder() + // [END datalabeling_label_image_beta] + .setEndpoint(endpoint) + // [START datalabeling_label_image_beta] + .build(); try (DataLabelingServiceClient dataLabelingServiceClient = - DataLabelingServiceClient.create(settings)) { + DataLabelingServiceClient.create(settings)) { HumanAnnotationConfig humanAnnotationConfig = HumanAnnotationConfig.newBuilder() .setAnnotatedDatasetDisplayName("annotated_displayname") diff --git a/samples/snippets/src/main/java/com/example/datalabeling/LabelText.java b/samples/snippets/src/main/java/com/example/datalabeling/LabelText.java index 2ebcfee5..92ded226 100644 --- a/samples/snippets/src/main/java/com/example/datalabeling/LabelText.java +++ b/samples/snippets/src/main/java/com/example/datalabeling/LabelText.java @@ -36,7 +36,8 @@ class LabelText { static void labelText( String formattedInstructionName, String formattedAnnotationSpecSetName, - String formattedDatasetName) throws IOException { + String formattedDatasetName) + throws IOException { // String formattedInstructionName = DataLabelingServiceClient.formatInstructionName( // "YOUR_PROJECT_ID", "YOUR_INSTRUCTION_UUID"); // String formattedAnnotationSpecSetName = @@ -52,14 +53,14 @@ static void labelText( } // [START datalabeling_label_text_beta] - DataLabelingServiceSettings settings = DataLabelingServiceSettings - .newBuilder() - // [END datalabeling_label_text_beta] - .setEndpoint(endpoint) - // [START datalabeling_label_text_beta] - .build(); + DataLabelingServiceSettings settings = + DataLabelingServiceSettings.newBuilder() + // [END datalabeling_label_text_beta] + .setEndpoint(endpoint) + // [START datalabeling_label_text_beta] + .build(); try (DataLabelingServiceClient dataLabelingServiceClient = - DataLabelingServiceClient.create(settings)) { + DataLabelingServiceClient.create(settings)) { HumanAnnotationConfig humanAnnotationConfig = HumanAnnotationConfig.newBuilder() .setAnnotatedDatasetDisplayName("annotated_displayname") diff --git a/samples/snippets/src/main/java/com/example/datalabeling/LabelVideo.java b/samples/snippets/src/main/java/com/example/datalabeling/LabelVideo.java index a84b0bf1..6dc71080 100644 --- a/samples/snippets/src/main/java/com/example/datalabeling/LabelVideo.java +++ b/samples/snippets/src/main/java/com/example/datalabeling/LabelVideo.java @@ -33,8 +33,11 @@ class LabelVideo { // Start a Video Labeling Task - static void labelVideo(String formattedInstructionName, String formattedAnnotationSpecSetName, - String formattedDatasetName) throws IOException { + static void labelVideo( + String formattedInstructionName, + String formattedAnnotationSpecSetName, + String formattedDatasetName) + throws IOException { // String formattedInstructionName = DataLabelingServiceClient.formatInstructionName( // "YOUR_PROJECT_ID", "YOUR_INSTRUCTION_UUID"); // String formattedAnnotationSpecSetName = @@ -50,36 +53,40 @@ static void labelVideo(String formattedInstructionName, String formattedAnnotati } // [START datalabeling_label_video_beta] - DataLabelingServiceSettings settings = DataLabelingServiceSettings - .newBuilder() - // [END datalabeling_label_video_beta] - .setEndpoint(endpoint) - // [START datalabeling_label_video_beta] - .build(); + DataLabelingServiceSettings settings = + DataLabelingServiceSettings.newBuilder() + // [END datalabeling_label_video_beta] + .setEndpoint(endpoint) + // [START datalabeling_label_video_beta] + .build(); try (DataLabelingServiceClient dataLabelingServiceClient = - DataLabelingServiceClient.create(settings)) { - HumanAnnotationConfig humanAnnotationConfig = HumanAnnotationConfig.newBuilder() - .setAnnotatedDatasetDisplayName("annotated_displayname") - .setAnnotatedDatasetDescription("annotated_description") - .setInstruction(formattedInstructionName) - .build(); + DataLabelingServiceClient.create(settings)) { + HumanAnnotationConfig humanAnnotationConfig = + HumanAnnotationConfig.newBuilder() + .setAnnotatedDatasetDisplayName("annotated_displayname") + .setAnnotatedDatasetDescription("annotated_description") + .setInstruction(formattedInstructionName) + .build(); - AnnotationSpecSetConfig annotationSpecSetConfig = AnnotationSpecSetConfig.newBuilder() - .setAnnotationSpecSet(formattedAnnotationSpecSetName) - .setAllowMultiLabel(true) - .build(); + AnnotationSpecSetConfig annotationSpecSetConfig = + AnnotationSpecSetConfig.newBuilder() + .setAnnotationSpecSet(formattedAnnotationSpecSetName) + .setAllowMultiLabel(true) + .build(); - VideoClassificationConfig videoClassificationConfig = VideoClassificationConfig.newBuilder() - .setApplyShotDetection(true) - .addAnnotationSpecSetConfigs(annotationSpecSetConfig) - .build(); + VideoClassificationConfig videoClassificationConfig = + VideoClassificationConfig.newBuilder() + .setApplyShotDetection(true) + .addAnnotationSpecSetConfigs(annotationSpecSetConfig) + .build(); - LabelVideoRequest labelVideoRequest = LabelVideoRequest.newBuilder() - .setParent(formattedDatasetName) - .setBasicConfig(humanAnnotationConfig) - .setVideoClassificationConfig(videoClassificationConfig) - .setFeature(Feature.CLASSIFICATION) - .build(); + LabelVideoRequest labelVideoRequest = + LabelVideoRequest.newBuilder() + .setParent(formattedDatasetName) + .setBasicConfig(humanAnnotationConfig) + .setVideoClassificationConfig(videoClassificationConfig) + .setFeature(Feature.CLASSIFICATION) + .build(); OperationFuture operation = dataLabelingServiceClient.labelVideoAsync(labelVideoRequest); diff --git a/samples/snippets/src/test/java/com/example/datalabeling/CreateAnnotationSpecSetIT.java b/samples/snippets/src/test/java/com/example/datalabeling/CreateAnnotationSpecSetIT.java index a5f92886..90ffb73f 100644 --- a/samples/snippets/src/test/java/com/example/datalabeling/CreateAnnotationSpecSetIT.java +++ b/samples/snippets/src/test/java/com/example/datalabeling/CreateAnnotationSpecSetIT.java @@ -34,9 +34,7 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -/** - * Integration (system) tests for {@link CreateAnnotationSpecSet}. - */ +/** Integration (system) tests for {@link CreateAnnotationSpecSet}. */ @RunWith(JUnit4.class) @Ignore("b/146064330") @SuppressWarnings("checkstyle:abbreviationaswordinname") @@ -60,12 +58,11 @@ public void tearDown() { // Delete the Annotation Spec Sheet try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { ProjectName projectName = ProjectName.of(PROJECT_ID); - ListAnnotationSpecSetsRequest listRequest = ListAnnotationSpecSetsRequest.newBuilder() - .setParent(projectName.toString()) - .build(); + ListAnnotationSpecSetsRequest listRequest = + ListAnnotationSpecSetsRequest.newBuilder().setParent(projectName.toString()).build(); - ListAnnotationSpecSetsPagedResponse response = dataLabelingServiceClient - .listAnnotationSpecSets(listRequest); + ListAnnotationSpecSetsPagedResponse response = + dataLabelingServiceClient.listAnnotationSpecSets(listRequest); for (AnnotationSpecSet annotationSpecSet : response.getPage().iterateAll()) { if (annotationSpecSet.getDisplayName().equals("YOUR_ANNOTATION_SPEC_SET_DISPLAY_NAME")) { @@ -83,8 +80,8 @@ public void testCreateAnnotationSpecSet() throws IOException { String output = bout.toString(); - assertThat(output, CoreMatchers.containsString( - "DisplayName: YOUR_ANNOTATION_SPEC_SET_DISPLAY_NAME")); + assertThat( + output, CoreMatchers.containsString("DisplayName: YOUR_ANNOTATION_SPEC_SET_DISPLAY_NAME")); assertThat(output, CoreMatchers.containsString("Description: YOUR_DESCRIPTION")); assertThat(output, CoreMatchers.containsString("Annotation Count: 2")); } diff --git a/samples/snippets/src/test/java/com/example/datalabeling/CreateDatasetIT.java b/samples/snippets/src/test/java/com/example/datalabeling/CreateDatasetIT.java index ce4c8451..eaeb6102 100644 --- a/samples/snippets/src/test/java/com/example/datalabeling/CreateDatasetIT.java +++ b/samples/snippets/src/test/java/com/example/datalabeling/CreateDatasetIT.java @@ -34,9 +34,7 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -/** - * Integration (system) tests for {@link CreateDataset}. - */ +/** Integration (system) tests for {@link CreateDataset}. */ @RunWith(JUnit4.class) @Ignore("b/146064330") @SuppressWarnings("checkstyle:abbreviationaswordinname") @@ -61,12 +59,10 @@ public void tearDown() { // Delete the Dataset try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { ProjectName projectName = ProjectName.of(PROJECT_ID); - ListDatasetsRequest listRequest = ListDatasetsRequest.newBuilder() - .setParent(projectName.toString()) - .build(); + ListDatasetsRequest listRequest = + ListDatasetsRequest.newBuilder().setParent(projectName.toString()).build(); - ListDatasetsPagedResponse response = dataLabelingServiceClient - .listDatasets(listRequest); + ListDatasetsPagedResponse response = dataLabelingServiceClient.listDatasets(listRequest); for (Dataset dataset : response.getPage().iterateAll()) { if (dataset.getDisplayName().equals(datasetName)) { @@ -80,12 +76,11 @@ public void tearDown() { @Test public void testCreateDataset() throws IOException { - CreateDataset.createDataset(PROJECT_ID,datasetName); + CreateDataset.createDataset(PROJECT_ID, datasetName); String output = bout.toString(); - assertThat(output, CoreMatchers.containsString( - "DisplayName: CREATE_DATASET_NAME")); + assertThat(output, CoreMatchers.containsString("DisplayName: CREATE_DATASET_NAME")); assertThat(output, CoreMatchers.containsString("Description: YOUR_DESCRIPTION")); } } diff --git a/samples/snippets/src/test/java/com/example/datalabeling/CreateInstructionIT.java b/samples/snippets/src/test/java/com/example/datalabeling/CreateInstructionIT.java index 6ebdb898..420a0796 100644 --- a/samples/snippets/src/test/java/com/example/datalabeling/CreateInstructionIT.java +++ b/samples/snippets/src/test/java/com/example/datalabeling/CreateInstructionIT.java @@ -34,9 +34,7 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -/** - * Integration (system) tests for {@link CreateInstruction}. - */ +/** Integration (system) tests for {@link CreateInstruction}. */ @RunWith(JUnit4.class) @Ignore("b/146064330") @SuppressWarnings("checkstyle:abbreviationaswordinname") @@ -62,12 +60,11 @@ public void tearDown() { // Delete the Instruction try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { ProjectName projectName = ProjectName.of(PROJECT_ID); - ListInstructionsRequest listRequest = ListInstructionsRequest.newBuilder() - .setParent(projectName.toString()) - .build(); + ListInstructionsRequest listRequest = + ListInstructionsRequest.newBuilder().setParent(projectName.toString()).build(); - ListInstructionsPagedResponse response = dataLabelingServiceClient - .listInstructions(listRequest); + ListInstructionsPagedResponse response = + dataLabelingServiceClient.listInstructions(listRequest); for (Instruction instruction : response.getPage().iterateAll()) { if (instruction.getDisplayName().equals("YOUR_INSTRUCTION_DISPLAY_NAME")) { @@ -85,10 +82,9 @@ public void testCreateInstruction() throws IOException { String output = bout.toString(); - assertThat(output, CoreMatchers.containsString( - "DisplayName: YOUR_INSTRUCTION_DISPLAY_NAME")); + assertThat(output, CoreMatchers.containsString("DisplayName: YOUR_INSTRUCTION_DISPLAY_NAME")); assertThat(output, CoreMatchers.containsString("Description: YOUR_DESCRIPTION")); - assertThat(output, CoreMatchers.containsString( - String.format("GCS SOURCE URI: %s", GCS_SOURCE_URI))); + assertThat( + output, CoreMatchers.containsString(String.format("GCS SOURCE URI: %s", GCS_SOURCE_URI))); } } diff --git a/samples/snippets/src/test/java/com/example/datalabeling/ImportDataIT.java b/samples/snippets/src/test/java/com/example/datalabeling/ImportDataIT.java index eb7bd787..4852d6c9 100644 --- a/samples/snippets/src/test/java/com/example/datalabeling/ImportDataIT.java +++ b/samples/snippets/src/test/java/com/example/datalabeling/ImportDataIT.java @@ -34,9 +34,7 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -/** - * Integration (system) tests for {@link ImportData}. - */ +/** Integration (system) tests for {@link ImportData}. */ @RunWith(JUnit4.class) @Ignore("b/146064330") @SuppressWarnings("checkstyle:abbreviationaswordinname") @@ -56,17 +54,15 @@ public void setUp() throws IOException { bout = new ByteArrayOutputStream(); System.setOut(new PrintStream(bout)); - CreateDataset.createDataset(PROJECT_ID,datasetName); + CreateDataset.createDataset(PROJECT_ID, datasetName); // Get the Dataset try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { ProjectName projectName = ProjectName.of(PROJECT_ID); - ListDatasetsRequest listRequest = ListDatasetsRequest.newBuilder() - .setParent(projectName.toString()) - .build(); + ListDatasetsRequest listRequest = + ListDatasetsRequest.newBuilder().setParent(projectName.toString()).build(); - ListDatasetsPagedResponse response = dataLabelingServiceClient - .listDatasets(listRequest); + ListDatasetsPagedResponse response = dataLabelingServiceClient.listDatasets(listRequest); for (Dataset returnedDataset : response.getPage().iterateAll()) { if (returnedDataset.getDisplayName().equals("IMPORT_DATASET_NAME")) { @@ -86,12 +82,10 @@ public void tearDown() { // Delete the Dataset try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { ProjectName projectName = ProjectName.of(PROJECT_ID); - ListDatasetsRequest listRequest = ListDatasetsRequest.newBuilder() - .setParent(projectName.toString()) - .build(); + ListDatasetsRequest listRequest = + ListDatasetsRequest.newBuilder().setParent(projectName.toString()).build(); - ListDatasetsPagedResponse response = dataLabelingServiceClient - .listDatasets(listRequest); + ListDatasetsPagedResponse response = dataLabelingServiceClient.listDatasets(listRequest); for (Dataset returnedDataset : response.getPage().iterateAll()) { if (returnedDataset.getDisplayName().equals("IMPORT_DATASET_NAME")) { diff --git a/samples/snippets/src/test/java/com/example/datalabeling/LabelImageIT.java b/samples/snippets/src/test/java/com/example/datalabeling/LabelImageIT.java index 79e1ef79..eac1c208 100644 --- a/samples/snippets/src/test/java/com/example/datalabeling/LabelImageIT.java +++ b/samples/snippets/src/test/java/com/example/datalabeling/LabelImageIT.java @@ -37,9 +37,7 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -/** - * Integration (system) tests for {@link LabelImage}. - */ +/** Integration (system) tests for {@link LabelImage}. */ @RunWith(JUnit4.class) @Ignore("b/146064330") @SuppressWarnings("checkstyle:abbreviationaswordinname") @@ -62,15 +60,14 @@ public void setUp() { try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { // Create the dataset - CreateDataset.createDataset(PROJECT_ID,datsetName); + CreateDataset.createDataset(PROJECT_ID, datsetName); ProjectName projectName = ProjectName.of(PROJECT_ID); // Get the Dataset - ListDatasetsRequest datasetsRequest = ListDatasetsRequest.newBuilder() - .setParent(projectName.toString()) - .build(); - ListDatasetsPagedResponse datasetsResponse = dataLabelingServiceClient - .listDatasets(datasetsRequest); + ListDatasetsRequest datasetsRequest = + ListDatasetsRequest.newBuilder().setParent(projectName.toString()).build(); + ListDatasetsPagedResponse datasetsResponse = + dataLabelingServiceClient.listDatasets(datasetsRequest); for (Dataset returnedDataset : datasetsResponse.getPage().iterateAll()) { if (returnedDataset.getDisplayName().equals("LABEL_IMAGE_DATASET_NAME")) { dataset = returnedDataset; @@ -87,11 +84,10 @@ public void setUp() { CreateAnnotationSpecSet.createAnnotationSpecSet(PROJECT_ID); // Get the instruction - ListInstructionsRequest instructionsRequest = ListInstructionsRequest.newBuilder() - .setParent(projectName.toString()) - .build(); - ListInstructionsPagedResponse instructionsResponse = dataLabelingServiceClient - .listInstructions(instructionsRequest); + ListInstructionsRequest instructionsRequest = + ListInstructionsRequest.newBuilder().setParent(projectName.toString()).build(); + ListInstructionsPagedResponse instructionsResponse = + dataLabelingServiceClient.listInstructions(instructionsRequest); for (Instruction returnedInstruction : instructionsResponse.getPage().iterateAll()) { if (returnedInstruction.getDisplayName().equals("YOUR_INSTRUCTION_DISPLAY_NAME")) { instruction = returnedInstruction; @@ -99,11 +95,10 @@ public void setUp() { } // Get the annotation spec set - ListAnnotationSpecSetsRequest annotationRequest = ListAnnotationSpecSetsRequest.newBuilder() - .setParent(projectName.toString()) - .build(); - ListAnnotationSpecSetsPagedResponse annotationsResponse = dataLabelingServiceClient - .listAnnotationSpecSets(annotationRequest); + ListAnnotationSpecSetsRequest annotationRequest = + ListAnnotationSpecSetsRequest.newBuilder().setParent(projectName.toString()).build(); + ListAnnotationSpecSetsPagedResponse annotationsResponse = + dataLabelingServiceClient.listAnnotationSpecSets(annotationRequest); for (AnnotationSpecSet returnedAnnotation : annotationsResponse.getPage().iterateAll()) { if (returnedAnnotation.getDisplayName().equals("YOUR_ANNOTATION_SPEC_SET_DISPLAY_NAME")) { annotationSpecSet = returnedAnnotation; diff --git a/synth.metadata b/synth.metadata index 173d045b..d92c15da 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-datalabeling.git", - "sha": "e80b87ba34a6f39fd742b1a1cb12adaf299e2752" + "sha": "aaa615f834d778fd7101801b360c794ae841e07f" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6abb59097be84599a1d6091fe534a49e5c5cf948" + "sha": "b19b401571e77192f8dd38eab5fb2300a0de9324" } } ], @@ -40,6 +40,7 @@ ".github/ISSUE_TEMPLATE/feature_request.md", ".github/ISSUE_TEMPLATE/support_request.md", ".github/PULL_REQUEST_TEMPLATE.md", + ".github/generated-files-bot.yml", ".github/readme/synth.py", ".github/release-please.yml", ".github/snippet-bot.yml", diff --git a/versions.txt b/versions.txt index 54a80b91..36fee883 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -proto-google-cloud-datalabeling-v1beta1:0.84.4:0.84.4 -grpc-google-cloud-datalabeling-v1beta1:0.84.4:0.84.4 -google-cloud-datalabeling:0.119.4:0.119.4 +proto-google-cloud-datalabeling-v1beta1:0.84.5:0.84.5 +grpc-google-cloud-datalabeling-v1beta1:0.84.5:0.84.5 +google-cloud-datalabeling:0.119.5:0.119.5