Skip to content

Commit 531e9f2

Browse files
authored
Add nox session 'docs' to remaining manual clients. (#8478)
1 parent 2f35bec commit 531e9f2

28 files changed

Lines changed: 1353 additions & 30 deletions

File tree

bigtable/docs/README.rst

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

bigtable/docs/client-intro.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Configuration
2323
-------------
2424

2525
- For an overview of authentication in ``google-cloud-python``,
26-
see :doc:`/core/auth`.
26+
see `Authentication <https://googleapis.dev/python/google-api-core/latest/auth.html#authentication>`_.
2727

2828
- In addition to any authentication configuration, you can also set the
2929
:envvar:`GOOGLE_CLOUD_PROJECT` environment variable for the Google Cloud Console

bigtable/docs/conf.py

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# -- General configuration ------------------------------------------------
2626

2727
# If your documentation needs a minimal Sphinx version, state it here.
28-
# needs_sphinx = '1.0'
28+
needs_sphinx = "1.6.3"
2929

3030
# Add any Sphinx extension module names here, as strings. They can be
3131
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
@@ -36,6 +36,7 @@
3636
"sphinx.ext.intersphinx",
3737
"sphinx.ext.coverage",
3838
"sphinx.ext.napoleon",
39+
"sphinx.ext.todo",
3940
"sphinx.ext.viewcode",
4041
]
4142

@@ -44,13 +45,18 @@
4445
autodoc_default_flags = ["members"]
4546
autosummary_generate = True
4647

48+
4749
# Add any paths that contain templates here, relative to this directory.
4850
templates_path = ["_templates"]
4951

52+
# Allow markdown includes (so releases.md can include CHANGLEOG.md)
53+
# http://www.sphinx-doc.org/en/master/markdown.html
54+
source_parsers = {".md": "recommonmark.parser.CommonMarkParser"}
55+
5056
# The suffix(es) of source filenames.
5157
# You can specify multiple suffix as a list of string:
5258
# source_suffix = ['.rst', '.md']
53-
source_suffix = ".rst"
59+
source_suffix = [".rst", ".md"]
5460

5561
# The encoding of source files.
5662
# source_encoding = 'utf-8-sig'
@@ -116,6 +122,7 @@
116122
# If true, `todo` and `todoList` produce output, else they produce nothing.
117123
todo_include_todos = True
118124

125+
119126
# -- Options for HTML output ----------------------------------------------
120127

121128
# The theme to use for HTML and HTML Help pages. See the documentation for
@@ -125,7 +132,15 @@
125132
# Theme options are theme-specific and customize the look and feel of a theme
126133
# further. For a list of options available for each theme, see the
127134
# documentation.
128-
# html_theme_options = {}
135+
html_theme_options = {
136+
"description": "Google Cloud Client Libraries for Python",
137+
"github_user": "googleapis",
138+
"github_repo": "google-cloud-python",
139+
"github_banner": True,
140+
"font_family": "'Roboto', Georgia, sans",
141+
"head_font_family": "'Roboto', Georgia, serif",
142+
"code_font_family": "'Roboto Mono', 'Consolas', monospace",
143+
}
129144

130145
# Add any paths that contain custom themes here, relative to this directory.
131146
# html_theme_path = []
@@ -214,6 +229,18 @@
214229
# Output file base name for HTML help builder.
215230
htmlhelp_basename = "google-cloud-bigtable-doc"
216231

232+
# -- Options for warnings ------------------------------------------------------
233+
234+
235+
suppress_warnings = [
236+
# Temporarily suppress this to avoid "more than one target found for
237+
# cross-reference" warning, which are intractable for us to avoid while in
238+
# a mono-repo.
239+
# See https://github.com/sphinx-doc/sphinx/blob
240+
# /2a65ffeef5c107c19084fabdd706cdff3f52d93c/sphinx/domains/python.py#L843
241+
"ref.python"
242+
]
243+
217244
# -- Options for LaTeX output ---------------------------------------------
218245

219246
latex_elements = {
@@ -260,6 +287,7 @@
260287
# If false, no module index is generated.
261288
# latex_domain_indices = True
262289

290+
263291
# -- Options for manual page output ---------------------------------------
264292

265293
# One entry per manual page. List of tuples
@@ -277,6 +305,7 @@
277305
# If true, show URL addresses after external links.
278306
# man_show_urls = False
279307

308+
280309
# -- Options for Texinfo output -------------------------------------------
281310

282311
# Grouping the document tree into Texinfo files. List of tuples
@@ -289,7 +318,7 @@
289318
u"google-cloud-bigtable Documentation",
290319
author,
291320
"google-cloud-bigtable",
292-
"GAPIC library for the {metadata.shortName} v2 service",
321+
"GAPIC library for Bigtable",
293322
"APIs",
294323
)
295324
]
@@ -306,12 +335,20 @@
306335
# If true, do not generate a @detailmenu in the "Top" node's menu.
307336
# texinfo_no_detailmenu = False
308337

338+
309339
# Example configuration for intersphinx: refer to the Python standard library.
310340
intersphinx_mapping = {
311341
"python": ("http://python.readthedocs.org/en/latest/", None),
312-
"gax": ("https://gax-python.readthedocs.org/en/latest/", None),
342+
"google-auth": ("https://google-auth.readthedocs.io/en/stable", None),
343+
"google.api_core": (
344+
"https://googleapis.github.io/google-cloud-python/latest",
345+
None,
346+
),
347+
"grpc": ("https://grpc.io/grpc/python/", None),
348+
"requests": ("http://docs.python-requests.org/en/master/", None),
313349
}
314350

351+
315352
# Napoleon settings
316353
napoleon_google_docstring = True
317354
napoleon_numpy_docstring = True

bigtable/docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. include:: /../bigtable/README.rst
1+
.. include:: README.rst
22

33

44
Using the API

bigtable/google/cloud/bigtable/row_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ def _read_next_response(self):
458458
return self.retry(self._read_next, on_error=self._on_error)()
459459

460460
def __iter__(self):
461-
"""Consume the ``ReadRowsResponse``s from the stream.
461+
"""Consume the ``ReadRowsResponse`` s from the stream.
462462
Read the rows and yield each to the reader
463463
464464
Parse the response and its chunks into a new/existing row in

bigtable/noxfile.py

Lines changed: 21 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

@@ -135,6 +136,26 @@ def cover(session):
135136

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

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

139160
@nox.session(python=['2.7', '3.7'])
140161
def snippets(session):

core/docs/config.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Authentication
4343
==============
4444

4545
The authentication credentials can be implicitly determined from the
46-
environment or directly. See `Authentication <https://googleapis.dev/python/google-api-core/latest/config.html#authentication>`_.
46+
environment or directly. See `Authentication <https://googleapis.dev/python/google-api-core/latest/auth.html#authentication>`_.
4747

4848
Logging in via ``gcloud beta auth application-default login`` will
4949
automatically configure a JSON key file with your default project ID and

dns/docs/README.rst

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

0 commit comments

Comments
 (0)