Show More
@@ -1,79 +1,63 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 | r'\.kernel', | |
|
31 | 32 | # For now, the zmq code has |
|
32 | 33 | # unconditional top-level code so it's |
|
33 | 34 | # not import safe. This needs fixing |
|
34 | # soon. | |
|
35 | 35 | r'\.zmq', |
|
36 | 36 | ] |
|
37 | 37 | |
|
38 | 38 | docwriter.module_skip_patterns += [ r'\.core\.fakemodule', |
|
39 | 39 | |
|
40 | # XXX These need fixing, disabling for | |
|
41 | # now but we need to figure out why | |
|
42 | # they are breaking. Error from sphinx | |
|
43 | # for each group copied below | |
|
44 | ||
|
45 | # AttributeError: __abstractmethods__ | |
|
46 | r'\.config\.configurable', | |
|
47 | r'\.utils\.traitlets', | |
|
48 | ||
|
49 | # AttributeError: __provides__ | |
|
50 | r'\.kernel\.clusterdir', | |
|
51 | r'\.kernel\.configobjfactory', | |
|
52 | r'\.kernel\.fcutil', | |
|
53 | r'\.kernel\.ipcontrollerapp', | |
|
54 | r'\.kernel\.launcher', | |
|
55 | r'\.kernel\.task', | |
|
56 | r'\.kernel\.winhpcjob', | |
|
57 | r'\.testing\.util', | |
|
58 | ||
|
59 | 40 | # Keeping these disabled is OK |
|
41 | r'\.parallel\.controller\.mongodb', | |
|
42 | r'\.lib\.inputhookwx', | |
|
43 | r'\.lib\.inputhookgtk', | |
|
60 | 44 | r'\.cocoa', |
|
61 | 45 | r'\.ipdoctest', |
|
62 | 46 | r'\.Gnuplot', |
|
63 | 47 | r'\.frontend\.process\.winprocess', |
|
64 | 48 | r'\.Shell', |
|
65 | 49 | ] |
|
66 | 50 | |
|
67 | 51 | # If we don't have pexpect, we can't load irunner, so skip any code that |
|
68 | 52 | # depends on it |
|
69 | 53 | try: |
|
70 | 54 | import pexpect |
|
71 | 55 | except ImportError: |
|
72 | 56 | docwriter.module_skip_patterns += [r'\.lib\.irunner', |
|
73 | 57 | r'\.testing\.mkdoctests'] |
|
74 | 58 | # Now, generate the outputs |
|
75 | 59 | docwriter.write_api_docs(outdir) |
|
76 | 60 | docwriter.write_index(outdir, 'gen', |
|
77 | 61 | relative_to = pjoin('source','api') |
|
78 | 62 | ) |
|
79 | 63 | print '%d files written' % len(docwriter.written_modules) |
General Comments 0
You need to be logged in to leave comments.
Login now