Skip to content

Commit

Permalink
build: add release-please config, fix owlbot-config
Browse files Browse the repository at this point in the history
  • Loading branch information
sofisl committed Nov 11, 2022
1 parent 860b665 commit c9beb4f
Show file tree
Hide file tree
Showing 11 changed files with 143 additions and 19 deletions.
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"packages/google-cloud-gkeconnect-gateway": "2.0.5",
"packages/google-cloud-gkemulticloud": "0.1.4",
"packages/google-cloud-language": "5.1.2",
"packages/google-cloud-mediatranslation": "3.0.5",
"packages/google-cloud-memcache": "2.1.4",
"packages/google-cloud-oslogin": "4.0.4",
"packages/google-cloud-phishingprotection": "3.0.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@
# 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.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest

deep-remove-regex:
- /owl-bot-staging

deep-copy-regex:
- source: /google/cloud/mediatranslation/(.*)/.*-nodejs/(.*)
dest: /owl-bot-staging/$1/$2
- source: /google/cloud/mediatranslation/(.*)/.*-nodejs
dest: /owl-bot-staging/google-cloud-mediatranslation/$1

2 changes: 1 addition & 1 deletion packages/google-cloud-mediatranslation/.mocharc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-mediatranslation/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-mediatranslation/.repo-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"default_version": "v1beta1",
"language": "nodejs",
"name_pretty": "Cloud Media Translation",
"repo": "googleapis/nodejs-media-translation",
"repo": "googleapis/google-cloud-node",
"product_documentation": "https://cloud.google.com/translate/media/docs/",
"requires_billing": true,
"name": "mediatranslation",
Expand Down
21 changes: 15 additions & 6 deletions packages/google-cloud-mediatranslation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[//]: # "To regenerate it, use `python -m synthtool`."
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>

# [Cloud Media Translation: Node.js Client](https://github.com/googleapis/nodejs-media-translation)
# [Cloud Media Translation: Node.js Client](https://github.com/googleapis/google-cloud-node)

[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![npm version](https://img.shields.io/npm/v/@google-cloud/media-translation.svg)](https://www.npmjs.org/package/@google-cloud/media-translation)
Expand All @@ -14,11 +14,11 @@ Mediatranslation client for Node.js


A comprehensive list of changes in each version may be found in
[the CHANGELOG](https://github.com/googleapis/nodejs-media-translation/blob/main/CHANGELOG.md).
[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-mediatranslation/CHANGELOG.md).

* [Cloud Media Translation Node.js Client API Reference][client-docs]
* [Cloud Media Translation Documentation][product-docs]
* [github.com/googleapis/nodejs-media-translation](https://github.com/googleapis/nodejs-media-translation)
* [github.com/googleapis/google-cloud-node/packages/google-cloud-mediatranslation](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-mediatranslation)

Read more about the client libraries for Cloud APIs, including the older
Google APIs Client Libraries, in [Client Libraries Explained][explained].
Expand All @@ -32,7 +32,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
* [Before you begin](#before-you-begin)
* [Installing the client library](#installing-the-client-library)


* [Samples](#samples)
* [Versioning](#versioning)
* [Contributing](#contributing)
* [License](#license)
Expand All @@ -56,6 +56,15 @@ npm install @google-cloud/media-translation



## Samples

Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample.

| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Speech_translation_service.streaming_translate_speech | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/speech_translation_service.streaming_translate_speech.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/speech_translation_service.streaming_translate_speech.js,samples/README.md) |



The [Cloud Media Translation Node.js Client API Reference][client-docs] documentation
also contains samples.
Expand Down Expand Up @@ -103,7 +112,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages]

## Contributing

Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-media-translation/blob/main/CONTRIBUTING.md).
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md).

Please note that this `README.md`, the `samples/README.md`,
and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
Expand All @@ -115,7 +124,7 @@ to its templates in

Apache Version 2.0

See [LICENSE](https://github.com/googleapis/nodejs-media-translation/blob/main/LICENSE)
See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)

[client-docs]: https://cloud.google.com/nodejs/docs/reference/media-translation/latest
[product-docs]: https://cloud.google.com/translate/media/docs/
Expand Down
14 changes: 10 additions & 4 deletions packages/google-cloud-mediatranslation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"name": "@google-cloud/media-translation",
"version": "3.0.5",
"description": "Mediatranslation client for Node.js",
"repository": "googleapis/nodejs-media-translation",
"repository": {
"type": "git",
"directory": "packages/google-cloud-mediatranslation",
"url": "https://github.com/googleapis/google-cloud-node.git"
},
"license": "Apache-2.0",
"author": "Google LLC",
"files": [
Expand All @@ -18,11 +22,12 @@
"docs-test": "linkinator docs",
"predocs-test": "npm run docs",
"prepare": "npm run compile-protos && npm run compile",
"system-test": "c8 mocha build/system-test",
"system-test": "npm run compile && c8 mocha build/system-test",
"test": "c8 mocha build/test",
"fix": "gts fix",
"lint": "gts check",
"precompile": "gts clean"
"precompile": "gts clean",
"samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test"
},
"dependencies": {
"google-gax": "^3.5.2"
Expand All @@ -48,5 +53,6 @@
},
"engines": {
"node": ">=12.0.0"
}
},
"homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-mediatranslation"
}
50 changes: 50 additions & 0 deletions packages/google-cloud-mediatranslation/samples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
[//]: # "To regenerate it, use `python -m synthtool`."
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>

# [Cloud Media Translation: Node.js Samples](https://github.com/googleapis/google-cloud-node)

[![Open in Cloud Shell][shell_img]][shell_link]



## Table of Contents

* [Before you begin](#before-you-begin)
* [Samples](#samples)
* [Speech_translation_service.streaming_translate_speech](#speech_translation_service.streaming_translate_speech)

## Before you begin

Before running the samples, make sure you've followed the steps outlined in
[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library).

`cd samples`

`npm install`

`cd ..`

## Samples



### Speech_translation_service.streaming_translate_speech

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/speech_translation_service.streaming_translate_speech.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/speech_translation_service.streaming_translate_speech.js,samples/README.md)

__Usage:__


`node /workspace/google-cloud-node/samples/generated/v1beta1/speech_translation_service.streaming_translate_speech.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/google-cloud-node&page=editor&open_in_editor=samples/README.md
[product-docs]: https://cloud.google.com/translate/media/docs/
59 changes: 59 additions & 0 deletions packages/google-cloud-mediatranslation/samples/quickstart.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"clientLibrary": {
"name": "nodejs-mediatranslation",
"version": "3.0.5",
"language": "TYPESCRIPT",
"apis": [
{
"id": "google.cloud.mediatranslation.v1beta1",
"version": "v1beta1"
}
]
},
"snippets": [
{
"regionTag": "mediatranslation_v1beta1_generated_SpeechTranslationService_StreamingTranslateSpeech_async",
"title": "SpeechTranslationService streamingTranslateSpeech Sample",
"origin": "API_DEFINITION",
"description": " Performs bidirectional streaming speech translation: receive results while sending audio. This method is only available via the gRPC API (not REST).",
"canonical": true,
"file": "speech_translation_service.streaming_translate_speech.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 25,
"end": 69,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "StreamingTranslateSpeech",
"fullName": "google.cloud.mediatranslation.v1beta1.SpeechTranslationService.StreamingTranslateSpeech",
"async": true,
"parameters": [
{
"name": "streaming_config",
"type": ".google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig"
},
{
"name": "audio_content",
"type": "TYPE_BYTES"
}
],
"resultType": ".google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse",
"client": {
"shortName": "SpeechTranslationServiceClient",
"fullName": "google.cloud.mediatranslation.v1beta1.SpeechTranslationServiceClient"
},
"method": {
"shortName": "StreamingTranslateSpeech",
"fullName": "google.cloud.mediatranslation.v1beta1.SpeechTranslationService.StreamingTranslateSpeech",
"service": {
"shortName": "SpeechTranslationService",
"fullName": "google.cloud.mediatranslation.v1beta1.SpeechTranslationService"
}
}
}
}
]
}
2 changes: 1 addition & 1 deletion packages/google-cloud-mediatranslation/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
3 changes: 2 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"packages/google-cloud-gkeconnect-gateway": {},
"packages/google-cloud-gkemulticloud": {},
"packages/google-cloud-language": {},
"packages/google-cloud-mediatranslation": {},
"packages/google-cloud-memcache": {},
"packages/google-cloud-oslogin": {},
"packages/google-cloud-phishingprotection": {},
Expand All @@ -48,4 +49,4 @@
}
],
"release-type": "node"
}
}

0 comments on commit c9beb4f

Please sign in to comment.