Skip to content

Commit

Permalink
Merge pull request #73 from mookerji/doc-readme-py
Browse files Browse the repository at this point in the history
Instructions for and updates to Sphinx docs.
  • Loading branch information
mfine committed Apr 8, 2015
2 parents 0830052 + 9e7b7d3 commit 24006ab
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 18 deletions.
12 changes: 12 additions & 0 deletions python/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Building the Python Documentation

This directory contains Sphinx configuration files for building the
libsbp Python documentation.

```shell
# Install Sphinx requirements
sudo pip install -r requirements.txt

# Build HTML documentation autogenerated from source
make html
```
2 changes: 2 additions & 0 deletions python/docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sphinx
numpydoc
12 changes: 3 additions & 9 deletions python/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,13 @@
# 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.
#sys.path.insert(0, os.path.abspath('.'))

sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('..'))

sys.path.append(os.path.abspath('.'))
sys.path.append(os.path.abspath('..'))
sys.path.append(os.path.abspath('../../sbp'))

#sys.path.insert(0, '/Users/mookerji/Dropbox/Documents/swift/clones/libsbp/python/sbp')


import pprint
pprint.pprint(sys.path)

Expand Down Expand Up @@ -75,9 +70,9 @@
# built documents.
#
# The short X.Y version.
version = '0.24'
version = '0.27'
# The full version, including alpha/beta/rc tags.
release = '0.24'
release = '0.27'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -303,6 +298,5 @@
intersphinx_mapping = {'https://docs.python.org/': None}

from sphinx.apidoc import main
main(['--force', '-o', '.', '../../sbp'])

main(['--force', '--separate', '-o', '.', '../../sbp'])
doctest_global_setup = "import sbp"
29 changes: 21 additions & 8 deletions python/docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
SBP Bindings for Python
==============================================

Python client for Swift Binary Protocol (SBP). The Swift Navigation
Binary Protocol (SBP) is a fast, simple, and minimal binary protocol
for communicating with Swift devices. It is the native binary protocol
used by the Piksi GPS receiver to transmit solutions, observations,
status and debugging messages, as well as receive messages from the
host operating system, such as differential corrections and the
almanac.
Python client for Swift Binary Protocol (SBP). SBP is a fast, simple,
and minimal binary protocol for communicating with Swift devices. It
is the native binary protocol used by the Piksi GPS receiver to
transmit solutions, observations, status and debugging messages, as
well as receive messages from the host operating system, such as
differential corrections and the almanac.

Setup
------------------
Expand Down Expand Up @@ -45,9 +44,23 @@ API Reference
-------------

.. toctree::
:maxdepth: 2
:maxdepth: 1

sbp
sbp.client
sbp.acquisition
sbp.bootload
sbp.file_io
sbp.flash
sbp.logging
sbp.navigation
sbp.observation
sbp.piksi
sbp.settings
sbp.system
sbp.table
sbp.tracking
sbp.utils

Indices and tables
------------------
Expand Down
1 change: 1 addition & 0 deletions python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
six
construct==2.5.2
cov-core==1.15.0
coverage==3.7.1
Expand Down
2 changes: 1 addition & 1 deletion python/sbp/client/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import sys
import time

from ..piksi import SBP_MSG_PRINT
from .. import logging import SBP_MSG_PRINT
from .drivers.file_driver import FileDriver
from .drivers.pyserial_driver import PySerialDriver
from .drivers.pyftdi_driver import PyFTDIDriver
Expand Down

0 comments on commit 24006ab

Please sign in to comment.