##// END OF EJS Templates
Include qt.console.frontend_widget in docs
Thomas Kluyver -
Show More
@@ -1,50 +1,50 b''
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2 """Script to auto-generate our API docs.
2 """Script to auto-generate our API docs.
3 """
3 """
4 # stdlib imports
4 # stdlib imports
5 import os
5 import os
6 import sys
6 import sys
7
7
8 # local imports
8 # local imports
9 sys.path.append(os.path.abspath('sphinxext'))
9 sys.path.append(os.path.abspath('sphinxext'))
10 from apigen import ApiDocWriter
10 from apigen import ApiDocWriter
11
11
12 #*****************************************************************************
12 #*****************************************************************************
13 if __name__ == '__main__':
13 if __name__ == '__main__':
14 pjoin = os.path.join
14 pjoin = os.path.join
15 package = 'IPython'
15 package = 'IPython'
16 outdir = pjoin('source','api','generated')
16 outdir = pjoin('source','api','generated')
17 docwriter = ApiDocWriter(package,rst_extension='.rst')
17 docwriter = ApiDocWriter(package,rst_extension='.rst')
18 # You have to escape the . here because . is a special char for regexps.
18 # You have to escape the . here because . is a special char for regexps.
19 # You must do make clean if you change this!
19 # You must do make clean if you change this!
20 docwriter.package_skip_patterns += [r'\.external$',
20 docwriter.package_skip_patterns += [r'\.external$',
21 # Extensions are documented elsewhere.
21 # Extensions are documented elsewhere.
22 r'\.extensions',
22 r'\.extensions',
23 r'\.config\.profile',
23 r'\.config\.profile',
24 ]
24 ]
25
25
26 # The inputhook* modules often cause problems on import, such as trying to
26 # The inputhook* modules often cause problems on import, such as trying to
27 # load incompatible Qt bindings. It's easiest to leave them all out. The
27 # load incompatible Qt bindings. It's easiest to leave them all out. The
28 # main API is in the inputhook module, which is documented.
28 # main API is in the inputhook module, which is documented.
29 docwriter.module_skip_patterns += [ r'\.lib\.inputhook.+',
29 docwriter.module_skip_patterns += [ r'\.lib\.inputhook.+',
30 r'\.ipdoctest',
30 r'\.ipdoctest',
31 r'\.testing\.plugin',
31 r'\.testing\.plugin',
32 # This just prints a deprecation msg:
32 # This just prints a deprecation msg:
33 r'\.frontend',
33 r'\.frontend$',
34 ]
34 ]
35
35
36 # We're rarely working on machines with the Azure SDK installed, so we
36 # We're rarely working on machines with the Azure SDK installed, so we
37 # skip the module that needs it in that case.
37 # skip the module that needs it in that case.
38 try:
38 try:
39 import azure # analysis:ignore
39 import azure # analysis:ignore
40 except ImportError:
40 except ImportError:
41 docwriter.module_skip_patterns.append(r'\.html\.services\.notebooks\.azurenbmanager')
41 docwriter.module_skip_patterns.append(r'\.html\.services\.notebooks\.azurenbmanager')
42
42
43 # Now, generate the outputs
43 # Now, generate the outputs
44 docwriter.write_api_docs(outdir)
44 docwriter.write_api_docs(outdir)
45 # Write index with .txt extension - we can include it, but Sphinx won't try
45 # Write index with .txt extension - we can include it, but Sphinx won't try
46 # to compile it
46 # to compile it
47 docwriter.write_index(outdir, 'gen.txt',
47 docwriter.write_index(outdir, 'gen.txt',
48 relative_to = pjoin('source','api')
48 relative_to = pjoin('source','api')
49 )
49 )
50 print ('%d files written' % len(docwriter.written_modules))
50 print ('%d files written' % len(docwriter.written_modules))
General Comments 0
You need to be logged in to leave comments. Login now