Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias Assign NameStore NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad Str Str Str Str Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore ListLoad Str If CompareIs NameLoad NameLoad body Assign NameStore ListLoad Str Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Assign AttributeStore NameLoad attr NameLoad decorator_list Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str For NameStore SubscriptLoad NameLoad Slice Num body Assign NameStore Call NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Index Num attr Str Index Num attr Return Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq NameLoad AttributeLoad NameLoad attr body Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd NameLoad Str body AugAssignAdd NameStore Str orelse If Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str orelse Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad If Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore SubscriptLoad NameLoad Slice Num Return Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Print TupleLoad NameLoad Str Return TupleLoad ListLoad ListLoad Assign NameStore Call NameLoad NameLoad Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad keyword ListLoad NameLoad Assign NameStore ListComp NameLoad comprehension NameStore Call NameLoad NameLoad UnaryOpNot Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad Assign NameStore ListLoad For NameStore NameLoad body If CompareNotIn NameLoad AttributeLoad NameLoad attr body Continue Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If BoolOpAnd UnaryOpNot AttributeLoad NameLoad attr UnaryOpNot CompareEq Call NameLoad NameLoad NameLoad body Continue If BoolOpOr Call NameLoad NameLoad Str Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse TryExcept body Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Pass Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore ListLoad For NameStore NameLoad body If BoolOpAnd Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad orelse If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad orelse Pass Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd UnaryOpNot Call NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad NameLoad body Print TupleLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr Str NameLoad Assign NameStore Str Assign NameStore Str If CompareIn Str NameLoad body Assign NameStore BinOpAdd BinOpAdd Str NameLoad Str AugAssignAdd NameStore BinOpAdd BinOpAdd NameLoad Str BinOpMult SubscriptLoad AttributeLoad NameLoad attr Index Num Call NameLoad NameLoad orelse Assign NameStore BinOpAdd BinOpAdd Str NameLoad Str AugAssignAdd NameStore BinOpAdd BinOpAdd NameLoad Str BinOpMult SubscriptLoad AttributeLoad NameLoad attr Index Num Call NameLoad NameLoad AugAssignAdd NameStore BinOpAdd BinOpAdd Str NameLoad Str AugAssignAdd NameStore BinOpAdd BinOpAdd Str NameLoad Str AugAssignAdd NameStore BinOpAdd BinOpAdd Str NameLoad Str For NameStore NameLoad body AugAssignAdd NameStore BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str BinOpMult SubscriptLoad AttributeLoad NameLoad attr Index Num BinOpAdd Call NameLoad NameLoad Num Str AugAssignAdd NameStore BinOpAdd BinOpAdd Str NameLoad Str AugAssignAdd NameStore Str AugAssignAdd NameStore Str For NameStore BinOpAdd NameLoad NameLoad body AugAssignAdd NameStore BinOpAdd BinOpAdd Str NameLoad Str AugAssignAdd NameStore Str For NameStore NameLoad body AugAssignAdd NameStore BinOpAdd NameLoad Str AugAssignAdd NameStore BinOpAdd BinOpMult SubscriptLoad AttributeLoad NameLoad attr Index Num Call NameLoad NameLoad Str AugAssignAdd NameStore BinOpAdd BinOpAdd Str NameLoad Str Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareEq NameLoad Str body Assign NameStore AttributeLoad NameLoad attr orelse If CompareEq NameLoad Str body Assign NameStore AttributeLoad NameLoad attr orelse Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr If CompareEq SubscriptLoad NameLoad Slice NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Slice NameLoad For NameStore NameLoad body TryExcept body Expr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad NameLoad attr NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad AttributeLoad NameLoad attr For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Assign NameStore ListComp SubscriptLoad NameLoad Slice Num comprehension NameStore NameLoad BoolOpAnd Call AttributeLoad NameLoad attr Str UnaryOpNot Call AttributeLoad NameLoad attr Str For NameStore NameLoad body Assign NameStore Call AttributeLoad Str attr TupleLoad NameLoad NameLoad For NameStore BinOpAdd NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd NameLoad Call AttributeLoad NameLoad attr NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore SubscriptLoad Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str Index Num Assign NameStore ListComp IfExp CompareGtE Call AttributeLoad NameLoad attr Str Num Call AttributeLoad Str attr SubscriptLoad Call AttributeLoad NameLoad attr Str Slice Num SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num comprehension NameStore NameLoad ImportFrom alias Assign NameStore Call NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body If CompareIn NameLoad NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad ListLoad NameLoad Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Print BinOpMod Str NameLoad Assign NameStore ListLoad Assign NameStore ListLoad For NameStore NameLoad body Print BinOpAdd Str NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str NameLoad body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd NameLoad AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad BinOpAdd NameLoad AttributeLoad AttributeLoad NameLoad attr attr attr BinOpAdd NameLoad AttributeLoad AttributeLoad NameLoad attr attr Str orelse Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad Str Assign NameStore AttributeLoad NameLoad attr Expr Call NameLoad Str Assign NameStore Str Expr Call NameLoad BinOpAdd NameLoad Str Expr Call NameLoad BinOpAdd BinOpMult Str Call NameLoad NameLoad Str Expr Call NameLoad Str For NameStore AttributeLoad NameLoad attr body Expr Call NameLoad BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A 
Attempt to generate templates for module reference with Sphinx

To include extension modules, first identify them as valid in the
``_uri2path`` method, then handle them in the ``_parse_module_with_import``
script.

Notes
-----
This parsing is based on import and introspection of modules.
Previously functions and classes were found by parsing the text of .py files.

Extension modules should be discovered and included as well.

This is a modified version of a script originally shipped with the PyMVPA
project, then adapted for use first in NIPY and then in skimage. PyMVPA
is an MIT-licensed project.
 N/A os N/A re inspect getmodule types BuiltinFunctionType N/A DEBUG True ApiDocWriter N/A object N/A N/A  Class for automatic detection and parsing of API docs
    to Sphinx-parsable reST format N/A rst_section_levels N/A * = - ~ ^ __init__ N/A N/A self package_name rst_extension package_skip_patterns module_skip_patterns other_defines N/A .txt None None True N/A N/A  Initialize package for parsing

        Parameters
        ----------
        package_name : string
            Name of the top-level package.  *package_name* must be the
            name of an importable package
        rst_extension : string, optional
            Extension for reST files, default '.rst'
        package_skip_patterns : None or sequence of {strings, regexps}
            Sequence of strings giving URIs of packages to be excluded
            Operates on the package path, starting at (including) the
            first dot in the package path, after *package_name* - so,
            if *package_name* is ``sphinx``, then ``sphinx.util`` will
            result in ``.util`` being passed for searching by these
            regexps.  If is None, gives default. Default is:
            ['\.tests$']
        module_skip_patterns : None or sequence
            Sequence of strings giving URIs of modules to be excluded
            Operates on the module name including preceding URI path,
            back to the first dot after *package_name*.  For example
            ``sphinx.util.console`` results in the string to search of
            ``.util.console``
            If is None, gives default. Default is:
            ['\.setup$', '\._']
        other_defines : {True, False}, optional
            Whether to include classes and functions that are imported in a
            particular module but not defined there.
         N/A N/A package_skip_patterns None N/A N/A package_skip_patterns N/A \.tests$ N/A N/A module_skip_patterns None N/A N/A module_skip_patterns N/A \.setup$ \._ N/A N/A self package_name package_name N/A N/A self rst_extension rst_extension N/A N/A self package_skip_patterns package_skip_patterns N/A N/A self module_skip_patterns module_skip_patterns N/A N/A self other_defines other_defines N/A get_package_name N/A N/A self N/A N/A N/A N/A self _package_name N/A set_package_name N/A N/A self package_name N/A N/A N/A  Set package_name

        >>> docwriter = ApiDocWriter('sphinx')
        >>> import sphinx
        >>> docwriter.root_path == sphinx.__path__[0]
        True
        >>> docwriter.package_name = 'docutils'
        >>> import docutils
        >>> docwriter.root_path == docutils.__path__[0]
        True
         N/A N/A self _package_name package_name N/A root_module N/A N/A self _import package_name N/A N/A self root_path N/A N/A root_module __path__ N/A -1 N/A N/A self written_modules None N/A N/A package_name N/A property get_package_name set_package_name None get/set package_name _import N/A N/A self name N/A N/A N/A  Import namespace package  N/A mod N/A __import__ name N/A components N/A N/A name split . N/A comp N/A components N/A 1 N/A N/A mod N/A getattr mod comp N/A mod N/A _get_object_name N/A N/A self line N/A N/A N/A  Get second token in line
        >>> docwriter = ApiDocWriter('sphinx')
        >>> docwriter._get_object_name("  def func():  ")
        'func'
        >>> docwriter._get_object_name("  class Klass(object):  ")
        'Klass'
        >>> docwriter._get_object_name("  class Klass:  ")
        'Klass'
         N/A name N/A N/A N/A N/A N/A N/A N/A N/A line split N/A 1 split ( N/A 0 strip N/A N/A N/A name rstrip : N/A _uri2path N/A N/A self uri N/A N/A N/A  Convert uri to absolute filepath

        Parameters
        ----------
        uri : string
            URI of python module to return path for

        Returns
        -------
        path : None or string
            Returns None if there is no valid path for this URI
            Otherwise returns absolute file system path for URI

        Examples
        --------
        >>> docwriter = ApiDocWriter('sphinx')
        >>> import sphinx
        >>> modpath = sphinx.__path__[0]
        >>> res = docwriter._uri2path('sphinx.builder')
        >>> res == os.path.join(modpath, 'builder.py')
        True
        >>> res = docwriter._uri2path('sphinx')
        >>> res == os.path.join(modpath, '__init__.py')
        True
        >>> docwriter._uri2path('sphinx.does_not_exist')

         N/A N/A uri N/A self package_name N/A N/A N/A N/A N/A os path join N/A self root_path __init__.py N/A path N/A N/A uri replace N/A N/A self package_name . N/A path N/A N/A path replace . N/A N/A os path sep N/A path N/A N/A N/A os path join N/A self root_path path N/A N/A N/A N/A os path exists N/A path .py N/A N/A path .py N/A N/A N/A N/A N/A os path exists N/A N/A N/A os path join path __init__.py N/A N/A path N/A N/A N/A os path join path __init__.py N/A N/A None N/A path N/A _path2uri N/A N/A self dirpath N/A N/A N/A  Convert directory path to uri  N/A package_dir N/A N/A N/A self package_name replace . N/A N/A os path sep N/A relpath N/A N/A dirpath replace N/A self root_path package_dir N/A N/A N/A relpath startswith N/A N/A os path sep N/A N/A relpath N/A relpath N/A 1 N/A N/A N/A relpath replace N/A N/A os path sep . N/A _parse_module N/A N/A self uri N/A N/A N/A  Parse module defined in *uri*  N/A filename N/A N/A self _uri2path uri N/A N/A filename None N/A N/A N/A filename erk N/A N/A N/A N/A N/A f N/A open filename rt N/A N/A functions classes N/A N/A self _parse_lines f N/A N/A N/A f close N/A N/A functions classes N/A _parse_module_with_import N/A N/A self uri N/A N/A N/A Look for functions and classes in an importable module.

        Parameters
        ----------
        uri : str
            The name of the module to be parsed. This module needs to be
            importable.

        Returns
        -------
        functions : list of str
            A list of (public) function names in the module.
        classes : list of str
            A list of (public) class names in the module.
         N/A mod N/A __import__ uri fromlist N/A uri N/A obj_strs N/A obj N/A obj N/A dir mod N/A N/A N/A obj startswith _ N/A functions N/A N/A classes N/A N/A obj_str obj_strs N/A N/A N/A obj_str N/A mod __dict__ N/A N/A N/A obj N/A N/A mod __dict__ N/A obj_str N/A N/A N/A N/A self other_defines N/A N/A N/A getmodule obj mod N/A N/A N/A N/A N/A hasattr obj func_name N/A isinstance obj BuiltinFunctionType N/A N/A N/A N/A functions append obj_str N/A N/A N/A N/A N/A issubclass obj object N/A N/A N/A classes append obj_str N/A N/A N/A TypeError N/A N/A N/A N/A functions classes N/A _parse_lines N/A N/A self linesource N/A N/A N/A  Parse lines of text for functions and classes  N/A functions N/A N/A classes N/A N/A line linesource N/A N/A N/A N/A N/A line startswith def  N/A N/A line count ( N/A N/A name N/A N/A self _get_object_name line N/A N/A N/A N/A name startswith _ N/A N/A N/A N/A functions append name N/A N/A N/A N/A line startswith class  N/A N/A name N/A N/A self _get_object_name line N/A N/A N/A N/A name startswith _ N/A N/A N/A N/A classes append name N/A N/A N/A N/A N/A functions sort N/A N/A N/A classes sort N/A N/A functions classes N/A generate_api_doc N/A N/A self uri N/A N/A N/A Make autodoc documentation template string for a module

        Parameters
        ----------
        uri : string
            python location of module - e.g 'sphinx.builder'

        Returns
        -------
        head : string
            Module name, table of contents.
        body : string
            Function and class docstrings.
         N/A N/A functions classes N/A N/A self _parse_module_with_import uri N/A N/A N/A N/A len functions N/A N/A len classes DEBUG N/A N/A N/A WARNING: Empty - uri N/A uri_short N/A N/A re sub N/A ^%s\. N/A self package_name uri N/A head .. AUTO-GENERATED FILE -- DO NOT EDIT!

 N/A body N/A N/A . uri_short N/A N/A title N/A N/A Module: :mod:` uri_short ` N/A head N/A N/A title N/A N/A N/A self rst_section_levels N/A 2 N/A len title N/A N/A title N/A N/A :mod:` uri_short ` N/A head N/A N/A title N/A N/A N/A self rst_section_levels N/A 1 N/A len title N/A head N/A N/A 
.. automodule::  uri N/A head N/A N/A 
.. currentmodule::  uri N/A body N/A N/A 
.. currentmodule::  uri N/A c classes N/A N/A body N/A N/A N/A N/A 
:class:` c `
 N/A N/A N/A self rst_section_levels N/A 3 N/A N/A len c 9 N/A body N/A N/A 
.. autoclass::  c N/A body   :members:
  :undoc-members:
  :show-inheritance:

  .. automethod:: __init__

 N/A head .. autosummary::

 N/A f N/A classes functions N/A N/A head N/A N/A f N/A head N/A f functions N/A N/A body N/A f N/A body N/A N/A N/A N/A self rst_section_levels N/A 3 N/A len f N/A body N/A N/A 
.. autofunction::  f N/A N/A head body N/A _survives_exclude N/A N/A self matchstr match_type N/A N/A N/A  Returns True if *matchstr* does not match patterns

        ``self.package_name`` removed from front of string if present

        Examples
        --------
        >>> dw = ApiDocWriter('sphinx')
        >>> dw._survives_exclude('sphinx.okpkg', 'package')
        True
        >>> dw.package_skip_patterns.append('^\.badpkg$')
        >>> dw._survives_exclude('sphinx.badpkg', 'package')
        False
        >>> dw._survives_exclude('sphinx.badpkg', 'module')
        True
        >>> dw._survives_exclude('sphinx.badmod', 'module')
        True
        >>> dw.module_skip_patterns.append('^\.badmod$')
        >>> dw._survives_exclude('sphinx.badmod', 'module')
        False
         N/A N/A match_type module N/A N/A patterns N/A self module_skip_patterns N/A N/A N/A match_type package N/A N/A patterns N/A self package_skip_patterns N/A N/A N/A ValueError N/A Cannot interpret match type "%s" match_type N/A L N/A len N/A self package_name N/A N/A N/A matchstr N/A L N/A self package_name N/A N/A matchstr N/A matchstr N/A L N/A pat patterns N/A N/A N/A N/A N/A pat search N/A N/A N/A AttributeError N/A N/A pat N/A N/A re compile pat N/A N/A N/A pat search matchstr N/A N/A False N/A True N/A discover_modules N/A N/A self N/A N/A N/A  Return module sequence discovered from ``self.package_name``


        Parameters
        ----------
        None

        Returns
        -------
        mods : sequence
            Sequence of module names within ``self.package_name``

        Examples
        --------
        >>> dw = ApiDocWriter('sphinx')
        >>> mods = dw.discover_modules()
        >>> 'sphinx.util' in mods
        True
        >>> dw.package_skip_patterns.append('\.util$')
        >>> 'sphinx.util' in dw.discover_modules()
        False
        >>>
         N/A modules N/A N/A self package_name N/A N/A dirpath dirnames filenames N/A N/A os walk N/A self root_path N/A N/A root_uri N/A N/A self _path2uri N/A N/A N/A os path join N/A self root_path dirpath N/A filenames N/A N/A f N/A -3 N/A f filenames N/A N/A N/A f endswith .py N/A N/A N/A f startswith __init__ N/A filename filenames N/A N/A package_uri N/A N/A / join N/A dirpath filename N/A subpkg_name N/A dirnames filenames N/A N/A package_uri N/A N/A . join N/A root_uri subpkg_name N/A package_path N/A N/A self _uri2path package_uri N/A N/A package_path N/A N/A self _survives_exclude package_uri package N/A N/A N/A N/A modules append package_uri N/A N/A sorted modules N/A write_modules_api N/A N/A self modules outdir N/A N/A N/A main_module N/A N/A N/A N/A modules N/A 0 split . N/A 0 N/A ulms N/A N/A N/A N/A N/A m count . 1 N/A N/A . join N/A N/A N/A m split . N/A 2 N/A N/A N/A m split . N/A 0 N/A m modules collections OrderedDict N/A module_by_ulm N/A OrderedDict N/A N/A v k N/A zip modules ulms N/A N/A N/A k module_by_ulm N/A N/A N/A N/A N/A module_by_ulm N/A k append v N/A N/A N/A module_by_ulm N/A k N/A v N/A written_modules N/A N/A N/A ulm mods N/A N/A module_by_ulm items N/A N/A N/A Generating docs for %s: ulm N/A document_head N/A N/A document_body N/A N/A m mods N/A N/A N/A   ->  m N/A N/A head body N/A N/A self generate_api_doc m N/A N/A N/A document_head append head N/A N/A N/A document_body append body N/A out_module N/A ulm N/A self rst_extension N/A outfile N/A N/A N/A os path join outdir out_module N/A fileobj N/A open outfile wt N/A N/A N/A fileobj writelines N/A document_head document_body N/A N/A N/A fileobj close N/A N/A N/A written_modules append out_module N/A N/A self written_modules written_modules N/A write_api_docs N/A N/A self outdir N/A N/A N/A Generate API reST files.

        Parameters
        ----------
        outdir : string
            Directory name in which to store files
            We create automatic filenames for each module

        Returns
        -------
        None

        Notes
        -----
        Sets self.written_modules to list of written modules
         N/A N/A N/A N/A N/A os path exists outdir N/A N/A N/A N/A os mkdir outdir N/A modules N/A N/A self discover_modules N/A N/A N/A self write_modules_api modules outdir N/A write_index N/A N/A self outdir froot relative_to N/A gen None N/A N/A Make a reST API index file from written files

        Parameters
        ----------
        path : string
            Filename to write index to
        outdir : string
            Directory to which to write generated index file
        froot : string, optional
            root (filename without extension) of filename to write to
            Defaults to 'gen'.  We add ``self.rst_extension``.
        relative_to : string
            path to which written filenames are relative.  This
            component of the written file path will be removed from
            outdir, in the generated index.  Default is None, meaning,
            leave path as it is.
         N/A N/A N/A self written_modules None N/A N/A N/A ValueError No modules written N/A path N/A N/A N/A os path join outdir N/A froot N/A self rst_extension N/A N/A relative_to None N/A N/A relpath N/A N/A N/A outdir N/A N/A os path sep replace N/A relative_to N/A N/A os path sep N/A N/A relpath outdir N/A idx N/A open path wt N/A w N/A idx write N/A N/A w .. AUTO-GENERATED FILE -- DO NOT EDIT!

 N/A title API Reference N/A N/A w N/A title N/A N/A w N/A N/A = N/A len title N/A N/A w .. toctree::

 N/A f N/A self written_modules N/A N/A N/A w N/A    %s
 N/A N/A N/A os path join relpath f N/A N/A N/A idx close N/A N/A