Skip to content

Commit

Permalink
stabilized sphinx, starting on populating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
damouse committed Jun 21, 2015
1 parent 4ff9bc3 commit be47018
Show file tree
Hide file tree
Showing 18 changed files with 114 additions and 23 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ paradrop/*.snap

docs/_build
docs/_static
docs/_templates
docs/_templates

bin/*.pex
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Paradrop

[![Documentation Status](https://readthedocs.org/projects/paradrop/badge/?version=latest)](https://readthedocs.org/projects/paradrop/?badge=latest)
[![Documentation Status](https://readthedocs.org/projects/paradrop/badge/?version=latest)](http://paradrop.readthedocs.org/en/master/)


Virtualized wireless routers.
Expand Down
Binary file removed bin/pddependancies.pex
Binary file not shown.
2 changes: 2 additions & 0 deletions docs/build system.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Build System
====================================
6 changes: 4 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
# 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('.'))
path = os.path.abspath('../paradrop/paradrop')
print path
sys.path.insert(0, os.path.abspath('../paradrop/'))

# -- General configuration ------------------------------------------------

Expand All @@ -31,7 +33,7 @@
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]


# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'

Expand Down
2 changes: 2 additions & 0 deletions docs/developing for paradrop.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Developing for Paradrop
====================================
9 changes: 6 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to paradrop's documentation!
Paradrop
====================================

stuff

Contents:

.. toctree::
:maxdepth: 2

overview
installation
developing for paradrop
modules



Indices and tables
Expand Down
11 changes: 11 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Installation
====================================

Contents:

.. toctree::
:maxdepth: 2

quickstart
build system

7 changes: 7 additions & 0 deletions docs/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
paradrop
========

.. toctree::
:maxdepth: 4

paradrop
2 changes: 2 additions & 0 deletions docs/overview.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Overview
====================================
18 changes: 18 additions & 0 deletions docs/paradrop.frontend.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
paradrop.frontend package
=========================

Submodules
----------

paradrop.frontend.stuff module
------------------------------

.. automodule:: paradrop.frontend.stuff
:members:


Module contents
---------------

.. automodule:: paradrop.frontend
:members:
25 changes: 25 additions & 0 deletions docs/paradrop.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
paradrop package
================

Subpackages
-----------

.. toctree::

paradrop.frontend

Submodules
----------

paradrop.paradrop module
------------------------

.. automodule:: paradrop.paradrop
:members:


Module contents
---------------

.. automodule:: paradrop
:members:
2 changes: 2 additions & 0 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Quick Start
====================================
1 change: 1 addition & 0 deletions paradrop/paradrop/frontend/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# import stuff
15 changes: 15 additions & 0 deletions paradrop/paradrop/frontend/stuff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'''
Sample documentation
'''

def afunction():
"""This function does something... from inside frontend.
:param name: The name to use.
:type name: str.
:param state: Current state to be in.
:type state: bool.
:returns: int -- the return code.
:raises: AttributeError, KeyError
"""
print 'Just testing, thanks.'
26 changes: 13 additions & 13 deletions paradrop/paradrop/paradrop.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
from flask import Flask

def run():
import frontend

def main():
"""This function does something.
:param name: The name to use.
:type name: str.
:param state: Current state to be in.
:type state: bool.
:returns: int -- the return code.
:raises: AttributeError, KeyError
"""
app = Flask(__name__)

@app.route('/')
def hello_world():
return 'hello world!'

#assign to eth0 dynamically (or run it )
#assign to eth0 dynamically (or run it on 80)
# app.run('10.0.2.15', port = 7777)

#running locally
#TODO: determine if running locally or on snappy
app.run(port = 7777)

def main():
#I have a haunting feeling this is not the correct way of doing things
print 'Starting Main'
run()

if __name__ == "__main__":
main()

'''
To be clear, this works with pex. Install this package and run the following:
sudo pex flask spack -o out.pex -e spack:main
'''
2 changes: 1 addition & 1 deletion paradrop/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

entry_points={
'console_scripts': [
'paradrop=paradrop.paradrop:main',
'paradrop=paradrop:main',
],
},
)
3 changes: 1 addition & 2 deletions pdbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ build() {
pip install pex
pip install -e ./paradrop

rm -rf paradrop/paradrop.egg-info

#we don't want to bundle pex (for size reasons) and paradrop (since pex needs a little help in
# finding the package thats out of the scope of this script)
echo -e "${COLOR}Building dependencies" && tput sgr0
Expand All @@ -73,6 +71,7 @@ clean() {

rm -rf buildenv/env
rm bin/pddependancies.pex
rm -rf paradrop/paradrop.egg-info
rm *.snap
}

Expand Down

0 comments on commit be47018

Please sign in to comment.