Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(translation): migrate code from googleapis/python-translate #8523

Merged
merged 273 commits into from
Nov 18, 2022

Conversation

telpirion
Copy link
Contributor

Description

Fixes #

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

merla18 and others added 30 commits July 31, 2020 16:23
* Fix README rst links

* Update all READMEs
* Auto-update dependencies.

* Fix natural language samples

* Fix pubsub iam samples

* Fix language samples

* Fix bigquery samples
* Auto-update dependencies.

* Explicitly use latest bigtable client

Change-Id: Id71e9e768f020730e4ca9514a0d7ebaa794e7d9e

* Revert language update for now

Change-Id: I8867f154e9a5aae00d0047c9caf880e5e8f50c53

* Remove pdb. smh

Change-Id: I5ff905fadc026eebbcd45512d4e76e003e3b2b43
* Auto-update dependencies.

* Fix storage notification poll sample

Change-Id: I6afbc79d15e050531555e4c8e51066996717a0f3

* Fix spanner samples

Change-Id: I40069222c60d57e8f3d3878167591af9130895cb

* Drop coverage because it's not useful

Change-Id: Iae399a7083d7866c3c7b9162d0de244fbff8b522

* Try again to fix flaky logging test

Change-Id: I6225c074701970c17c426677ef1935bb6d7e36b4
Change-Id: I03b5eaef8b17ac3dc3c0339fd2c7447bd3e11bd2
* Update Readme.rst to add Python setup guide

As requested in b/64770713.

This sample is linked in documentation https://cloud.google.com/bigtable/docs/scaling, and it would make more sense to update the guide here than in the documentation.

* Update README.rst

* Update README.rst

* Update README.rst

* Update README.rst

* Update README.rst

* Update install_deps.tmpl.rst

* Updated readmegen scripts and re-generated related README files

* Fixed the lint error
* Fixed failed tests on Kokoro (Spanner + Translate)

* Update quickstart_test.py
* Auto-update dependencies.

* Update requirements.txt
* Add region tags

* Added end region tags

* Linting errors fixed
* Auto-update dependencies.

* Update requirements.txt

* Update requirements.txt
* Add in progress beta snippets

Change-Id: I2cd8ddc2307a8e40d56ce7e493749dc05c34d164

* Add google-cloud-storage dependency

Change-Id: Iff7bc9b2c82b1e829580a3d4ad628087dbeee8be

* Non-'global' location required for BatchTranslateText

Change-Id: I5198aa6368a088e8f5ee295dc55a5e9e4ca8f494

* Upgrade google-cloud-translate to 1.4.0

1.4.0 includes the new v3beta1 alongside V2

Change-Id: I5adfe78ea7e78d84678db343cd84516e3d05491f

* Update Translate samples

You can now provide your own glossary ID

The tests now run within a randomly created bucket (deleted after each
test)

Change-Id: I5cb2680cd0e9e43c85932a6a0dc19e6fab5008c5

* pytest.fixture for random test bucket

Change-Id: I8e816ed4c95a6235347a29849044b4cab02d40a8

* flake8 spec fixes

Change-Id: I4932bcf856a9498b01d9661c90c6b45ee2958ee1

* Added pytest fixture for creating glossary (WIP)

Change-Id: Iddb5ecbf0eefb9efd2243dc4bc56b585102e9351

* Add assertions, remove placeholder TODOs

Change-Id: If1eb20bca5bfcc87dd0652d5488b2188afa626af
* fixing translate-with-glossary bug

* tests passing

* reverting to python3 compatibility

* snippets test fix
…2325)

* fixing translate-with-glossary bug

* initial commit

* adding resources

* adding more resources

* glossary accomodates upper case words

* finished hybrid glossaries tutorial sample code

* Revert "fixing translate-with-glossary bug"

This reverts commit 6a9f7ca.

* lint fix for tests. TODO src lint fix

* lint

* it's the final lint-down

* adding README

* implementing @nnegrey's feedback

* lint

* lint

* extracting files from cloud-client

* lint comment test

* fixing comments per @beccasaurus

* removing redundant directory

* implementing @nnegrey's feedback

* lint

* lint

* handling glossary-already-exists exception

* lint

* adding ssml functionality

* fixing imports per @nnegrey

* fixed import comment

* more specific exceptions import

* removing period from copyright
* fix: translate test

* Add unicode formatting
…2677)

* automl: add natural language sentiment analysis ga samples

* Add links to documentation

* Update tests to use centralized project

* Fix environment variable, make translate test less flaky
Migrate from tmp-generated-samples branch 615c08e
Remove boilerplate
Update copyright date
Blacken
Remove unused imports
Shorten docstrings
Remove CLI
Set defaults in function definition
Add link to supported types guide
Inline function arguments
Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>
@telpirion telpirion closed this Nov 17, 2022
@telpirion telpirion reopened this Nov 18, 2022
@telpirion telpirion added api: translate Issues related to the Cloud Translation API. api: translation Issues related to the Cloud Translation API API. labels Nov 18, 2022
@telpirion telpirion marked this pull request as ready for review November 18, 2022 18:13
@telpirion telpirion requested review from a team as code owners November 18, 2022 18:13
@telpirion telpirion changed the title migrate code from googleapis/python-translate chore(translation): migrate code from googleapis/python-translate Nov 18, 2022
@snippet-bot
Copy link

snippet-bot bot commented Nov 18, 2022

Here is the summary of changes.

You are about to add 28 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@telpirion telpirion added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 18, 2022
@telpirion
Copy link
Contributor Author

Set this to "Ready for Review" too soon -- still need to remove old / unused samples.

Copy link
Collaborator

@dandhlee dandhlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rename the directory to be translate? This change was made to rename from python-translation to python-translate.

@@ -0,0 +1,1728 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snippetgen samples are not in scope, please remove this directory and keep it in the old repository.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -0,0 +1,312 @@
# Copyright 2019 Google LLC
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@telpirion telpirion requested a review from nicain as a code owner November 18, 2022 18:45
@telpirion telpirion removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 18, 2022
@telpirion
Copy link
Contributor Author

Could you rename the directory to be translate? This change was made to rename from python-translation to python-translate.

The name of the product is Cloud Translation. See: https://cloud.google.com/translate/docs/

@dandhlee
Copy link
Collaborator

The name of the product is indeed Translation but the shortname is translate. Indeed strange, but I'd prefer to be consistent.

@telpirion telpirion requested a review from dandhlee November 18, 2022 18:52
@telpirion
Copy link
Contributor Author

After conferring with @nicain on preferred branding, I've changed the folder name.

Copy link
Collaborator

@dandhlee dandhlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Overriding CLA and merging.

@dandhlee dandhlee merged commit 2073cb5 into main Nov 18, 2022
@dandhlee dandhlee deleted the python-translate-migration branch November 18, 2022 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: translate Issues related to the Cloud Translation API. api: translation Issues related to the Cloud Translation API API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

appengine/taskqueue/pull-counter Needs Worker Tests