Skip to content

Basic implementation of Translate API. - #1772

Merged
dhermes merged 11 commits into
googleapis:masterfrom
dhermes:start-translate-api
May 24, 2016
Merged

Basic implementation of Translate API.#1772
dhermes merged 11 commits into
googleapis:masterfrom
dhermes:start-translate-api

Conversation

@dhermes

@dhermesdhermes commented May 3, 2016

Copy link
Copy Markdown
Contributor

Test forthcoming after API discussion.

Tests added in 2nd commit.

/cc @daspecster

@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label May 3, 2016
@dhermesdhermes added the api: translation Issues related to the Cloud Translation API API. label May 3, 2016
@dhermes

Copy link
Copy Markdown
ContributorAuthor

I just added a GCLOUD_TESTS_API_KEY environment variable to Travis with an API key for our project tied to Travis.

Comment threadgcloud/translate/__init__.py Outdated
@@ -0,0 +1,18 @@
# Copyright 2015 Google Inc. All rights reserved.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes
dhermesforce-pushed the start-translate-api branch from 6faad34 to 03b4442CompareMay 11, 2016 17:49
@tseaver

Copy link
Copy Markdown
Contributor

pylint failure:

gcloud/translate/client.py:108:80: E501 line too long (80 > 79 characters)

@dhermes
dhermesforce-pushed the start-translate-api branch from 3fd72e2 to 92d4e3eCompareMay 13, 2016 00:07
@dhermes

Copy link
Copy Markdown
ContributorAuthor

D'oh! Fixed the failure. @tseaver PTAL.


@jgeewax WDYT of the verb and verb_multiple approach (as is done in datastore)?

@tseaver

Copy link
Copy Markdown
Contributor

LGTM

@jgeewax

Copy link
Copy Markdown
Contributor

@dhermes : Didn't notice the updated comment -- lmk what you think.


.. automodule:: gcloud.translate.client
:members:
:undoc-members:

This comment was marked as spam.

This comment was marked as spam.

Comment threadgcloud/translate/client.py Outdated
:rtype: list
:returns: A list of dictionaries for each queried value. Each
dictionary typically contains three keys (though not
all will be present in all cases)

This comment was marked as spam.

dhermes added 7 commits May 17, 2016 09:10
Test forthcoming after API discussion.
Also fixing a few broken docs.
- Dropping _zip_assert
- Making multiple detections for a single value disallowed
- Allow a default target language
@dhermes
dhermesforce-pushed the start-translate-api branch from 92d4e3e to 2a4eaf8CompareMay 17, 2016 16:33
@dhermes

Copy link
Copy Markdown
ContributorAuthor

@tseaver@jgeewax PTAL. I reverted back to the original API surface.

Comment threadgcloud/translate/client.py Outdated
class Client(object):
"""Client to bundle configuration needed for API requests.

:type key: str

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@tseaver

Copy link
Copy Markdown
Contributor

@dhermes

Copy link
Copy Markdown
ContributorAuthor

Thanks for the Pylint pointer. It was worse than a lint failure, was actually a broken system test (using the old key instead of api_key in the Client ctor).

@dhermesdhermes mentioned this pull request May 17, 2016
6 tasks
@dhermes

Copy link
Copy Markdown
ContributorAuthor

@tseaver@jgeewax Where do we stand here?

@tseaver

Copy link
Copy Markdown
Contributor

LGTM

@dhermes

Copy link
Copy Markdown
ContributorAuthor

@jgeewax I'll merge in 24 hours if I don't hear from you.

@jgeewax

Copy link
Copy Markdown
Contributor

lgtm

@dhermes
dhermes merged commit 503cd32 into googleapis:masterMay 24, 2016
@dhermes
dhermes deleted the start-translate-api branch May 24, 2016 18:11
@dhermes

Copy link
Copy Markdown
ContributorAuthor

Blerg! I forgot to squash commits. I wish GitHub had a way to block until squashed (if the author so chooses).

@dhermesdhermes mentioned this pull request Jun 7, 2016
parthea pushed a commit that referenced this pull request Apr 1, 2026
* feat: support dict param for dataframe.agg()
* fix lint
* add more tests
* fix lint
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: translationIssues related to the Cloud Translation API API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@dhermes@tseaver@jgeewax@daspecster@googlebot