X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/cd38e4893698333050ac52a9242bee29371a080c..1fb4774474207933a6cce19e65a2fa011593b3eb:/docs/conf.py?ds=inline diff --git a/docs/conf.py b/docs/conf.py index f998dea..b1329ba 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,16 +16,30 @@ import sys, os # 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.append(os.path.abspath(os.path.dirname(__file__))) sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "_ext"))) +sys.path.append(os.path.abspath(os.path.dirname(os.path.dirname(__file__)))) + +os.environ['DJANGO_SETTINGS_MODULE'] = 'dummy-settings' + +# Import loader so that loader_tags will be correctly added to builtins. Weird import situations... this is necessary for doc build to work. +from django.template import loader + +# HACK to override descriptors that would cause AttributeErrors to be raised otherwise (which would keep them from being documented.) +from philo.contrib.sobol.models import SearchView +SearchView.searches = 5 +from philo.models.nodes import TargetURLModel, File +TargetURLModel.reversing_parameters = 5 +File.file = 5 # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' +needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage', 'djangodocs'] +extensions = ['djangodocs', 'sphinx.ext.autodoc', 'philodocs'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -41,16 +55,17 @@ master_doc = 'index' # General information about the project. project = u'Philo' -copyright = u'2011, Joseph Spiros' +copyright = u'2009-2012, iThink Software' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '1.0' +from philo import VERSION +version = '.'.join([str(v) for v in VERSION]) # The full version, including alpha/beta/rc tags. -release = '1.0a1' +release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -87,6 +102,10 @@ pygments_style = 'sphinx' #modindex_common_prefix = [] +# Autodoc config +autodoc_member_order = "bysource" + + # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for @@ -179,7 +198,7 @@ htmlhelp_basename = 'Philodoc' # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'Philo.tex', u'Philo Documentation', - u'Stephen Burrows', 'manual'), + u'iThink Software', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -212,5 +231,14 @@ latex_documents = [ # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'philo', u'Philo Documentation', - [u'Stephen Burrows'], 1) + [u'iThink Software'], 1) ] + +def skip_attribute_attrs(app, what, name, obj, skip, options): + if name in ("attribute_set", "get_attribute_mapper", "nodes"): + return True + return skip + +def setup(app): + app.connect('autodoc-skip-member', skip_attribute_attrs) + #app.connect('autodoc-process-signature', )