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,gui/core-gui)
$(call change-files,scripts/core-daemon.service) $(call change-files,scripts/core-daemon.service)
$(call change-files,daemon/core/constants.py) $(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} Python modules: ${pythondir}
Logs: ${CORE_STATE_DIR}/log Logs: ${CORE_STATE_DIR}/log
Startup: ${with_startup}
Features to build: Features to build:
Build GUI: ${enable_gui} Build GUI: ${enable_gui}
Build Daemon: ${enable_daemon} Build Daemon: ${enable_daemon}

View file

@ -42,16 +42,7 @@ from core.xml.xmlsession import save_session_xml
class CoreRequestHandler(SocketServer.BaseRequestHandler): class CoreRequestHandler(SocketServer.BaseRequestHandler):
""" """
The SocketServer class uses the RequestHandler class for servicing The SocketServer class uses the RequestHandler class for servicing requests.
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.
""" """
def __init__(self, request, client_address, server): def __init__(self, request, client_address, server):

View file

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

View file

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

View file

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

View file

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