From 97bd612441f96083a7f82b3d989c81c06c189102 Mon Sep 17 00:00:00 2001 From: Angel Caamal Date: Tue, 8 Sep 2026 19:11:46 +0000 Subject: [PATCH] chore(datalabeling): remove deprecated samples and unused region tags --- datalabeling/.eslintrc.yml | 3 --- datalabeling/README.md | 52 -------------------------------------- datalabeling/package.json | 24 ------------------ datalabeling/quickstart.js | 37 --------------------------- datalabeling/test/test.js | 28 -------------------- 5 files changed, 144 deletions(-) delete mode 100644 datalabeling/.eslintrc.yml delete mode 100644 datalabeling/README.md delete mode 100644 datalabeling/package.json delete mode 100644 datalabeling/quickstart.js delete mode 100644 datalabeling/test/test.js diff --git a/datalabeling/.eslintrc.yml b/datalabeling/.eslintrc.yml deleted file mode 100644 index 282535f55f6..00000000000 --- a/datalabeling/.eslintrc.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -rules: - no-console: off diff --git a/datalabeling/README.md b/datalabeling/README.md deleted file mode 100644 index dbd440a5bf7..00000000000 --- a/datalabeling/README.md +++ /dev/null @@ -1,52 +0,0 @@ -[//]: # "This README.md file is auto-generated, all changes to this file will be lost." -[//]: # "To regenerate it, use `python -m synthtool`." -Google Cloud Platform logo - -# [Google Cloud Data Labeling: Node.js Samples](https://github.com/googleapis/nodejs-datalabeling) - -[![Open in Cloud Shell][shell_img]][shell_link] - - - -## Table of Contents - -* [Before you begin](#before-you-begin) -* [Samples](#samples) - * [Get Datasets](#get-datasets) - -## Before you begin - -Before running the samples, make sure you've followed the steps outlined in -[Using the client library](https://github.com/googleapis/nodejs-datalabeling#using-the-client-library). - -`cd samples` - -`npm install` - -`cd ..` - -## Samples - - - -### Get Datasets - -Gets all available Datasets. - -View the [source code](https://github.com/googleapis/nodejs-datalabeling/blob/main/samples/quickstart.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datalabeling&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) - -__Usage:__ - - -`node quickstart.js` - - - - - - -[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datalabeling&page=editor&open_in_editor=samples/README.md -[product-docs]: https://cloud.google.com/data-labeling/docs/ diff --git a/datalabeling/package.json b/datalabeling/package.json deleted file mode 100644 index badd53b5895..00000000000 --- a/datalabeling/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "nodejs-datalabeling-samples", - "private": true, - "license": "Apache-2.0", - "author": "Google LLC", - "engines": { - "node": ">=16.0.0" - }, - "files": [ - "*.js", - "!test/" - ], - "scripts": { - "test": "c8 mocha -p -j 2 --timeout 600000" - }, - "dependencies": { - "@google-cloud/datalabeling": "^4.0.0" - }, - "devDependencies": { - "c8": "^10.0.0", - "chai": "^4.5.0", - "mocha": "^10.0.0" - } -} diff --git a/datalabeling/quickstart.js b/datalabeling/quickstart.js deleted file mode 100644 index 58f17cdc4b5..00000000000 --- a/datalabeling/quickstart.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -// sample-metadata: -// title: Get Datasets -// description: Gets all available Datasets. -// usage: node quickstart.js - -function main() { - // [START datalabeling_quickstart] - const {DataLabelingServiceClient} = require('@google-cloud/datalabeling'); - const client = new DataLabelingServiceClient(); - - async function quickstart() { - const projectId = await client.getProjectId(); - const parent = client.projectPath(projectId); - const [result] = await client.listDatasets({parent}); - console.log('Datasets:'); - console.log(result); - } - quickstart(); - // [END datalabeling_quickstart] -} -main(...process.argv.slice(2)); diff --git a/datalabeling/test/test.js b/datalabeling/test/test.js deleted file mode 100644 index eb3ba14c810..00000000000 --- a/datalabeling/test/test.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const {assert} = require('chai'); -const {describe, it} = require('mocha'); -const {execSync} = require('child_process'); - -const exec = cmd => execSync(cmd, {encoding: 'utf8'}); - -describe('quickstart', () => { - it('should run the quickstart', () => { - const stdout = exec('node quickstart.js'); - assert.include(stdout, 'Datasets:'); - }); -});