Skip to content

Commit 09dbed8

Browse files
yoshi-automationbusunkim96
authored andcommitted
Translate: Add nox session docs, reorder methods (via synth). (#7785)
1 parent 87789c7 commit 09dbed8

4 files changed

Lines changed: 18 additions & 17 deletions

File tree

packages/google-cloud-translate/google/cloud/translate_v3beta1/gapic/translation_service_client.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,22 @@ def from_service_account_file(cls, filename, *args, **kwargs):
7676
from_service_account_json = from_service_account_file
7777

7878
@classmethod
79-
def location_path(cls, project, location):
80-
"""Return a fully-qualified location string."""
79+
def glossary_path(cls, project, location, glossary):
80+
"""Return a fully-qualified glossary string."""
8181
return google.api_core.path_template.expand(
82-
"projects/{project}/locations/{location}",
82+
"projects/{project}/locations/{location}/glossaries/{glossary}",
8383
project=project,
8484
location=location,
85+
glossary=glossary,
8586
)
8687

8788
@classmethod
88-
def glossary_path(cls, project, location, glossary):
89-
"""Return a fully-qualified glossary string."""
89+
def location_path(cls, project, location):
90+
"""Return a fully-qualified location string."""
9091
return google.api_core.path_template.expand(
91-
"projects/{project}/locations/{location}/glossaries/{glossary}",
92+
"projects/{project}/locations/{location}",
9293
project=project,
9394
location=location,
94-
glossary=glossary,
9595
)
9696

9797
def __init__(

packages/google-cloud-translate/noxfile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,12 @@ def cover(session):
140140

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

143-
@nox.session(python='3.6')
143+
@nox.session(python="3.7")
144144
def docs(session):
145-
"""Build the docs."""
145+
"""Build the docs for this library."""
146146

147-
session.install('sphinx', 'alabaster', 'recommonmark')
148147
session.install('-e', '.')
148+
session.install('sphinx', 'alabaster', 'recommonmark')
149149

150150
shutil.rmtree(os.path.join('docs', '_build'), ignore_errors=True)
151151
session.run(

packages/google-cloud-translate/synth.metadata

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
2-
"updateTime": "2019-04-08T22:42:12.391231Z",
2+
"updateTime": "2019-04-23T12:32:43.079835Z",
33
"sources": [
44
{
55
"generator": {
66
"name": "artman",
7-
"version": "0.16.25",
8-
"dockerImage": "googleapis/artman@sha256:d9597f983d1d4e61272c63cb97b7d8f8234da9999526c35d357de3d781f0ec1b"
7+
"version": "0.17.0",
8+
"dockerImage": "googleapis/artman@sha256:c58f4ec3838eb4e0718eb1bccc6512bd6850feaa85a360a9e38f6f848ec73bc2"
99
}
1010
},
1111
{
1212
"git": {
1313
"name": "googleapis",
14-
"remote": "git@github.com:googleapis/googleapis.git",
15-
"sha": "9a02c5acecb43f38fae4fa52c6420f21c335b888",
16-
"internalRef": "242170119"
14+
"remote": "https://github.com/googleapis/googleapis.git",
15+
"sha": "547e19e7df398e9290e8e3674d7351efc500f9b0",
16+
"internalRef": "244712781"
1717
}
1818
},
1919
{
2020
"template": {
2121
"name": "python_library",
2222
"origin": "synthtool.gcp",
23-
"version": "2019.2.26"
23+
"version": "2019.4.10"
2424
}
2525
}
2626
],

packages/google-cloud-translate/synth.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
s.move(library / f'google/cloud/translate_{version}', excludes=excludes)
3939
s.move(library / 'tests')
4040
s.move(library / f"docs/gapic/{version}")
41+
s.move(library / "docs/conf.py")
4142

4243
# translation -> translate
4344
s.replace(

0 commit comments

Comments
 (0)