##// END OF EJS Templates
API docs gardening
Thomas Kluyver -
Show More
@@ -13,6 +13,10 b' from . import v2'
13 from . import v3
13 from . import v3
14 from . import v4
14 from . import v4
15
15
16 __all__ = ['versions', 'validate', 'ValidationError', 'convert', 'from_dict',
17 'NotebookNode', 'current_nbformat', 'current_nbformat_minor',
18 'NBFormatError', 'NO_CONVERT', 'reads', 'read', 'writes', 'write']
19
16 versions = {
20 versions = {
17 1: v1,
21 1: v1,
18 2: v2,
22 2: v2,
@@ -1,20 +1,16 b''
1 """The main API for the v3 notebook format.
1 """The main API for the v3 notebook format.
2
3 Authors:
4
5 * Brian Granger
6 """
2 """
7
3
8 #-----------------------------------------------------------------------------
4 # Copyright (c) IPython Development Team.
9 # Copyright (C) 2008-2011 The IPython Development Team
5 # Distributed under the terms of the Modified BSD License.
10 #
11 # Distributed under the terms of the BSD License. The full license is in
12 # the file COPYING, distributed as part of this software.
13 #-----------------------------------------------------------------------------
14
6
15 #-----------------------------------------------------------------------------
7 __all__ = ['NotebookNode', 'new_code_cell', 'new_text_cell', 'new_notebook',
16 # Imports
8 'new_output', 'new_worksheet', 'new_metadata', 'new_author',
17 #-----------------------------------------------------------------------------
9 'new_heading_cell', 'nbformat', 'nbformat_minor', 'nbformat_schema',
10 'reads_json', 'writes_json', 'read_json', 'write_json',
11 'to_notebook_json', 'reads_py', 'writes_py', 'read_py', 'write_py',
12 'to_notebook_py', 'downgrade', 'upgrade', 'parse_filename'
13 ]
18
14
19 import os
15 import os
20
16
@@ -35,9 +31,6 b' from .nbpy import to_notebook as to_notebook_py'
35
31
36 from .convert import downgrade, upgrade
32 from .convert import downgrade, upgrade
37
33
38 #-----------------------------------------------------------------------------
39 # Code
40 #-----------------------------------------------------------------------------
41
34
42 def parse_filename(fname):
35 def parse_filename(fname):
43 """Parse a notebook filename.
36 """Parse a notebook filename.
@@ -3,6 +3,10 b''
3 # Copyright (c) IPython Development Team.
3 # Copyright (c) IPython Development Team.
4 # Distributed under the terms of the Modified BSD License.
4 # Distributed under the terms of the Modified BSD License.
5
5
6 __all__ = ['nbformat', 'nbformat_minor', 'nbformat_schema', 'new_code_cell',
7 'new_markdown_cell', 'new_notebook', 'new_output', 'output_from_msg',
8 'reads', 'writes', 'to_notebook', 'downgrade', 'upgrade']
9
6 from .nbbase import (
10 from .nbbase import (
7 nbformat, nbformat_minor, nbformat_schema,
11 nbformat, nbformat_minor, nbformat_schema,
8 new_code_cell, new_markdown_cell, new_notebook,
12 new_code_cell, new_markdown_cell, new_notebook,
@@ -21,8 +21,8 b" if __name__ == '__main__':"
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 # These should be accessed via nbformat.current
24 # Old nbformat versions
25 r'\.nbformat\.v\d+',
25 r'\.nbformat\.v[1-2]',
26 # Public API for this is in kernel.zmq.eventloops
26 # Public API for this is in kernel.zmq.eventloops
27 r'\.kernel\.zmq\.gui',
27 r'\.kernel\.zmq\.gui',
28 # Magics are documented separately
28 # Magics are documented separately
@@ -41,14 +41,21 b" if __name__ == '__main__':"
41 r'\.core\.magics\.deprecated',
41 r'\.core\.magics\.deprecated',
42 # We document this manually.
42 # We document this manually.
43 r'\.utils\.py3compat',
43 r'\.utils\.py3compat',
44 # These are exposed by nbformat.current
44 # These are exposed by nbformat
45 r'\.nbformat\.convert',
45 r'\.nbformat\.convert',
46 r'\.nbformat\.validator',
46 r'\.nbformat\.validator',
47 r'\.nbformat\.notebooknode',
48 # Deprecated
49 r'\.nbformat\.current',
50 # Exposed by nbformat.vN
51 r'\.nbformat\.v[3-4]\.nbbase',
47 # These are exposed in display
52 # These are exposed in display
48 r'\.core\.display',
53 r'\.core\.display',
49 r'\.lib\.display',
54 r'\.lib\.display',
50 # This isn't actually a module
55 # This isn't actually a module
51 r'\.html\.tasks',
56 r'\.html\.tasks',
57 # This is private
58 r'\.html\.allow76'
52 ]
59 ]
53
60
54 # These modules import functions and classes from other places to expose
61 # These modules import functions and classes from other places to expose
@@ -56,7 +63,9 b" if __name__ == '__main__':"
56 # non-API modules they import from should be excluded by the skip patterns
63 # non-API modules they import from should be excluded by the skip patterns
57 # above.
64 # above.
58 docwriter.names_from__all__.update({
65 docwriter.names_from__all__.update({
59 'IPython.nbformat.current',
66 'IPython.nbformat',
67 'IPython.nbformat.v3',
68 'IPython.nbformat.v4',
60 'IPython.display',
69 'IPython.display',
61 })
70 })
62
71
General Comments 0
You need to be logged in to leave comments. Login now