Skip to content

Commit

Permalink
added a convenience target for generating all documentation based on …
Browse files Browse the repository at this point in the history
…existing google code example, fixed a few issues with doc strings
  • Loading branch information
bharnden committed Mar 15, 2018
1 parent 6d3470c commit 188f942
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 21 deletions.
24 changes: 24 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
11 changes: 1 addition & 10 deletions daemon/core/corehandlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,7 @@

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):
Expand Down
4 changes: 2 additions & 2 deletions daemon/core/coreobj.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,8 @@ def attachnet(self, net):
"""
Attach network.
:param core.coreobj.PyCoreNet net: network to attach to
:return:nothing
:param core.coreobj.PyCoreNet net: network to attach
:return: nothing
"""
if self.net:
self.detachnet()
Expand Down
14 changes: 7 additions & 7 deletions daemon/core/netns/vnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}

Expand Down
2 changes: 1 addition & 1 deletion daemon/doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ index.rst:
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXOPTS = -q
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
Expand Down
2 changes: 1 addition & 1 deletion doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 188f942

Please sign in to comment.