added a convenience target for generating all documentation based on existing google code example, fixed a few issues with doc strings

This commit is contained in:
Blake J. Harnden 2018-03-15 14:31:07 -07:00
parent 6d3470c95f
commit 188f9420ca
7 changed files with 38 additions and 21 deletions

View file

@ -168,3 +168,27 @@ change-files:
$(call change-files,gui/core-gui)
$(call change-files,scripts/core-daemon.service)
$(call change-files,daemon/core/constants.py)
CORE_DOC_HTML = core-html-$(PACKAGE_VERSION)
CORE_DOC_PDF = core-manual-$(PACKAGE_VERSION)
CORE_DOC_SRC = core-python-$(PACKAGE_VERSION)
.PHONY: doc
doc: doc-clean
$(MAKE) -C doc html
mv doc/_build/html doc/$(CORE_DOC_HTML)
tar -C doc -czf $(CORE_DOC_HTML).tgz $(CORE_DOC_HTML)
$(MAKE) -C doc latexpdf
mv doc/_build/latex/CORE.pdf $(CORE_DOC_PDF).pdf
$(MAKE) -C daemon/doc html
mv daemon/doc/_build/html daemon/doc/$(CORE_DOC_SRC)
tar -C daemon/doc -czf $(CORE_DOC_SRC).tgz $(CORE_DOC_SRC)
.PHONY: doc-clean
doc-clean:
-rm -rf doc/_build
-rm -rf doc/$(CORE_DOC_HTML)
-rm -rf daemon/doc/_build
-rm -rf daemon/doc/$(CORE_DOC_SRC)
-rm -f $(CORE_DOC_HTML).tgz
-rm -f $(CORE_DOC_SRC).tgz
-rm -f $(CORE_DOC_PDF).pdf

View file

@ -245,6 +245,8 @@ Daemon:
Python modules: ${pythondir}
Logs: ${CORE_STATE_DIR}/log
Startup: ${with_startup}
Features to build:
Build GUI: ${enable_gui}
Build Daemon: ${enable_daemon}

View file

@ -42,16 +42,7 @@ from core.xml.xmlsession import save_session_xml
class CoreRequestHandler(SocketServer.BaseRequestHandler):
"""
The SocketServer class uses the RequestHandler class for servicing
requests, mainly through the handle() method. The CoreRequestHandler
has the following basic flow:
1. Client connects and request comes in via handle().
2. handle() calls recvmsg() in a loop.
3. recvmsg() does a recv() call on the socket performs basic
checks that this we received a CoreMessage, returning it.
4. The message data is queued using queuemsg().
5. The handlerthread() thread pops messages from the queue and uses
handlemsg() to invoke the appropriate handler for that message type.
The SocketServer class uses the RequestHandler class for servicing requests.
"""
def __init__(self, request, client_address, server):

View file

@ -655,7 +655,7 @@ class PyCoreNetIf(object):
"""
Attach network.
:param core.coreobj.PyCoreNet net: network to attach to
:param core.coreobj.PyCoreNet net: network to attach
:return: nothing
"""
if self.net:

View file

@ -30,13 +30,13 @@ class SimpleLxcNode(PyCoreNode):
"""
Provides simple lxc functionality for core nodes.
:type nodedir: str
:type ctrlchnlname: str
:type client: core.netns.vnodeclient.VnodeClient
:type pid: int
:type up: bool
:type lock: threading.RLock
:type _mounts: list[tuple[str, str]]
:var nodedir: str
:var ctrlchnlname: str
:var client: core.netns.vnodeclient.VnodeClient
:var pid: int
:var up: bool
:var lock: threading.RLock
:var _mounts: list[tuple[str, str]]
"""
valid_address_types = {"inet", "inet6", "inet6link"}

View file

@ -23,7 +23,7 @@ index.rst:
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXOPTS = -q
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build

View file

@ -26,7 +26,7 @@ EXTRA_DIST = $(rst_files)
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXOPTS = -q
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build