From 2483d94d7b52e30fae96c5a4ecd063689366d71f Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Wed, 26 Dec 2018 22:19:33 -0800 Subject: [PATCH] Docs --- docs/.gitignore | 1 + docs/source/conf.py | 62 +++++++++++++---------------------------- docs/source/index.rst | 9 +++--- docs/source/modules.rst | 7 +++++ docs/source/pycmx.rst | 46 ++++++++++++++++++++++++++++++ 5 files changed, 78 insertions(+), 47 deletions(-) create mode 100644 docs/.gitignore create mode 100644 docs/source/modules.rst create mode 100644 docs/source/pycmx.rst diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..a007fea --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +build/* diff --git a/docs/source/conf.py b/docs/source/conf.py index 8f7f5be..3b97388 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -12,21 +12,21 @@ # 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. # -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) +import os +import sys +sys.path.insert(0, os.path.abspath('../../pycmx')) # -- Project information ----------------------------------------------------- -project = 'pycmx' -copyright = '2018, Jamie Hardt' -author = 'Jamie Hardt' +project = u'pycmx' +copyright = u'2018, Jamie Hardt' +author = u'Jamie Hardt' # The short X.Y version -version = '0.7' +version = u'' # The full version, including alpha/beta/rc tags -release = '0.6' +release = u'' # -- General configuration --------------------------------------------------- @@ -40,6 +40,10 @@ release = '0.6' # ones. extensions = [ 'sphinx.ext.autodoc', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.viewcode', + 'sphinx.ext.githubpages', ] # Add any paths that contain templates here, relative to this directory. @@ -81,7 +85,7 @@ html_theme = 'sphinx_rtd_theme' # further. For a list of options available for each theme, see the # documentation. # -# html_theme_options = {} +html_theme_options = {'collapse_navigation': False} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, @@ -129,8 +133,8 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'pycmx.tex', 'pycmx Documentation', - 'Jamie Hardt', 'manual'), + (master_doc, 'pycmx.tex', u'pycmx Documentation', + u'Jamie Hardt', 'manual'), ] @@ -139,7 +143,7 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'pycmx', 'pycmx Documentation', + (master_doc, 'pycmx', u'pycmx Documentation', [author], 1) ] @@ -150,7 +154,7 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'pycmx', 'pycmx Documentation', + (master_doc, 'pycmx', u'pycmx Documentation', author, 'pycmx', 'One line description of project.', 'Miscellaneous'), ] @@ -176,33 +180,7 @@ epub_exclude_files = ['search.html'] # -- Extension configuration ------------------------------------------------- -autodoc_member_order = 'bysource' -autodoc_default_flags = ['show-inheritance'] +# -- Options for todo extension ---------------------------------------------- -def run_apidoc(_): - """This method is required by the setup method below.""" - import os - dirname = os.path.dirname(__file__) - ignore_paths = [os.path.join(dirname, '../../aaf2/model'),] - # https://github.com/sphinx-doc/sphinx/blob/master/sphinx/ext/apidoc.py - argv = [ - '--force', - '--no-toc', - '--separate', - '--module-first', - '--output-dir', - os.path.join(dirname, 'api'), - os.path.join(dirname, '../../aaf2'), - ] + ignore_paths - - from sphinx.ext import apidoc - apidoc.main(argv) - - -def setup(app): - """This method is a hook into the Sphinx builder system and injects the - apidoc module into it so it runs autodoc before running build. - If you mess with this, you may not see any effect in a local build, this - was added to get api documentation building on the ReadTheDocs server. - """ - app.connect('builder-inited', run_apidoc) +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True diff --git a/docs/source/index.rst b/docs/source/index.rst index e5b1e69..9173981 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,5 +1,5 @@ .. pycmx documentation master file, created by - sphinx-quickstart on Wed Dec 26 21:26:32 2018. + sphinx-quickstart on Wed Dec 26 21:51:43 2018. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. @@ -7,11 +7,10 @@ Welcome to pycmx's documentation! ================================= .. toctree:: - :maxdepth: 2 - :caption: Contents: - - ../../pycmx/pycmx + :maxdepth: 5 + :caption: API Reference: + pycmx Indices and tables ================== diff --git a/docs/source/modules.rst b/docs/source/modules.rst new file mode 100644 index 0000000..7013fac --- /dev/null +++ b/docs/source/modules.rst @@ -0,0 +1,7 @@ +pycmx +===== + +.. toctree:: + :maxdepth: 4 + + pycmx diff --git a/docs/source/pycmx.rst b/docs/source/pycmx.rst new file mode 100644 index 0000000..9a87ab5 --- /dev/null +++ b/docs/source/pycmx.rst @@ -0,0 +1,46 @@ +pycmx package +============= + +Submodules +---------- + +pycmx.channel\_map module +------------------------- + +.. automodule:: pycmx.channel_map + :members: + :undoc-members: + :show-inheritance: + +pycmx.parse\_cmx\_events module +------------------------------- + +.. automodule:: pycmx.parse_cmx_events + :members: + :undoc-members: + :show-inheritance: + +pycmx.parse\_cmx\_statements module +----------------------------------- + +.. automodule:: pycmx.parse_cmx_statements + :members: + :undoc-members: + :show-inheritance: + +pycmx.util module +----------------- + +.. automodule:: pycmx.util + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: pycmx + :members: + :undoc-members: + :show-inheritance: