[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC qemu.qmp PATCH 18/24] add Sphinx documentation config stub
From: |
John Snow |
Subject: |
[RFC qemu.qmp PATCH 18/24] add Sphinx documentation config stub |
Date: |
Wed, 15 Dec 2021 16:06:28 -0500 |
This is the result of this command:
sphinx-apidoc --separate \
--no-toc \
--module-first \
--implicit-namespaces \
--full \
--ext-intersphinx \
--ext-coverage \
--ext-viewcode \
-o docs/ \
qemu/
(And `touch docs/_static/.gitignore`, to create an "empty" directory.)
This configuration is not yet functional, but I wanted to distinguish
between automatically generated boilerplate and intentional
configuration changes so as to document the entire process of getting
sphinx doc generation up, running, and fully configured.
Signed-off-by: John Snow <jsnow@redhat.com>
---
docs/Makefile | 20 +++++++++
docs/conf.py | 80 ++++++++++++++++++++++++++++++++++++
docs/index.rst | 21 ++++++++++
docs/make.bat | 35 ++++++++++++++++
docs/qemu.qmp.aqmp_tui.rst | 7 ++++
docs/qemu.qmp.error.rst | 7 ++++
docs/qemu.qmp.events.rst | 7 ++++
docs/qemu.qmp.legacy.rst | 7 ++++
docs/qemu.qmp.message.rst | 7 ++++
docs/qemu.qmp.models.rst | 7 ++++
docs/qemu.qmp.protocol.rst | 7 ++++
docs/qemu.qmp.qmp_client.rst | 7 ++++
docs/qemu.qmp.qmp_shell.rst | 7 ++++
docs/qemu.qmp.rst | 24 +++++++++++
docs/qemu.qmp.util.rst | 7 ++++
docs/qemu.rst | 10 +++++
16 files changed, 260 insertions(+)
create mode 100644 docs/Makefile
create mode 100644 docs/conf.py
create mode 100644 docs/index.rst
create mode 100644 docs/make.bat
create mode 100644 docs/qemu.qmp.aqmp_tui.rst
create mode 100644 docs/qemu.qmp.error.rst
create mode 100644 docs/qemu.qmp.events.rst
create mode 100644 docs/qemu.qmp.legacy.rst
create mode 100644 docs/qemu.qmp.message.rst
create mode 100644 docs/qemu.qmp.models.rst
create mode 100644 docs/qemu.qmp.protocol.rst
create mode 100644 docs/qemu.qmp.qmp_client.rst
create mode 100644 docs/qemu.qmp.qmp_shell.rst
create mode 100644 docs/qemu.qmp.rst
create mode 100644 docs/qemu.qmp.util.rst
create mode 100644 docs/qemu.rst
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 0000000..d4bb2cb
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,20 @@
+# Minimal makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line, and also
+# from the environment for the first two.
+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)
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644
index 0000000..c7ce779
--- /dev/null
+++ b/docs/conf.py
@@ -0,0 +1,80 @@
+# Configuration file for the Sphinx documentation builder.
+#
+# This file only contains a selection of the most common options. For a full
+# list see the documentation:
+# https://www.sphinx-doc.org/en/master/usage/configuration.html
+
+# -- 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, '/home/jsnow/src/tmp/qemu.qmp/qemu')
+
+
+# -- Project information -----------------------------------------------------
+
+project = 'qemu'
+copyright = '2021, Author'
+author = 'Author'
+
+
+# -- General configuration ---------------------------------------------------
+
+# 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.autodoc',
+ 'sphinx.ext.viewcode',
+ 'sphinx.ext.todo',
+ 'sphinx.ext.intersphinx',
+ 'sphinx.ext.coverage',
+ 'sphinx.ext.viewcode',
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# 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 = 'en'
+
+# 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 = ['_build', 'Thumbs.db', '.DS_Store']
+
+
+# -- 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'
+
+# 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']
+
+
+# -- Extension configuration -------------------------------------------------
+
+# -- Options for intersphinx extension ---------------------------------------
+
+# Example configuration for intersphinx: refer to the Python standard library.
+intersphinx_mapping = {
+ 'python': ('https://docs.python.org/3', None),
+}
+
+# -- Options for todo extension ----------------------------------------------
+
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = True
\ No newline at end of file
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644
index 0000000..bff786a
--- /dev/null
+++ b/docs/index.rst
@@ -0,0 +1,21 @@
+.. qemu documentation master file, created by
+ sphinx-quickstart on Mon Dec 13 16:50:29 2021.
+ You can adapt this file completely to your liking, but it should at least
+ contain the root `toctree` directive.
+
+Welcome to qemu's documentation!
+================================
+
+.. toctree::
+ :maxdepth: 4
+ :caption: Contents:
+
+ qemu
+
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/docs/make.bat b/docs/make.bat
new file mode 100644
index 0000000..2119f51
--- /dev/null
+++ b/docs/make.bat
@@ -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% %O%
+goto end
+
+:help
+%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+
+:end
+popd
diff --git a/docs/qemu.qmp.aqmp_tui.rst b/docs/qemu.qmp.aqmp_tui.rst
new file mode 100644
index 0000000..a5c55f9
--- /dev/null
+++ b/docs/qemu.qmp.aqmp_tui.rst
@@ -0,0 +1,7 @@
+qemu.qmp.aqmp\_tui module
+=========================
+
+.. automodule:: qemu.qmp.aqmp_tui
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/qemu.qmp.error.rst b/docs/qemu.qmp.error.rst
new file mode 100644
index 0000000..89f069d
--- /dev/null
+++ b/docs/qemu.qmp.error.rst
@@ -0,0 +1,7 @@
+qemu.qmp.error module
+=====================
+
+.. automodule:: qemu.qmp.error
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/qemu.qmp.events.rst b/docs/qemu.qmp.events.rst
new file mode 100644
index 0000000..a4b9fd3
--- /dev/null
+++ b/docs/qemu.qmp.events.rst
@@ -0,0 +1,7 @@
+qemu.qmp.events module
+======================
+
+.. automodule:: qemu.qmp.events
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/qemu.qmp.legacy.rst b/docs/qemu.qmp.legacy.rst
new file mode 100644
index 0000000..83abd38
--- /dev/null
+++ b/docs/qemu.qmp.legacy.rst
@@ -0,0 +1,7 @@
+qemu.qmp.legacy module
+======================
+
+.. automodule:: qemu.qmp.legacy
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/qemu.qmp.message.rst b/docs/qemu.qmp.message.rst
new file mode 100644
index 0000000..765ae63
--- /dev/null
+++ b/docs/qemu.qmp.message.rst
@@ -0,0 +1,7 @@
+qemu.qmp.message module
+=======================
+
+.. automodule:: qemu.qmp.message
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/qemu.qmp.models.rst b/docs/qemu.qmp.models.rst
new file mode 100644
index 0000000..55585b7
--- /dev/null
+++ b/docs/qemu.qmp.models.rst
@@ -0,0 +1,7 @@
+qemu.qmp.models module
+======================
+
+.. automodule:: qemu.qmp.models
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/qemu.qmp.protocol.rst b/docs/qemu.qmp.protocol.rst
new file mode 100644
index 0000000..fca55ad
--- /dev/null
+++ b/docs/qemu.qmp.protocol.rst
@@ -0,0 +1,7 @@
+qemu.qmp.protocol module
+========================
+
+.. automodule:: qemu.qmp.protocol
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/qemu.qmp.qmp_client.rst b/docs/qemu.qmp.qmp_client.rst
new file mode 100644
index 0000000..1d5beda
--- /dev/null
+++ b/docs/qemu.qmp.qmp_client.rst
@@ -0,0 +1,7 @@
+qemu.qmp.qmp\_client module
+===========================
+
+.. automodule:: qemu.qmp.qmp_client
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/qemu.qmp.qmp_shell.rst b/docs/qemu.qmp.qmp_shell.rst
new file mode 100644
index 0000000..0510cd3
--- /dev/null
+++ b/docs/qemu.qmp.qmp_shell.rst
@@ -0,0 +1,7 @@
+qemu.qmp.qmp\_shell module
+==========================
+
+.. automodule:: qemu.qmp.qmp_shell
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/qemu.qmp.rst b/docs/qemu.qmp.rst
new file mode 100644
index 0000000..305e5b0
--- /dev/null
+++ b/docs/qemu.qmp.rst
@@ -0,0 +1,24 @@
+qemu.qmp package
+================
+
+.. automodule:: qemu.qmp
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+Submodules
+----------
+
+.. toctree::
+ :maxdepth: 4
+
+ qemu.qmp.aqmp_tui
+ qemu.qmp.error
+ qemu.qmp.events
+ qemu.qmp.legacy
+ qemu.qmp.message
+ qemu.qmp.models
+ qemu.qmp.protocol
+ qemu.qmp.qmp_client
+ qemu.qmp.qmp_shell
+ qemu.qmp.util
diff --git a/docs/qemu.qmp.util.rst b/docs/qemu.qmp.util.rst
new file mode 100644
index 0000000..8f2ac87
--- /dev/null
+++ b/docs/qemu.qmp.util.rst
@@ -0,0 +1,7 @@
+qemu.qmp.util module
+====================
+
+.. automodule:: qemu.qmp.util
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/qemu.rst b/docs/qemu.rst
new file mode 100644
index 0000000..f33a4f4
--- /dev/null
+++ b/docs/qemu.rst
@@ -0,0 +1,10 @@
+qemu namespace
+==============
+
+Subpackages
+-----------
+
+.. toctree::
+ :maxdepth: 4
+
+ qemu.qmp
--
2.31.1
- [RFC qemu.qmp PATCH 12/24] GitLab CI: Add check-dco script, (continued)
- [RFC qemu.qmp PATCH 12/24] GitLab CI: Add check-dco script, John Snow, 2021/12/15
- [RFC qemu.qmp PATCH 13/24] GitLab CI: Add pipenv and tox tests, John Snow, 2021/12/15
- [RFC qemu.qmp PATCH 14/24] GitLab CI: Add avocado junit XML output to tests, John Snow, 2021/12/15
- [RFC qemu.qmp PATCH 15/24] GitLab CI: Publish python packages to GitLab package repo, John Snow, 2021/12/15
- [RFC qemu.qmp PATCH 17/24] Makefile: add build and publish targets, John Snow, 2021/12/15
- [RFC qemu.qmp PATCH 19/24] python: configure sphinx, John Snow, 2021/12/15
- [RFC qemu.qmp PATCH 20/24] python: adjust apidoc stubs, John Snow, 2021/12/15
- [RFC qemu.qmp PATCH 18/24] add Sphinx documentation config stub,
John Snow <=
- [RFC qemu.qmp PATCH 23/24] docs: add doc build to GitLab CI build step, John Snow, 2021/12/15
- [RFC qemu.qmp PATCH 21/24] Fix doc cross-reference regressions, John Snow, 2021/12/15
- [RFC qemu.qmp PATCH 16/24] Add setuptools_scm package versioning, John Snow, 2021/12/15
- [RFC qemu.qmp PATCH 22/24] docs: add Makefile target, John Snow, 2021/12/15
- [RFC qemu.qmp PATCH 24/24] v0.0.1, John Snow, 2021/12/15
- Re: [RFC qemu.qmp PATCH 00/24] Python: Fork qemu.qmp Python lib into independent repo, Daniel P . Berrangé, 2021/12/16