##// END OF EJS Templates
Updating autogen_api.py....
Brian Granger -
Show More
@@ -1,79 +1,79 b''
1 1 #!/usr/bin/env python
2 2 """Script to auto-generate our API docs.
3 3 """
4 4 # stdlib imports
5 5 import os
6 6 import sys
7 7
8 8 # local imports
9 9 sys.path.append(os.path.abspath('sphinxext'))
10 10 from apigen import ApiDocWriter
11 11
12 12 #*****************************************************************************
13 13 if __name__ == '__main__':
14 14 pjoin = os.path.join
15 15 package = 'IPython'
16 16 outdir = pjoin('source','api','generated')
17 17 docwriter = ApiDocWriter(package,rst_extension='.txt')
18 18 # You have to escape the . here because . is a special char for regexps.
19 19 # You must do make clean if you change this!
20 20 docwriter.package_skip_patterns += [r'\.fixes$',
21 21 r'\.external$',
22 22 r'\.extensions',
23 23 r'\.kernel\.config',
24 24 r'\.attic',
25 25 r'\.quarantine',
26 26 r'\.deathrow',
27 27 r'\.config\.default',
28 28 r'\.config\.profile',
29 29 r'\.frontend',
30 30 r'\.gui',
31 31 # For now, the zmq code has
32 32 # unconditional top-level code so it's
33 33 # not import safe. This needs fixing
34 34 # soon.
35 35 r'\.zmq',
36 36 ]
37 37
38 38 docwriter.module_skip_patterns += [ r'\.core\.fakemodule',
39 39
40 40 # XXX These need fixing, disabling for
41 41 # now but we need to figure out why
42 42 # they are breaking. Error from sphinx
43 43 # for each group copied below
44 44
45 45 # AttributeError: __abstractmethods__
46 r'\.core\.component',
46 r'\.config\.configurable',
47 47 r'\.utils\.traitlets',
48 48
49 49 # AttributeError: __provides__
50 50 r'\.kernel\.clusterdir',
51 51 r'\.kernel\.configobjfactory',
52 52 r'\.kernel\.fcutil',
53 53 r'\.kernel\.ipcontrollerapp',
54 54 r'\.kernel\.launcher',
55 55 r'\.kernel\.task',
56 56 r'\.kernel\.winhpcjob',
57 57 r'\.testing\.util',
58 58
59 59 # Keeping these disabled is OK
60 60 r'\.cocoa',
61 61 r'\.ipdoctest',
62 62 r'\.Gnuplot',
63 63 r'\.frontend\.process\.winprocess',
64 64 r'\.Shell',
65 65 ]
66 66
67 67 # If we don't have pexpect, we can't load irunner, so skip any code that
68 68 # depends on it
69 69 try:
70 70 import pexpect
71 71 except ImportError:
72 72 docwriter.module_skip_patterns += [r'\.lib\.irunner',
73 73 r'\.testing\.mkdoctests']
74 74 # Now, generate the outputs
75 75 docwriter.write_api_docs(outdir)
76 76 docwriter.write_index(outdir, 'gen',
77 77 relative_to = pjoin('source','api')
78 78 )
79 79 print '%d files written' % len(docwriter.written_modules)
General Comments 0
You need to be logged in to leave comments. Login now