python: add sphinx docs (#6525)
* python: generate documentation with Sphinx and Read the Docs Background: Formerly, the Python protobuf reference documentation was built with [Epydoc](http://epydoc.sourceforge.net/). This package has not been updated since 2008, and it has inconsistent formatting (see internal issue 131415575) with most Python documentation. Sphinx is used for the official docs.python.org docs as well as most other Python packages, including the Google client libraries and related packages, such as https://googleapis.dev/python/google-api-core/latest/ To build the docs with Sphinx: 1. Install the needed packages (`sphinx`, `sphinxcontrib-napoleon` for Google-style docstring support). I've created a conda environment file to make this easier: ``` conda env create -f python/docs/environment.yml ``` 2. (Optional) Generate reference docs files and regenerate index: ``` cd python python generate_docs.py cd .. ``` 3. Run Sphinx. ``` cd python/docs make html ``` About this change: The script at `python/generate_docs.py` creates a ReStructured Text file for each public module in the protobuf Python package. The script also updates the table of contents in `python/docs/index.rst` to point to these module references. Future work: Testing the docs build on PRs requires contributors to actually do some setup work to configure builds on their fork. It'd be better if CI had a docs build session to verify that the Sphinx docs generation at least runs. There are many warnings due to not-quite-correct docstrings in the actual Python code itself. I'm choosing to ignore these errors to keep the PR small, but I recommend you fix these and then enable "fail on warnings" in the docs build on CI. * add docs to EXTRA_DIST * add instructions to build documentation to generate_docs.py * exclude python/odcs from cpp_distcheckpull/7154/head
parent
1a74ba4cb4
commit
29c83baecc
32 changed files with 728 additions and 1 deletions
@ -0,0 +1,19 @@ |
||||
# Minimal makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = sphinx-build
|
||||
SOURCEDIR = .
|
||||
BUILDDIR = _build
|
||||
|
||||
# Put it first so that "make" without argument is like "make help".
|
||||
help: |
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
.PHONY: help Makefile |
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile |
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@ -0,0 +1,239 @@ |
||||
# -*- coding: utf-8 -*- |
||||
# Protocol Buffers - Google's data interchange format |
||||
# Copyright 2019 Google LLC. All rights reserved. |
||||
# https://developers.google.com/protocol-buffers/ |
||||
# |
||||
# Redistribution and use in source and binary forms, with or without |
||||
# modification, are permitted provided that the following conditions are |
||||
# met: |
||||
# |
||||
# * Redistributions of source code must retain the above copyright |
||||
# notice, this list of conditions and the following disclaimer. |
||||
# * Redistributions in binary form must reproduce the above |
||||
# copyright notice, this list of conditions and the following disclaimer |
||||
# in the documentation and/or other materials provided with the |
||||
# distribution. |
||||
# * Neither the name of Google Inc. nor the names of its |
||||
# contributors may be used to endorse or promote products derived from |
||||
# this software without specific prior written permission. |
||||
# |
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
|
||||
# Configuration file for the Sphinx documentation builder. |
||||
# |
||||
# This file does only contain a selection of the most common options. For a |
||||
# full list see the documentation: |
||||
# http://www.sphinx-doc.org/en/master/config |
||||
|
||||
# -- Path setup -------------------------------------------------------------- |
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory, |
||||
# add these directories to sys.path here. If the directory is relative to the |
||||
# documentation root, use os.path.abspath to make it absolute, like shown here. |
||||
# |
||||
# import os |
||||
# import sys |
||||
# sys.path.insert(0, os.path.abspath('.')) |
||||
import google.protobuf |
||||
|
||||
# -- Project information ----------------------------------------------------- |
||||
|
||||
project = u"Protocol Buffers" |
||||
copyright = u"2008, Google LLC" |
||||
author = u"Google LLC" |
||||
|
||||
# The short X.Y version |
||||
version = u"" |
||||
# The full version, including alpha/beta/rc tags |
||||
release = google.protobuf.__version__ |
||||
|
||||
|
||||
# -- General configuration --------------------------------------------------- |
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here. |
||||
# |
||||
# needs_sphinx = '1.0' |
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be |
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
||||
# ones. |
||||
extensions = [ |
||||
"sphinx.ext.autosummary", |
||||
"sphinx.ext.intersphinx", |
||||
"sphinxcontrib.napoleon", |
||||
] |
||||
|
||||
# Add any paths that contain templates here, relative to this directory. |
||||
templates_path = ["_templates"] |
||||
|
||||
# The suffix(es) of source filenames. |
||||
# You can specify multiple suffix as a list of string: |
||||
# |
||||
# source_suffix = ['.rst', '.md'] |
||||
source_suffix = ".rst" |
||||
|
||||
# The master toctree document. |
||||
master_doc = "index" |
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation |
||||
# for a list of supported languages. |
||||
# |
||||
# This is also used if you do content translation via gettext catalogs. |
||||
# Usually you set "language" from the command line for these cases. |
||||
language = None |
||||
|
||||
# List of patterns, relative to source directory, that match files and |
||||
# directories to ignore when looking for source files. |
||||
# This pattern also affects html_static_path and html_extra_path. |
||||
exclude_patterns = [u"_build", "Thumbs.db", ".DS_Store"] |
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use. |
||||
pygments_style = None |
||||
|
||||
|
||||
# -- Options for HTML output ------------------------------------------------- |
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for |
||||
# a list of builtin themes. |
||||
# |
||||
html_theme = "alabaster" |
||||
|
||||
# Remove JavaScript. |
||||
html_js_files = [] |
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme |
||||
# further. For a list of options available for each theme, see the |
||||
# documentation. |
||||
# |
||||
# html_theme_options = {} |
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here, |
||||
# relative to this directory. They are copied after the builtin static files, |
||||
# so a file named "default.css" will overwrite the builtin "default.css". |
||||
html_static_path = ["_static"] |
||||
|
||||
html_show_sourcelink = True |
||||
|
||||
# Custom sidebar templates, must be a dictionary that maps document names |
||||
# to template names. |
||||
# |
||||
# The default sidebars (for documents that don't match any pattern) are |
||||
# defined by theme itself. Builtin themes are using these templates by |
||||
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', |
||||
# 'searchbox.html']``. |
||||
|
||||
# Remove searchbox.html to avoid embedded JavaScript. |
||||
html_sidebars = { |
||||
"**": [ |
||||
"globaltoc.html", "localtoc.html", "relations.html", "sourcelink.html", |
||||
], |
||||
} |
||||
|
||||
|
||||
# -- Options for HTMLHelp output --------------------------------------------- |
||||
|
||||
# Output file base name for HTML help builder. |
||||
htmlhelp_basename = "ProtocolBuffersdoc" |
||||
|
||||
|
||||
# -- Options for LaTeX output ------------------------------------------------ |
||||
|
||||
latex_elements = { |
||||
# The paper size ('letterpaper' or 'a4paper'). |
||||
# |
||||
# 'papersize': 'letterpaper', |
||||
# The font size ('10pt', '11pt' or '12pt'). |
||||
# |
||||
# 'pointsize': '10pt', |
||||
# Additional stuff for the LaTeX preamble. |
||||
# |
||||
# 'preamble': '', |
||||
# Latex figure (float) alignment |
||||
# |
||||
# 'figure_align': 'htbp', |
||||
} |
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples |
||||
# (source start file, target name, title, |
||||
# author, documentclass [howto, manual, or own class]). |
||||
latex_documents = [ |
||||
( |
||||
master_doc, |
||||
"ProtocolBuffers.tex", |
||||
"Protocol Buffers Documentation", |
||||
"Google LLC", |
||||
"manual", |
||||
) |
||||
] |
||||
|
||||
|
||||
# -- Options for manual page output ------------------------------------------ |
||||
|
||||
# One entry per manual page. List of tuples |
||||
# (source start file, name, description, authors, manual section). |
||||
man_pages = [ |
||||
( |
||||
master_doc, # source start file |
||||
"protocolbuffers", # name |
||||
"Protocol Buffers Documentation", # description |
||||
[author], # authors |
||||
1, # manual section |
||||
) |
||||
] |
||||
|
||||
|
||||
# -- Options for Texinfo output ---------------------------------------------- |
||||
|
||||
# Grouping the document tree into Texinfo files. List of tuples |
||||
# (source start file, target name, title, author, |
||||
# dir menu entry, description, category) |
||||
texinfo_documents = [ |
||||
( |
||||
master_doc, |
||||
"ProtocolBuffers", |
||||
u"Protocol Buffers Documentation", |
||||
author, |
||||
"ProtocolBuffers", |
||||
"One line description of project.", |
||||
"Miscellaneous", |
||||
) |
||||
] |
||||
|
||||
|
||||
# -- Options for Epub output ------------------------------------------------- |
||||
|
||||
# Bibliographic Dublin Core info. |
||||
epub_title = project |
||||
|
||||
# The unique identifier of the text. This can be a ISBN number |
||||
# or the project homepage. |
||||
# |
||||
# epub_identifier = '' |
||||
|
||||
# A unique identification for the text. |
||||
# |
||||
# epub_uid = '' |
||||
|
||||
# A list of files that should not be packed into the epub file. |
||||
epub_exclude_files = ["search.html"] |
||||
|
||||
|
||||
# -- Extension configuration ------------------------------------------------- |
||||
|
||||
# -- Options for autosummary extension --------------------------------------- |
||||
autosummary_generate = True |
||||
|
||||
# -- Options for intersphinx extension --------------------------------------- |
||||
|
||||
# Example configuration for intersphinx: refer to the Python standard library. |
||||
intersphinx_mapping = {"https://docs.python.org/": None} |
@ -0,0 +1,12 @@ |
||||
name: protobuf |
||||
channels: |
||||
- conda-forge |
||||
- defaults |
||||
dependencies: |
||||
- libprotobuf=3.11.2 |
||||
- make=4.2.1 |
||||
- pip=19.3.1 |
||||
- python=3.7.6 |
||||
- sphinx=2.3.1 |
||||
- sphinx_rtd_theme=0.4.3 |
||||
- sphinxcontrib-napoleon=0.7 |
@ -0,0 +1,161 @@ |
||||
#!/usr/bin/env python |
||||
# Protocol Buffers - Google's data interchange format |
||||
# Copyright 2008 Google Inc. All rights reserved. |
||||
# https://developers.google.com/protocol-buffers/ |
||||
# |
||||
# Redistribution and use in source and binary forms, with or without |
||||
# modification, are permitted provided that the following conditions are |
||||
# met: |
||||
# |
||||
# * Redistributions of source code must retain the above copyright |
||||
# notice, this list of conditions and the following disclaimer. |
||||
# * Redistributions in binary form must reproduce the above |
||||
# copyright notice, this list of conditions and the following disclaimer |
||||
# in the documentation and/or other materials provided with the |
||||
# distribution. |
||||
# * Neither the name of Google Inc. nor the names of its |
||||
# contributors may be used to endorse or promote products derived from |
||||
# this software without specific prior written permission. |
||||
# |
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
|
||||
"""Script to generate a list of all modules to use in autosummary. |
||||
|
||||
This script creates a ReStructured Text file for each public module in the |
||||
protobuf Python package. The script also updates the table of contents in |
||||
``docs/index.rst`` to point to these module references. |
||||
|
||||
To build the docs with Sphinx: |
||||
|
||||
1. Install the needed packages (``sphinx``, ``sphinxcontrib-napoleon`` for |
||||
Google-style docstring support). I've created a conda environment file to |
||||
make this easier: |
||||
|
||||
.. code:: bash |
||||
|
||||
conda env create -f python/docs/environment.yml |
||||
|
||||
2. (Optional) Generate reference docs files and regenerate index: |
||||
|
||||
.. code:: bash |
||||
|
||||
cd python/docs |
||||
python generate_docs.py |
||||
|
||||
3. Run Sphinx. |
||||
|
||||
.. code:: bash |
||||
|
||||
make html |
||||
""" |
||||
|
||||
import pathlib |
||||
import re |
||||
|
||||
|
||||
DOCS_DIR = pathlib.Path(__file__).parent.resolve() |
||||
PYTHON_DIR = DOCS_DIR.parent |
||||
SOURCE_DIR = PYTHON_DIR / "google" / "protobuf" |
||||
SOURCE_POSIX = SOURCE_DIR.as_posix() |
||||
IGNORED_PACKAGES = ( |
||||
"compiler", |
||||
"internal", |
||||
"pyext", |
||||
"util", |
||||
) |
||||
IGNORED_MODULES = ( |
||||
"any_test_pb2", |
||||
"api_pb2", |
||||
"unittest", |
||||
"source_context_pb2", |
||||
"test_messages_proto3_pb2", |
||||
"test_messages_proto2", |
||||
) |
||||
TOC_REGEX = re.compile( |
||||
r"\.\. START REFTOC.*\.\. END REFTOC\.\n", |
||||
flags=re.DOTALL, |
||||
) |
||||
TOC_TEMPLATE = """.. START REFTOC, generated by generate_docs.py. |
||||
.. toctree:: |
||||
|
||||
{toctree} |
||||
|
||||
.. END REFTOC. |
||||
""" |
||||
|
||||
AUTOMODULE_TEMPLATE = """.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
{module} |
||||
{underline} |
||||
|
||||
.. automodule:: {module} |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
||||
""" |
||||
|
||||
|
||||
def find_modules(): |
||||
modules = [] |
||||
for module_path in SOURCE_DIR.glob("**/*.py"): |
||||
package_posix = module_path.parent.as_posix() |
||||
if any(ignored in package_posix for ignored in IGNORED_PACKAGES): |
||||
continue |
||||
if any(ignored in module_path.stem for ignored in IGNORED_MODULES): |
||||
continue |
||||
|
||||
package_name = "google.protobuf{}".format( |
||||
package_posix[len(SOURCE_POSIX) :].replace("/", ".") |
||||
) |
||||
if module_path.name == "__init__.py": |
||||
modules.append(package_name) |
||||
else: |
||||
module_name = module_path.stem |
||||
modules.append("{}.{}".format(package_name, module_name)) |
||||
|
||||
return modules |
||||
|
||||
|
||||
def write_automodule(module): |
||||
contents = AUTOMODULE_TEMPLATE.format(module=module, underline="=" * len(module),) |
||||
automodule_path = DOCS_DIR.joinpath(*module.split(".")).with_suffix(".rst") |
||||
try: |
||||
automodule_path.parent.mkdir(parents=True) |
||||
except FileExistsError: |
||||
pass |
||||
with open(automodule_path, "w") as automodule_file: |
||||
automodule_file.write(contents) |
||||
|
||||
|
||||
def replace_toc(modules): |
||||
toctree = [module.replace(".", "/") for module in modules] |
||||
with open(DOCS_DIR / "index.rst", "r") as index_file: |
||||
index_contents = index_file.read() |
||||
toc = TOC_TEMPLATE.format( |
||||
toctree="\n ".join(toctree) |
||||
) |
||||
index_contents = re.sub(TOC_REGEX, toc, index_contents) |
||||
with open(DOCS_DIR / "index.rst", "w") as index_file: |
||||
index_file.write(index_contents) |
||||
|
||||
|
||||
def main(): |
||||
modules = list(sorted(find_modules())) |
||||
for module in modules: |
||||
print("Generating reference for {}".format(module)) |
||||
write_automodule(module) |
||||
print("Generating index.rst") |
||||
replace_toc(modules) |
||||
|
||||
if __name__ == "__main__": |
||||
main() |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf |
||||
=============== |
||||
|
||||
.. automodule:: google.protobuf |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.any_pb2 |
||||
======================= |
||||
|
||||
.. automodule:: google.protobuf.any_pb2 |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.descriptor |
||||
========================== |
||||
|
||||
.. automodule:: google.protobuf.descriptor |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.descriptor_database |
||||
=================================== |
||||
|
||||
.. automodule:: google.protobuf.descriptor_database |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.descriptor_pb2 |
||||
============================== |
||||
|
||||
.. automodule:: google.protobuf.descriptor_pb2 |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.descriptor_pool |
||||
=============================== |
||||
|
||||
.. automodule:: google.protobuf.descriptor_pool |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.duration_pb2 |
||||
============================ |
||||
|
||||
.. automodule:: google.protobuf.duration_pb2 |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.empty_pb2 |
||||
========================= |
||||
|
||||
.. automodule:: google.protobuf.empty_pb2 |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.field_mask_pb2 |
||||
============================== |
||||
|
||||
.. automodule:: google.protobuf.field_mask_pb2 |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.json_format |
||||
=========================== |
||||
|
||||
.. automodule:: google.protobuf.json_format |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.message |
||||
======================= |
||||
|
||||
.. automodule:: google.protobuf.message |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.message_factory |
||||
=============================== |
||||
|
||||
.. automodule:: google.protobuf.message_factory |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.proto_builder |
||||
============================= |
||||
|
||||
.. automodule:: google.protobuf.proto_builder |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.reflection |
||||
========================== |
||||
|
||||
.. automodule:: google.protobuf.reflection |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.service |
||||
======================= |
||||
|
||||
.. automodule:: google.protobuf.service |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.service_reflection |
||||
================================== |
||||
|
||||
.. automodule:: google.protobuf.service_reflection |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.struct_pb2 |
||||
========================== |
||||
|
||||
.. automodule:: google.protobuf.struct_pb2 |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.symbol_database |
||||
=============================== |
||||
|
||||
.. automodule:: google.protobuf.symbol_database |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.text_encoding |
||||
============================= |
||||
|
||||
.. automodule:: google.protobuf.text_encoding |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.text_format |
||||
=========================== |
||||
|
||||
.. automodule:: google.protobuf.text_format |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.timestamp_pb2 |
||||
============================= |
||||
|
||||
.. automodule:: google.protobuf.timestamp_pb2 |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.type_pb2 |
||||
======================== |
||||
|
||||
.. automodule:: google.protobuf.type_pb2 |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,9 @@ |
||||
.. DO NOT EDIT, generated by generate_docs.py. |
||||
|
||||
google.protobuf.wrappers_pb2 |
||||
============================ |
||||
|
||||
.. automodule:: google.protobuf.wrappers_pb2 |
||||
:members: |
||||
:inherited-members: |
||||
:undoc-members: |
@ -0,0 +1,50 @@ |
||||
.. Protocol Buffers documentation master file, created by |
||||
sphinx-quickstart on Thu Aug 15 13:56:43 2019. |
||||
You can adapt this file completely to your liking, but it should at least |
||||
contain the root `toctree` directive. |
||||
|
||||
Protocol Buffers Python API Reference |
||||
===================================== |
||||
|
||||
The complete documentation for Protocol Buffers is available via the web at: |
||||
|
||||
https://developers.google.com/protocol-buffers/ |
||||
|
||||
|
||||
Modules and Packages |
||||
-------------------- |
||||
|
||||
.. START REFTOC, generated by generate_docs.py. |
||||
.. toctree:: |
||||
|
||||
google/protobuf |
||||
google/protobuf/any_pb2 |
||||
google/protobuf/descriptor |
||||
google/protobuf/descriptor_database |
||||
google/protobuf/descriptor_pb2 |
||||
google/protobuf/descriptor_pool |
||||
google/protobuf/duration_pb2 |
||||
google/protobuf/empty_pb2 |
||||
google/protobuf/field_mask_pb2 |
||||
google/protobuf/json_format |
||||
google/protobuf/message |
||||
google/protobuf/message_factory |
||||
google/protobuf/proto_builder |
||||
google/protobuf/reflection |
||||
google/protobuf/service |
||||
google/protobuf/service_reflection |
||||
google/protobuf/struct_pb2 |
||||
google/protobuf/symbol_database |
||||
google/protobuf/text_encoding |
||||
google/protobuf/text_format |
||||
google/protobuf/timestamp_pb2 |
||||
google/protobuf/type_pb2 |
||||
google/protobuf/wrappers_pb2 |
||||
|
||||
.. END REFTOC. |
||||
|
||||
Indices and tables |
||||
------------------ |
||||
|
||||
* :ref:`genindex` |
||||
* :ref:`modindex` |
@ -0,0 +1,35 @@ |
||||
@ECHO OFF |
||||
|
||||
pushd %~dp0 |
||||
|
||||
REM Command file for Sphinx documentation |
||||
|
||||
if "%SPHINXBUILD%" == "" ( |
||||
set SPHINXBUILD=sphinx-build |
||||
) |
||||
set SOURCEDIR=. |
||||
set BUILDDIR=_build |
||||
|
||||
if "%1" == "" goto help |
||||
|
||||
%SPHINXBUILD% >NUL 2>NUL |
||||
if errorlevel 9009 ( |
||||
echo. |
||||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx |
||||
echo.installed, then set the SPHINXBUILD environment variable to point |
||||
echo.to the full path of the 'sphinx-build' executable. Alternatively you |
||||
echo.may add the Sphinx directory to PATH. |
||||
echo. |
||||
echo.If you don't have Sphinx installed, grab it from |
||||
echo.http://sphinx-doc.org/ |
||||
exit /b 1 |
||||
) |
||||
|
||||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% |
||||
goto end |
||||
|
||||
:help |
||||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% |
||||
|
||||
:end |
||||
popd |
@ -0,0 +1,3 @@ |
||||
sphinx==2.3.1 |
||||
sphinx_rtd_theme==0.4.3 |
||||
sphinxcontrib-napoleon==0.7 |
Loading…
Reference in new issue