##// END OF EJS Templates
Allow to rebuild docs with Warning this is an old version.
Allow to rebuild docs with Warning this is an old version.

File last commit:

r11758:e7c96312
r21632:cbeff901
Show More
autogen_api.py
66 lines | 3.0 KiB | text/x-python | PythonLexer
Fernando Perez
Update docs for automatic API building.
r1850 #!/usr/bin/env python
"""Script to auto-generate our API docs.
"""
# stdlib imports
import os
import sys
# local imports
sys.path.append(os.path.abspath('sphinxext'))
from apigen import ApiDocWriter
#*****************************************************************************
if __name__ == '__main__':
pjoin = os.path.join
package = 'IPython'
outdir = pjoin('source','api','generated')
Paul Ivanov
update indexes to use .rst, remove .txt refs
r11730 docwriter = ApiDocWriter(package,rst_extension='.rst')
Brian Granger
Cleanup of docs....
r2275 # You have to escape the . here because . is a special char for regexps.
# You must do make clean if you change this!
Fernando Perez
Update docs for automatic API building.
r1850 docwriter.package_skip_patterns += [r'\.fixes$',
Brian Granger
Cleanup of docs....
r2275 r'\.external$',
Brian Granger
Renaming Extensions=>extensions in code and imports.
r2064 r'\.extensions',
Brian Granger
Cleanup of docs....
r2275 r'\.kernel\.config',
Fernando Perez
Update docs for automatic API building.
r1850 r'\.attic',
Brian Granger
General work on inputhook and the docs....
r2197 r'\.quarantine',
Brian Granger
Cleanup of docs....
r2275 r'\.deathrow',
r'\.config\.default',
r'\.config\.profile',
r'\.frontend',
Fernando Perez
Major overhaul of the messaging documentation.
r2735 r'\.gui',
MinRK
update autogen_api.py...
r4130 r'\.kernel',
Fernando Perez
Major overhaul of the messaging documentation.
r2735 # For now, the zmq code has
# unconditional top-level code so it's
# not import safe. This needs fixing
r'\.zmq',
Fernando Perez
Update docs for automatic API building.
r1850 ]
Fernando Perez
Small fixes so the docs build....
r2404
Brian Granger
Cleanup of docs....
r2275 docwriter.module_skip_patterns += [ r'\.core\.fakemodule',
Fernando Perez
Add iptest to autodoc exclusion list (was pulling Qt in)
r5266 r'\.testing\.iptest',
Fernando Perez
Small fixes so the docs build....
r2404 # Keeping these disabled is OK
MinRK
update autogen_api.py...
r4130 r'\.parallel\.controller\.mongodb',
r'\.lib\.inputhookwx',
r'\.lib\.inputhookgtk',
Fernando Perez
Update docs for automatic API building.
r1850 r'\.cocoa',
r'\.ipdoctest',
r'\.Gnuplot',
Brian Granger
Cleanup of docs....
r2275 r'\.frontend\.process\.winprocess',
Thomas Kluyver
Exclude frontend shim from docs build...
r11139 r'\.frontend',
Fernando Perez
Several small fixes during code review with Brian....
r2339 r'\.Shell',
Fernando Perez
Update docs for automatic API building.
r1850 ]
Fernando Perez
Generate docs correctly if pexpect is not available....
r2568
# If we don't have pexpect, we can't load irunner, so skip any code that
# depends on it
try:
import pexpect
except ImportError:
docwriter.module_skip_patterns += [r'\.lib\.irunner',
r'\.testing\.mkdoctests']
# Now, generate the outputs
Fernando Perez
Update docs for automatic API building.
r1850 docwriter.write_api_docs(outdir)
Paul Ivanov
fix api docs post txt -> rst rename
r11758 # Write index with .txt extension - we can include it, but Sphinx won't try
Thomas Kluyver
Miscellaneous docs fixes
r9244 # to compile it
Paul Ivanov
fix api docs post txt -> rst rename
r11758 docwriter.write_index(outdir, 'gen.txt',
Fernando Perez
Update docs for automatic API building.
r1850 relative_to = pjoin('source','api')
)
MinRK
Python 3 print functions...
r11213 print ('%d files written' % len(docwriter.written_modules))