Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Basic sphinx docs

  • Loading branch information...
commit 029d4899206ba2ef02be30097706d234a17e045e 1 parent c970704
@bdarnell authored
View
5 .gitignore
@@ -1,4 +1,5 @@
*.pyc
/env/
-MANIFEST
-.tox/
+/MANIFEST
+/.tox/
+/docs/build/
View
1  codegenloader/__init__.py
@@ -0,0 +1 @@
+version = "0.1"
View
10 codegenloader/protobuf.py
@@ -35,16 +35,16 @@ def generate(self, relname):
def make_path(modname, basedir):
- """Returns a object to be set as __path__.
+ """Returns a object to be set as ``__path__``.
This is the visible entry point to this module. To use it,
- assign the result of this function to ``__path__``:
+ assign the result of this function to ``__path__``::
import dropbox.codegenloader.protobuf
__path__ = dropbox.codegenloader.protobuf.make_path(__name__, "proto")
- The first argument should always be __name__; the second is a
- directory name that contains the .proto files. (relative to the
- file where make_path is called).
+ The first argument should always be ``__name__``; the second is a
+ directory name that contains the ``.proto`` files. (relative to the
+ file where `make_path` is called).
"""
return ProtobufLoader.register(modname, basedir)
View
8 codegenloader/thrift.py
@@ -30,16 +30,16 @@ def generate(self, relname):
def make_path(modname, basedir):
- """Returns a object to be set as __path__.
+ """Returns a object to be set as ``__path__``.
This is the visible entry point to this module. To use it,
- assign the result of this function to ``__path__``:
+ assign the result of this function to ``__path__``::
import dropbox.codegenloader.thrift
__path__ = dropbox.codegenloader.thrift.make_path(__name__, "thrift")
- The first argument should always be __name__; the second is a
+ The first argument should always be ``__name__``; the second is a
directory name that contains the thrift files. (relative to the
- file where make_path is called).
+ file where `make_path` is called).
"""
return ThriftLoader.register(modname, basedir)
View
9 docs/Makefile
@@ -0,0 +1,9 @@
+SPHINXOPTS=-W -d build/doctrees .
+
+.PHONY: docs
+docs:
+ sphinx-build -b html $(SPHINXOPTS) build/html
+
+.PHONY: clean
+clean:
+ rm -rf build
View
5 docs/base.rst
@@ -0,0 +1,5 @@
+``codegenloader.base``
+======================
+
+.. automodule:: codegenloader.base
+ :members:
View
21 docs/conf.py
@@ -0,0 +1,21 @@
+# Ensure we get the local copy instead of what's on the standard path
+import os
+import sys
+sys.path.insert(0, os.path.abspath('..'))
+import codegenloader
+
+master_doc = "index"
+
+project = "codegenloader"
+copyright = "TODO"
+
+version = release = codegenloader.version
+
+extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"]
+
+primary_domain = 'py'
+default_role = 'py:obj'
+
+autodoc_member_order = 'bysource'
+autoclass_content = 'both'
+
View
16 docs/index.rst
@@ -0,0 +1,16 @@
+codegenloader Documentation
+===========================
+
+.. toctree::
+
+ base
+ protobuf
+ thrift
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
View
5 docs/protobuf.rst
@@ -0,0 +1,5 @@
+``codegenloader.protobuf``
+==========================
+
+.. automodule:: codegenloader.protobuf
+ :members:
View
5 docs/thrift.rst
@@ -0,0 +1,5 @@
+``codegenloader.thrift``
+========================
+
+.. automodule:: codegenloader.thrift
+ :members:
Please sign in to comment.
Something went wrong with that request. Please try again.