Skip to content

Commit

Permalink
Translate: Add nox session docs, reorder methods (via synth). (#7785)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and busunkim96 committed Apr 30, 2019
1 parent 87789c7 commit 09dbed8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,22 @@ def from_service_account_file(cls, filename, *args, **kwargs):
from_service_account_json = from_service_account_file

@classmethod
def location_path(cls, project, location):
"""Return a fully-qualified location string."""
def glossary_path(cls, project, location, glossary):
"""Return a fully-qualified glossary string."""
return google.api_core.path_template.expand(
"projects/{project}/locations/{location}",
"projects/{project}/locations/{location}/glossaries/{glossary}",
project=project,
location=location,
glossary=glossary,
)

@classmethod
def glossary_path(cls, project, location, glossary):
"""Return a fully-qualified glossary string."""
def location_path(cls, project, location):
"""Return a fully-qualified location string."""
return google.api_core.path_template.expand(
"projects/{project}/locations/{location}/glossaries/{glossary}",
"projects/{project}/locations/{location}",
project=project,
location=location,
glossary=glossary,
)

def __init__(
Expand Down
6 changes: 3 additions & 3 deletions packages/google-cloud-translate/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ def cover(session):

session.run("coverage", "erase")

@nox.session(python='3.6')
@nox.session(python="3.7")
def docs(session):
"""Build the docs."""
"""Build the docs for this library."""

session.install('sphinx', 'alabaster', 'recommonmark')
session.install('-e', '.')
session.install('sphinx', 'alabaster', 'recommonmark')

shutil.rmtree(os.path.join('docs', '_build'), ignore_errors=True)
session.run(
Expand Down
14 changes: 7 additions & 7 deletions packages/google-cloud-translate/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"updateTime": "2019-04-08T22:42:12.391231Z",
"updateTime": "2019-04-23T12:32:43.079835Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.16.25",
"dockerImage": "googleapis/artman@sha256:d9597f983d1d4e61272c63cb97b7d8f8234da9999526c35d357de3d781f0ec1b"
"version": "0.17.0",
"dockerImage": "googleapis/artman@sha256:c58f4ec3838eb4e0718eb1bccc6512bd6850feaa85a360a9e38f6f848ec73bc2"
}
},
{
"git": {
"name": "googleapis",
"remote": "git@github.com:googleapis/googleapis.git",
"sha": "9a02c5acecb43f38fae4fa52c6420f21c335b888",
"internalRef": "242170119"
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "547e19e7df398e9290e8e3674d7351efc500f9b0",
"internalRef": "244712781"
}
},
{
"template": {
"name": "python_library",
"origin": "synthtool.gcp",
"version": "2019.2.26"
"version": "2019.4.10"
}
}
],
Expand Down
1 change: 1 addition & 0 deletions packages/google-cloud-translate/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
s.move(library / f'google/cloud/translate_{version}', excludes=excludes)
s.move(library / 'tests')
s.move(library / f"docs/gapic/{version}")
s.move(library / "docs/conf.py")

# translation -> translate
s.replace(
Expand Down

0 comments on commit 09dbed8

Please sign in to comment.