Exemple #1
0
# Output file base name for HTML help builder.
htmlhelp_basename = 'libswiftnav-pythondoc'

# -- Misc. Options -------------------------------------------------------------

# Configure intersphinx.
intersphinx_mapping = {
  'python': ('http://docs.python.org/', None),
  'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None),
  'matplotlib': ('http://matplotlib.sourceforge.net/', None),
  'numpy': ('http://docs.scipy.org/doc/numpy/', None)
}

# Grab the latest tagfile from the libswiftnav Doxygen docs.
print "Downloading libswiftnav.tag"
import urllib
urllib.urlretrieve('http://docs.swift-nav.com/libswiftnav/libswiftnav.tag',
                   'libswiftnav.tag')

doxylink = {
  'libswiftnav' : ('libswiftnav.tag', 'http://docs.swift-nav.com/libswiftnav/')
}

# Generate stub files from autosummary.
autosummary_generate = True

# Run our patched sphinx-apidoc script that will document .pyx files.
import apidoc
apidoc.main(['fakin it', '--force', '--no-toc', '-o', '.', '../swiftnav'])

Exemple #2
0
# Output file base name for HTML help builder.
htmlhelp_basename = 'libswiftnav-pythondoc'

# -- Misc. Options -------------------------------------------------------------

# Configure intersphinx.
intersphinx_mapping = {
    'python': ('http://docs.python.org/', None),
    'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None),
    'matplotlib': ('http://matplotlib.sourceforge.net/', None),
    'numpy': ('http://docs.scipy.org/doc/numpy/', None)
}

# Grab the latest tagfile from the libswiftnav Doxygen docs.
print "Downloading libswiftnav.tag"
import urllib
urllib.urlretrieve('http://docs.swift-nav.com/libswiftnav/libswiftnav.tag',
                   'libswiftnav.tag')

doxylink = {
    'libswiftnav':
    ('libswiftnav.tag', 'http://docs.swift-nav.com/libswiftnav/')
}

# Generate stub files from autosummary.
autosummary_generate = True

# Run our patched sphinx-apidoc script that will document .pyx files.
import apidoc
apidoc.main(['fakin it', '--force', '--no-toc', '-o', '.', '../swiftnav'])
Exemple #3
0
def not_hidden(name):
    return not name.startswith('_')

def is_in_module(obj):
    # Filter out implicitly imported members
    return getattr(obj, '__module__', '') == FAKE_NAME

def main():
    module_path = './pkg/another_module.py'
    module = imp.load_source(FAKE_NAME, module_path)
    #
    print('* inspect') 
    for name, obj in inspect.getmembers(module):
        # if not name.startswith('_') !!!
        if inspect.isfunction(obj) or inspect.isclass(obj):
            print(name, '(%s)' % obj.__module__)
    #
    print('* __all__')
    if hasattr(module, '__all__'):
        print(module.__all__)
    else:
        print('does not have __all__')
    #
    print('* to document')
    print(members_to_doc(module_path))

if __name__ == '__main__':
    import apidoc
    apidoc.main()