Skip to content

Commit 517fb9d

Browse files
yoshi-automationbusunkim96
authored andcommitted
Add nox session docs, reorder methods (via synth). (googleapis#7774)
1 parent 7c3f9d5 commit 517fb9d

7 files changed

Lines changed: 65 additions & 31 deletions

File tree

irm/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Changelog

irm/docs/README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../README.rst

irm/docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CHANGELOG.md

irm/docs/index.rst

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1-
.. include:: /../irm/README.rst
1+
.. include:: README.rst
22

33
Api Reference
44
-------------
55
.. toctree::
66
:maxdepth: 2
77

88
gapic/v1alpha2/api
9-
gapic/v1alpha2/types
9+
gapic/v1alpha2/types
10+
11+
12+
Changelog
13+
---------
14+
15+
For a list of all ``google-cloud-irm`` releases:
16+
17+
.. toctree::
18+
:maxdepth: 2
19+
20+
changelog

irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,6 @@ def from_service_account_file(cls, filename, *args, **kwargs):
7171

7272
from_service_account_json = from_service_account_file
7373

74-
@classmethod
75-
def project_path(cls, project):
76-
"""Return a fully-qualified project string."""
77-
return google.api_core.path_template.expand(
78-
"projects/{project}", project=project
79-
)
80-
81-
@classmethod
82-
def incident_path(cls, project, incident):
83-
"""Return a fully-qualified incident string."""
84-
return google.api_core.path_template.expand(
85-
"projects/{project}/incidents/{incident}",
86-
project=project,
87-
incident=incident,
88-
)
89-
9074
@classmethod
9175
def annotation_path(cls, project, incident, annotation):
9276
"""Return a fully-qualified annotation string."""
@@ -107,6 +91,22 @@ def artifact_path(cls, project, incident, artifact):
10791
artifact=artifact,
10892
)
10993

94+
@classmethod
95+
def incident_path(cls, project, incident):
96+
"""Return a fully-qualified incident string."""
97+
return google.api_core.path_template.expand(
98+
"projects/{project}/incidents/{incident}",
99+
project=project,
100+
incident=incident,
101+
)
102+
103+
@classmethod
104+
def project_path(cls, project):
105+
"""Return a fully-qualified project string."""
106+
return google.api_core.path_template.expand(
107+
"projects/{project}", project=project
108+
)
109+
110110
@classmethod
111111
def role_assignment_path(cls, project, incident, role_assignment):
112112
"""Return a fully-qualified role_assignment string."""
@@ -117,6 +117,13 @@ def role_assignment_path(cls, project, incident, role_assignment):
117117
role_assignment=role_assignment,
118118
)
119119

120+
@classmethod
121+
def signal_path(cls, project, signal):
122+
"""Return a fully-qualified signal string."""
123+
return google.api_core.path_template.expand(
124+
"projects/{project}/signals/{signal}", project=project, signal=signal
125+
)
126+
120127
@classmethod
121128
def subscription_path(cls, project, incident, subscription):
122129
"""Return a fully-qualified subscription string."""
@@ -137,13 +144,6 @@ def tag_path(cls, project, incident, tag):
137144
tag=tag,
138145
)
139146

140-
@classmethod
141-
def signal_path(cls, project, signal):
142-
"""Return a fully-qualified signal string."""
143-
return google.api_core.path_template.expand(
144-
"projects/{project}/signals/{signal}", project=project, signal=signal
145-
)
146-
147147
def __init__(
148148
self,
149149
transport=None,

irm/noxfile.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
from __future__ import absolute_import
1818
import os
19+
import shutil
1920

2021
import nox
2122

@@ -138,3 +139,22 @@ def cover(session):
138139
session.run("coverage", "report", "--show-missing", "--fail-under=100")
139140

140141
session.run("coverage", "erase")
142+
143+
@nox.session(python="3.7")
144+
def docs(session):
145+
"""Build the docs for this library."""
146+
147+
session.install('-e', '.')
148+
session.install('sphinx', 'alabaster', 'recommonmark')
149+
150+
shutil.rmtree(os.path.join('docs', '_build'), ignore_errors=True)
151+
session.run(
152+
'sphinx-build',
153+
'-W', # warnings as errors
154+
'-T', # show full traceback on exception
155+
'-N', # no colors
156+
'-b', 'html',
157+
'-d', os.path.join('docs', '_build', 'doctrees', ''),
158+
os.path.join('docs', ''),
159+
os.path.join('docs', '_build', 'html', ''),
160+
)

irm/synth.metadata

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
2-
"updateTime": "2019-03-28T12:16:23.534352Z",
2+
"updateTime": "2019-05-01T19:40:48.665198Z",
33
"sources": [
44
{
55
"generator": {
66
"name": "artman",
7-
"version": "0.16.20",
8-
"dockerImage": "googleapis/artman@sha256:e3c054a2fb85a12481c722af616c7fb6f1d02d862248385eecbec3e4240ebd1e"
7+
"version": "0.17.1",
8+
"dockerImage": "googleapis/artman@sha256:a40ca4dd4ef031c0ded4df4909ffdf7b3f20d29b23e682ef991eb60ba0ca6025"
99
}
1010
},
1111
{
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "6a84b3267b0a95e922608b9891219075047eee29",
16-
"internalRef": "240640999"
15+
"sha": "316b54c401ab9bc08ed71cb362915b9e7a23bb05",
16+
"internalRef": "246014263"
1717
}
1818
},
1919
{
2020
"template": {
2121
"name": "python_library",
2222
"origin": "synthtool.gcp",
23-
"version": "2019.2.26"
23+
"version": "2019.4.24"
2424
}
2525
}
2626
],

0 commit comments

Comments
 (0)