##// END OF EJS Templates
Make each config option individually linkable
Thomas Kluyver -
Show More
@@ -0,0 +1,17 b''
1 """Directives and roles for documenting traitlets config options.
2
3 ::
4
5 .. configtrait:: Application.log_datefmt
6
7 Description goes here.
8
9 Cross reference like this: :configtrait:`Application.log_datefmt`.
10 """
11 from sphinx.locale import l_
12 from sphinx.util.docfields import Field
13
14 def setup(app):
15 app.add_object_type('configtrait', 'configtrait', objname='Config option')
16 metadata = {'parallel_read_safe': True, 'parallel_write_safe': True}
17 return metadata
@@ -1,144 +1,144 b''
1 # Makefile for Sphinx documentation
1 # Makefile for Sphinx documentation
2 #
2 #
3
3
4 # You can set these variables from the command line.
4 # You can set these variables from the command line.
5 SPHINXOPTS =
5 SPHINXOPTS =
6 SPHINXBUILD = sphinx-build
6 SPHINXBUILD = sphinx-build
7 PAPER =
7 PAPER =
8 SRCDIR = source
8 SRCDIR = source
9 BUILDDIR = build
9 BUILDDIR = build
10 PYTHON = python3
10 PYTHON = python3
11
11
12 # Internal variables.
12 # Internal variables.
13 PAPEROPT_a4 = -D latex_paper_size=a4
13 PAPEROPT_a4 = -D latex_paper_size=a4
14 PAPEROPT_letter = -D latex_paper_size=letter
14 PAPEROPT_letter = -D latex_paper_size=letter
15 ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SRCDIR)
15 ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SRCDIR)
16
16
17 .PHONY: help clean html web pickle htmlhelp latex changes linkcheck api
17 .PHONY: help clean html web pickle htmlhelp latex changes linkcheck api
18
18
19 default: html
19 default: html
20
20
21 help:
21 help:
22 @echo "Please use \`make <target>' where <target> is one of"
22 @echo "Please use \`make <target>' where <target> is one of"
23 @echo " html standalone HTML files"
23 @echo " html standalone HTML files"
24 @echo " html_noapi same as above, without the time consuming API docs"
24 @echo " html_noapi same as above, without the time consuming API docs"
25 @echo " pickle pickle files (usable by e.g. sphinx-web)"
25 @echo " pickle pickle files (usable by e.g. sphinx-web)"
26 @echo " htmlhelp HTML files and a HTML help project"
26 @echo " htmlhelp HTML files and a HTML help project"
27 @echo " latex LaTeX files, you can set PAPER=a4 or PAPER=letter"
27 @echo " latex LaTeX files, you can set PAPER=a4 or PAPER=letter"
28 @echo " texinfo Texinfo files"
28 @echo " texinfo Texinfo files"
29 @echo " info Texinfo files and run them through makeinfo"
29 @echo " info Texinfo files and run them through makeinfo"
30 @echo " changes an overview over all changed/added/deprecated items"
30 @echo " changes an overview over all changed/added/deprecated items"
31 @echo " linkcheck check all external links for integrity (takes a long time)"
31 @echo " linkcheck check all external links for integrity (takes a long time)"
32 @echo
32 @echo
33 @echo "Compound utility targets:"
33 @echo "Compound utility targets:"
34 @echo "pdf latex and then runs the PDF generation"
34 @echo "pdf latex and then runs the PDF generation"
35 @echo "all html and pdf"
35 @echo "all html and pdf"
36 @echo "dist all, and then puts the results in dist/"
36 @echo "dist all, and then puts the results in dist/"
37
37
38 clean_api:
38 clean_api:
39 -rm -rf $(SRCDIR)/api/generated
39 -rm -rf $(SRCDIR)/api/generated
40
40
41 clean: clean_api
41 clean: clean_api
42 -rm -rf build/* dist/*
42 -rm -rf build/* dist/*
43 -rm -f $(SRCDIR)/config/options/config-generated.txt
43 -rm -f $(SRCDIR)/config/options/config-generated.txt
44 -rm -f $(SRCDIR)/config/shortcuts/*.csv
44 -rm -f $(SRCDIR)/config/shortcuts/*.csv
45 -rm -f $(SRCDIR)/interactive/magics-generated.txt
45 -rm -f $(SRCDIR)/interactive/magics-generated.txt
46
46
47 pdf: latex
47 pdf: latex
48 cd build/latex && make all-pdf
48 cd build/latex && make all-pdf
49
49
50 all: html pdf
50 all: html pdf
51
51
52 # For final distribution, only build HTML (our pdf is now so large as to be
52 # For final distribution, only build HTML (our pdf is now so large as to be
53 # unusable, takes forever to build and just bloats the downloads). We leave
53 # unusable, takes forever to build and just bloats the downloads). We leave
54 # them hardlinked at the top-level so users find them easily, though the
54 # them hardlinked at the top-level so users find them easily, though the
55 # original build/html dir is left in-place (useful to reload builds while
55 # original build/html dir is left in-place (useful to reload builds while
56 # testing).
56 # testing).
57 dist: html
57 dist: html
58 rm -rf html
58 rm -rf html
59 cp -al build/html .
59 cp -al build/html .
60 @echo "Build finished. Final docs are in html/"
60 @echo "Build finished. Final docs are in html/"
61
61
62 html: api autoconfig automagic autogen_shortcuts
62 html: api autoconfig automagic autogen_shortcuts
63 html_noapi: clean_api autoconfig automagic autogen_shortcuts
63 html_noapi: clean_api autoconfig automagic autogen_shortcuts
64
64
65 html html_noapi:
65 html html_noapi:
66 mkdir -p build/html build/doctrees
66 mkdir -p build/html build/doctrees
67 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
67 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
68 @echo
68 @echo
69 @echo "Build finished. The HTML pages are in build/html."
69 @echo "Build finished. The HTML pages are in build/html."
70
70
71 automagic: source/interactive/magics-generated.txt
71 automagic: source/interactive/magics-generated.txt
72
72
73 source/interactive/magics-generated.txt: autogen_magics.py
73 source/interactive/magics-generated.txt: autogen_magics.py
74 $(PYTHON) autogen_magics.py
74 $(PYTHON) autogen_magics.py
75 @echo "Created docs for line & cell magics"
75 @echo "Created docs for line & cell magics"
76
76
77 autoconfig: source/config/options/config-generated.txt
77 autoconfig: source/config/options/config-generated.txt
78
78
79 source/config/options/config-generated.txt:
79 source/config/options/config-generated.txt: autogen_config.py
80 $(PYTHON) autogen_config.py
80 $(PYTHON) autogen_config.py
81 @echo "Created docs for config options"
81 @echo "Created docs for config options"
82
82
83 api: source/api/generated/gen.txt
83 api: source/api/generated/gen.txt
84
84
85 source/api/generated/gen.txt:
85 source/api/generated/gen.txt:
86 $(PYTHON) autogen_api.py
86 $(PYTHON) autogen_api.py
87 @echo "Build API docs finished."
87 @echo "Build API docs finished."
88
88
89 autogen_shortcuts: autogen_shortcuts.py ../IPython/terminal/interactiveshell.py source/config/shortcuts/index.rst
89 autogen_shortcuts: autogen_shortcuts.py ../IPython/terminal/interactiveshell.py source/config/shortcuts/index.rst
90 $(PYTHON) autogen_shortcuts.py
90 $(PYTHON) autogen_shortcuts.py
91 @echo "Created docs for shortcuts"
91 @echo "Created docs for shortcuts"
92
92
93 pickle:
93 pickle:
94 mkdir -p build/pickle build/doctrees
94 mkdir -p build/pickle build/doctrees
95 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
95 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
96 @echo
96 @echo
97 @echo "Build finished; now you can process the pickle files or run"
97 @echo "Build finished; now you can process the pickle files or run"
98 @echo " sphinx-web build/pickle"
98 @echo " sphinx-web build/pickle"
99 @echo "to start the sphinx-web server."
99 @echo "to start the sphinx-web server."
100
100
101 web: pickle
101 web: pickle
102
102
103 htmlhelp:
103 htmlhelp:
104 mkdir -p build/htmlhelp build/doctrees
104 mkdir -p build/htmlhelp build/doctrees
105 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
105 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
106 @echo
106 @echo
107 @echo "Build finished; now you can run HTML Help Workshop with the" \
107 @echo "Build finished; now you can run HTML Help Workshop with the" \
108 ".hhp project file in build/htmlhelp."
108 ".hhp project file in build/htmlhelp."
109
109
110 latex: api autoconfig
110 latex: api autoconfig
111 mkdir -p build/latex build/doctrees
111 mkdir -p build/latex build/doctrees
112 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
112 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
113 @echo
113 @echo
114 @echo "Build finished; the LaTeX files are in build/latex."
114 @echo "Build finished; the LaTeX files are in build/latex."
115 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
115 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
116 "run these through (pdf)latex."
116 "run these through (pdf)latex."
117
117
118 changes:
118 changes:
119 mkdir -p build/changes build/doctrees
119 mkdir -p build/changes build/doctrees
120 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
120 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
121 @echo
121 @echo
122 @echo "The overview file is in build/changes."
122 @echo "The overview file is in build/changes."
123
123
124 linkcheck:
124 linkcheck:
125 mkdir -p build/linkcheck build/doctrees
125 mkdir -p build/linkcheck build/doctrees
126 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
126 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
127 @echo
127 @echo
128 @echo "Link check complete; look for any errors in the above output " \
128 @echo "Link check complete; look for any errors in the above output " \
129 "or in build/linkcheck/output.rst."
129 "or in build/linkcheck/output.rst."
130
130
131 texinfo:
131 texinfo:
132 mkdir -p $(BUILDDIR)/texinfo
132 mkdir -p $(BUILDDIR)/texinfo
133 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
133 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
134 @echo
134 @echo
135 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
135 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
136 @echo "Run \`make' in that directory to run these through makeinfo" \
136 @echo "Run \`make' in that directory to run these through makeinfo" \
137 "(use \`make info' here to do that automatically)."
137 "(use \`make info' here to do that automatically)."
138
138
139 info:
139 info:
140 mkdir -p $(BUILDDIR)/texinfo
140 mkdir -p $(BUILDDIR)/texinfo
141 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
141 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
142 @echo "Running Texinfo files through makeinfo..."
142 @echo "Running Texinfo files through makeinfo..."
143 make -C $(BUILDDIR)/texinfo info
143 make -C $(BUILDDIR)/texinfo info
144 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
144 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
@@ -1,33 +1,91 b''
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2
2
3 from os.path import join, dirname, abspath
3 from os.path import join, dirname, abspath
4
4
5 from IPython.terminal.ipapp import TerminalIPythonApp
5 from IPython.terminal.ipapp import TerminalIPythonApp
6 from ipykernel.kernelapp import IPKernelApp
6 from ipykernel.kernelapp import IPKernelApp
7 from traitlets import Undefined
7
8
8 here = abspath(dirname(__file__))
9 here = abspath(dirname(__file__))
9 options = join(here, 'source', 'config', 'options')
10 options = join(here, 'source', 'config', 'options')
10 generated = join(options, 'config-generated.txt')
11 generated = join(options, 'config-generated.txt')
11
12
13 from ipython_genutils.text import indent, dedent
14
15 def interesting_default_value(dv):
16 if (dv is None) or (dv is Undefined):
17 return False
18 if isinstance(dv, (str, list, tuple, dict, set)):
19 return bool(dv)
20 return True
21
22 def class_config_rst_doc(cls):
23 """Generate rST documentation for this class' config options.
24
25 Excludes traits defined on parent classes.
26 """
27 lines = []
28 classname = cls.__name__
29 for k, trait in sorted(cls.class_traits(config=True).items()):
30 ttype = trait.__class__.__name__
31
32 lines += ['.. configtrait:: ' + classname + '.' + trait.name,
33 ''
34 ]
35
36 help = trait.help.rstrip() or 'No description'
37 lines.append(indent(dedent(help), 4) + '\n')
38
39 # Choices or type
40 if 'Enum' in ttype:
41 # include Enum choices
42 lines.append(indent(
43 ':options: ' + ', '.join('``%r``' % x for x in trait.values), 4))
44 else:
45 lines.append(indent(':trait type: ' + ttype, 4))
46
47 # Default value
48 # Ignore boring default values like None, [] or ''
49 if interesting_default_value(trait.default_value):
50 try:
51 dvr = trait.default_value_repr()
52 except Exception:
53 dvr = None # ignore defaults we can't construct
54 if dvr is not None:
55 if len(dvr) > 64:
56 dvr = dvr[:61] + '...'
57 # Double up backslashes, so they get to the rendered docs
58 dvr = dvr.replace('\\n', '\\\\n')
59 lines.append(indent(':default: ``%s``' % dvr, 4))
60
61 # Blank line
62 lines.append('')
63
64 return '\n'.join(lines)
65
12
66
13 def write_doc(name, title, app, preamble=None):
67 def write_doc(name, title, app, preamble=None):
14 filename = join(options, name+'.rst')
68 filename = join(options, name+'.rst')
15 with open(filename, 'w') as f:
69 with open(filename, 'w') as f:
16 f.write(title + '\n')
70 f.write(title + '\n')
17 f.write(('=' * len(title)) + '\n')
71 f.write(('=' * len(title)) + '\n')
18 f.write('\n')
72 f.write('\n')
19 if preamble is not None:
73 if preamble is not None:
20 f.write(preamble + '\n\n')
74 f.write(preamble + '\n\n')
21 f.write(app.document_config_options())
75 #f.write(app.document_config_options())
76
77 for c in app._classes_inc_parents():
78 f.write(class_config_rst_doc(c))
79 f.write('\n')
22
80
23
81
24 if __name__ == '__main__':
82 if __name__ == '__main__':
25 # Touch this file for the make target
83 # Touch this file for the make target
26 with open(generated, 'w'):
84 with open(generated, 'w'):
27 pass
85 pass
28
86
29 write_doc('terminal', 'Terminal IPython options', TerminalIPythonApp())
87 write_doc('terminal', 'Terminal IPython options', TerminalIPythonApp())
30 write_doc('kernel', 'IPython kernel options', IPKernelApp(),
88 write_doc('kernel', 'IPython kernel options', IPKernelApp(),
31 preamble=("These options can be used in :file:`ipython_kernel_config.py`. "
89 preamble=("These options can be used in :file:`ipython_kernel_config.py`. "
32 "The kernel also respects any options in `ipython_config.py`"),
90 "The kernel also respects any options in `ipython_config.py`"),
33 )
91 )
@@ -1,296 +1,297 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 #
2 #
3 # IPython documentation build configuration file.
3 # IPython documentation build configuration file.
4
4
5 # NOTE: This file has been edited manually from the auto-generated one from
5 # NOTE: This file has been edited manually from the auto-generated one from
6 # sphinx. Do NOT delete and re-generate. If any changes from sphinx are
6 # sphinx. Do NOT delete and re-generate. If any changes from sphinx are
7 # needed, generate a scratch one and merge by hand any new fields needed.
7 # needed, generate a scratch one and merge by hand any new fields needed.
8
8
9 #
9 #
10 # This file is execfile()d with the current directory set to its containing dir.
10 # This file is execfile()d with the current directory set to its containing dir.
11 #
11 #
12 # The contents of this file are pickled, so don't put values in the namespace
12 # The contents of this file are pickled, so don't put values in the namespace
13 # that aren't pickleable (module imports are okay, they're removed automatically).
13 # that aren't pickleable (module imports are okay, they're removed automatically).
14 #
14 #
15 # All configuration values have a default value; values that are commented out
15 # All configuration values have a default value; values that are commented out
16 # serve to show the default value.
16 # serve to show the default value.
17
17
18 import sys, os
18 import sys, os
19
19
20 # http://read-the-docs.readthedocs.io/en/latest/faq.html
20 # http://read-the-docs.readthedocs.io/en/latest/faq.html
21 ON_RTD = os.environ.get('READTHEDOCS', None) == 'True'
21 ON_RTD = os.environ.get('READTHEDOCS', None) == 'True'
22
22
23 if ON_RTD:
23 if ON_RTD:
24 tags.add('rtd')
24 tags.add('rtd')
25
25
26 # RTD doesn't use the Makefile, so re-run autogen_{things}.py here.
26 # RTD doesn't use the Makefile, so re-run autogen_{things}.py here.
27 for name in ('config', 'api', 'magics', 'shortcuts'):
27 for name in ('config', 'api', 'magics', 'shortcuts'):
28 fname = 'autogen_{}.py'.format(name)
28 fname = 'autogen_{}.py'.format(name)
29 fpath = os.path.abspath(os.path.join('..', fname))
29 fpath = os.path.abspath(os.path.join('..', fname))
30 with open(fpath) as f:
30 with open(fpath) as f:
31 exec(compile(f.read(), fname, 'exec'), {
31 exec(compile(f.read(), fname, 'exec'), {
32 '__file__': fpath,
32 '__file__': fpath,
33 '__name__': '__main__',
33 '__name__': '__main__',
34 })
34 })
35 else:
35 else:
36 import sphinx_rtd_theme
36 import sphinx_rtd_theme
37 html_theme = "sphinx_rtd_theme"
37 html_theme = "sphinx_rtd_theme"
38 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
38 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
39
39
40 # If your extensions are in another directory, add it here. If the directory
40 # If your extensions are in another directory, add it here. If the directory
41 # is relative to the documentation root, use os.path.abspath to make it
41 # is relative to the documentation root, use os.path.abspath to make it
42 # absolute, like shown here.
42 # absolute, like shown here.
43 sys.path.insert(0, os.path.abspath('../sphinxext'))
43 sys.path.insert(0, os.path.abspath('../sphinxext'))
44
44
45 # We load the ipython release info into a dict by explicit execution
45 # We load the ipython release info into a dict by explicit execution
46 iprelease = {}
46 iprelease = {}
47 exec(compile(open('../../IPython/core/release.py').read(), '../../IPython/core/release.py', 'exec'),iprelease)
47 exec(compile(open('../../IPython/core/release.py').read(), '../../IPython/core/release.py', 'exec'),iprelease)
48
48
49 # General configuration
49 # General configuration
50 # ---------------------
50 # ---------------------
51
51
52 # Add any Sphinx extension module names here, as strings. They can be extensions
52 # Add any Sphinx extension module names here, as strings. They can be extensions
53 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
53 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
54 extensions = [
54 extensions = [
55 'sphinx.ext.autodoc',
55 'sphinx.ext.autodoc',
56 'sphinx.ext.autosummary',
56 'sphinx.ext.autosummary',
57 'sphinx.ext.doctest',
57 'sphinx.ext.doctest',
58 'sphinx.ext.inheritance_diagram',
58 'sphinx.ext.inheritance_diagram',
59 'sphinx.ext.intersphinx',
59 'sphinx.ext.intersphinx',
60 'IPython.sphinxext.ipython_console_highlighting',
60 'IPython.sphinxext.ipython_console_highlighting',
61 'IPython.sphinxext.ipython_directive',
61 'IPython.sphinxext.ipython_directive',
62 'sphinx.ext.napoleon', # to preprocess docstrings
62 'sphinx.ext.napoleon', # to preprocess docstrings
63 'github', # for easy GitHub links
63 'github', # for easy GitHub links
64 'magics',
64 'magics',
65 'configtraits',
65 ]
66 ]
66
67
67 if ON_RTD:
68 if ON_RTD:
68 # Remove extensions not currently supported on RTD
69 # Remove extensions not currently supported on RTD
69 extensions.remove('IPython.sphinxext.ipython_directive')
70 extensions.remove('IPython.sphinxext.ipython_directive')
70 extensions.remove('IPython.sphinxext.ipython_console_highlighting')
71 extensions.remove('IPython.sphinxext.ipython_console_highlighting')
71
72
72 # Add any paths that contain templates here, relative to this directory.
73 # Add any paths that contain templates here, relative to this directory.
73 templates_path = ['_templates']
74 templates_path = ['_templates']
74
75
75 # The suffix of source filenames.
76 # The suffix of source filenames.
76 source_suffix = '.rst'
77 source_suffix = '.rst'
77
78
78 rst_prolog = ''
79 rst_prolog = ''
79
80
80 def is_stable(extra):
81 def is_stable(extra):
81 for ext in {'dev', 'b', 'rc'}:
82 for ext in {'dev', 'b', 'rc'}:
82 if ext in extra:
83 if ext in extra:
83 return False
84 return False
84 return True
85 return True
85
86
86 if is_stable(iprelease['_version_extra']):
87 if is_stable(iprelease['_version_extra']):
87 tags.add('ipystable')
88 tags.add('ipystable')
88 else:
89 else:
89 tags.add('ipydev')
90 tags.add('ipydev')
90 rst_prolog += """
91 rst_prolog += """
91 .. warning::
92 .. warning::
92
93
93 This documentation covers a development version of IPython. The development
94 This documentation covers a development version of IPython. The development
94 version may differ significantly from the latest stable release.
95 version may differ significantly from the latest stable release.
95 """
96 """
96
97
97 rst_prolog += """
98 rst_prolog += """
98 .. important::
99 .. important::
99
100
100 This documentation covers IPython versions 6.0 and higher. Beginning with
101 This documentation covers IPython versions 6.0 and higher. Beginning with
101 version 6.0, IPython stopped supporting compatibility with Python versions
102 version 6.0, IPython stopped supporting compatibility with Python versions
102 lower than 3.3 including all versions of Python 2.7.
103 lower than 3.3 including all versions of Python 2.7.
103
104
104 If you are looking for an IPython version compatible with Python 2.7,
105 If you are looking for an IPython version compatible with Python 2.7,
105 please use the IPython 5.x LTS release and refer to its documentation (LTS
106 please use the IPython 5.x LTS release and refer to its documentation (LTS
106 is the long term support release).
107 is the long term support release).
107
108
108 """
109 """
109
110
110 # The master toctree document.
111 # The master toctree document.
111 master_doc = 'index'
112 master_doc = 'index'
112
113
113 # General substitutions.
114 # General substitutions.
114 project = 'IPython'
115 project = 'IPython'
115 copyright = 'The IPython Development Team'
116 copyright = 'The IPython Development Team'
116
117
117 # ghissue config
118 # ghissue config
118 github_project_url = "https://github.com/ipython/ipython"
119 github_project_url = "https://github.com/ipython/ipython"
119
120
120 # numpydoc config
121 # numpydoc config
121 numpydoc_show_class_members = False # Otherwise Sphinx emits thousands of warnings
122 numpydoc_show_class_members = False # Otherwise Sphinx emits thousands of warnings
122 numpydoc_class_members_toctree = False
123 numpydoc_class_members_toctree = False
123
124
124 # The default replacements for |version| and |release|, also used in various
125 # The default replacements for |version| and |release|, also used in various
125 # other places throughout the built documents.
126 # other places throughout the built documents.
126 #
127 #
127 # The full version, including alpha/beta/rc tags.
128 # The full version, including alpha/beta/rc tags.
128 release = "%s" % iprelease['version']
129 release = "%s" % iprelease['version']
129 # Just the X.Y.Z part, no '-dev'
130 # Just the X.Y.Z part, no '-dev'
130 version = iprelease['version'].split('-', 1)[0]
131 version = iprelease['version'].split('-', 1)[0]
131
132
132
133
133 # There are two options for replacing |today|: either, you set today to some
134 # There are two options for replacing |today|: either, you set today to some
134 # non-false value, then it is used:
135 # non-false value, then it is used:
135 #today = ''
136 #today = ''
136 # Else, today_fmt is used as the format for a strftime call.
137 # Else, today_fmt is used as the format for a strftime call.
137 today_fmt = '%B %d, %Y'
138 today_fmt = '%B %d, %Y'
138
139
139 # List of documents that shouldn't be included in the build.
140 # List of documents that shouldn't be included in the build.
140 #unused_docs = []
141 #unused_docs = []
141
142
142 # Exclude these glob-style patterns when looking for source files. They are
143 # Exclude these glob-style patterns when looking for source files. They are
143 # relative to the source/ directory.
144 # relative to the source/ directory.
144 exclude_patterns = ['whatsnew/pr']
145 exclude_patterns = ['whatsnew/pr']
145
146
146
147
147 # If true, '()' will be appended to :func: etc. cross-reference text.
148 # If true, '()' will be appended to :func: etc. cross-reference text.
148 #add_function_parentheses = True
149 #add_function_parentheses = True
149
150
150 # If true, the current module name will be prepended to all description
151 # If true, the current module name will be prepended to all description
151 # unit titles (such as .. function::).
152 # unit titles (such as .. function::).
152 #add_module_names = True
153 #add_module_names = True
153
154
154 # If true, sectionauthor and moduleauthor directives will be shown in the
155 # If true, sectionauthor and moduleauthor directives will be shown in the
155 # output. They are ignored by default.
156 # output. They are ignored by default.
156 #show_authors = False
157 #show_authors = False
157
158
158 # The name of the Pygments (syntax highlighting) style to use.
159 # The name of the Pygments (syntax highlighting) style to use.
159 pygments_style = 'sphinx'
160 pygments_style = 'sphinx'
160
161
161 # Set the default role so we can use `foo` instead of ``foo``
162 # Set the default role so we can use `foo` instead of ``foo``
162 default_role = 'literal'
163 default_role = 'literal'
163
164
164 # Options for HTML output
165 # Options for HTML output
165 # -----------------------
166 # -----------------------
166
167
167 # The style sheet to use for HTML and HTML Help pages. A file of that name
168 # The style sheet to use for HTML and HTML Help pages. A file of that name
168 # must exist either in Sphinx' static/ path, or in one of the custom paths
169 # must exist either in Sphinx' static/ path, or in one of the custom paths
169 # given in html_static_path.
170 # given in html_static_path.
170 # html_style = 'default.css'
171 # html_style = 'default.css'
171
172
172
173
173 # The name for this set of Sphinx documents. If None, it defaults to
174 # The name for this set of Sphinx documents. If None, it defaults to
174 # "<project> v<release> documentation".
175 # "<project> v<release> documentation".
175 #html_title = None
176 #html_title = None
176
177
177 # The name of an image file (within the static path) to place at the top of
178 # The name of an image file (within the static path) to place at the top of
178 # the sidebar.
179 # the sidebar.
179 #html_logo = None
180 #html_logo = None
180
181
181 # Add any paths that contain custom static files (such as style sheets) here,
182 # Add any paths that contain custom static files (such as style sheets) here,
182 # relative to this directory. They are copied after the builtin static files,
183 # relative to this directory. They are copied after the builtin static files,
183 # so a file named "default.css" will overwrite the builtin "default.css".
184 # so a file named "default.css" will overwrite the builtin "default.css".
184 html_static_path = ['_static']
185 html_static_path = ['_static']
185
186
186 # Favicon needs the directory name
187 # Favicon needs the directory name
187 html_favicon = '_static/favicon.ico'
188 html_favicon = '_static/favicon.ico'
188 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
189 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
189 # using the given strftime format.
190 # using the given strftime format.
190 html_last_updated_fmt = '%b %d, %Y'
191 html_last_updated_fmt = '%b %d, %Y'
191
192
192 # If true, SmartyPants will be used to convert quotes and dashes to
193 # If true, SmartyPants will be used to convert quotes and dashes to
193 # typographically correct entities.
194 # typographically correct entities.
194 #html_use_smartypants = True
195 #html_use_smartypants = True
195
196
196 # Custom sidebar templates, maps document names to template names.
197 # Custom sidebar templates, maps document names to template names.
197 #html_sidebars = {}
198 #html_sidebars = {}
198
199
199 # Additional templates that should be rendered to pages, maps page names to
200 # Additional templates that should be rendered to pages, maps page names to
200 # template names.
201 # template names.
201 html_additional_pages = {
202 html_additional_pages = {
202 'interactive/htmlnotebook': 'notebook_redirect.html',
203 'interactive/htmlnotebook': 'notebook_redirect.html',
203 'interactive/notebook': 'notebook_redirect.html',
204 'interactive/notebook': 'notebook_redirect.html',
204 'interactive/nbconvert': 'notebook_redirect.html',
205 'interactive/nbconvert': 'notebook_redirect.html',
205 'interactive/public_server': 'notebook_redirect.html',
206 'interactive/public_server': 'notebook_redirect.html',
206 }
207 }
207
208
208 # If false, no module index is generated.
209 # If false, no module index is generated.
209 #html_use_modindex = True
210 #html_use_modindex = True
210
211
211 # If true, the reST sources are included in the HTML build as _sources/<name>.
212 # If true, the reST sources are included in the HTML build as _sources/<name>.
212 #html_copy_source = True
213 #html_copy_source = True
213
214
214 # If true, an OpenSearch description file will be output, and all pages will
215 # If true, an OpenSearch description file will be output, and all pages will
215 # contain a <link> tag referring to it. The value of this option must be the
216 # contain a <link> tag referring to it. The value of this option must be the
216 # base URL from which the finished HTML is served.
217 # base URL from which the finished HTML is served.
217 #html_use_opensearch = ''
218 #html_use_opensearch = ''
218
219
219 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
220 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
220 #html_file_suffix = ''
221 #html_file_suffix = ''
221
222
222 # Output file base name for HTML help builder.
223 # Output file base name for HTML help builder.
223 htmlhelp_basename = 'ipythondoc'
224 htmlhelp_basename = 'ipythondoc'
224
225
225 intersphinx_mapping = {'python': ('https://docs.python.org/3/', None),
226 intersphinx_mapping = {'python': ('https://docs.python.org/3/', None),
226 'rpy2': ('https://rpy2.readthedocs.io/en/version_2.8.x/', None),
227 'rpy2': ('https://rpy2.readthedocs.io/en/version_2.8.x/', None),
227 'traitlets': ('https://traitlets.readthedocs.io/en/latest/', None),
228 'traitlets': ('https://traitlets.readthedocs.io/en/latest/', None),
228 'jupyterclient': ('https://jupyter-client.readthedocs.io/en/latest/', None),
229 'jupyterclient': ('https://jupyter-client.readthedocs.io/en/latest/', None),
229 'ipyparallel': ('https://ipyparallel.readthedocs.io/en/latest/', None),
230 'ipyparallel': ('https://ipyparallel.readthedocs.io/en/latest/', None),
230 'jupyter': ('https://jupyter.readthedocs.io/en/latest/', None),
231 'jupyter': ('https://jupyter.readthedocs.io/en/latest/', None),
231 'jedi': ('https://jedi.readthedocs.io/en/latest/', None),
232 'jedi': ('https://jedi.readthedocs.io/en/latest/', None),
232 'traitlets': ('https://traitlets.readthedocs.io/en/latest/', None),
233 'traitlets': ('https://traitlets.readthedocs.io/en/latest/', None),
233 'ipykernel': ('https://ipykernel.readthedocs.io/en/latest/', None),
234 'ipykernel': ('https://ipykernel.readthedocs.io/en/latest/', None),
234 'prompt_toolkit' : ('https://python-prompt-toolkit.readthedocs.io/en/stable/', None),
235 'prompt_toolkit' : ('https://python-prompt-toolkit.readthedocs.io/en/stable/', None),
235 'ipywidgets': ('https://ipywidgets.readthedocs.io/en/stable/', None),
236 'ipywidgets': ('https://ipywidgets.readthedocs.io/en/stable/', None),
236 'ipyparallel': ('https://ipyparallel.readthedocs.io/en/stable/', None)
237 'ipyparallel': ('https://ipyparallel.readthedocs.io/en/stable/', None)
237 }
238 }
238
239
239 # Options for LaTeX output
240 # Options for LaTeX output
240 # ------------------------
241 # ------------------------
241
242
242 # The paper size ('letter' or 'a4').
243 # The paper size ('letter' or 'a4').
243 latex_paper_size = 'letter'
244 latex_paper_size = 'letter'
244
245
245 # The font size ('10pt', '11pt' or '12pt').
246 # The font size ('10pt', '11pt' or '12pt').
246 latex_font_size = '11pt'
247 latex_font_size = '11pt'
247
248
248 # Grouping the document tree into LaTeX files. List of tuples
249 # Grouping the document tree into LaTeX files. List of tuples
249 # (source start file, target name, title, author, document class [howto/manual]).
250 # (source start file, target name, title, author, document class [howto/manual]).
250
251
251 latex_documents = [
252 latex_documents = [
252 ('index', 'ipython.tex', 'IPython Documentation',
253 ('index', 'ipython.tex', 'IPython Documentation',
253 u"""The IPython Development Team""", 'manual', True),
254 u"""The IPython Development Team""", 'manual', True),
254 ('parallel/winhpc_index', 'winhpc_whitepaper.tex',
255 ('parallel/winhpc_index', 'winhpc_whitepaper.tex',
255 'Using IPython on Windows HPC Server 2008',
256 'Using IPython on Windows HPC Server 2008',
256 u"Brian E. Granger", 'manual', True)
257 u"Brian E. Granger", 'manual', True)
257 ]
258 ]
258
259
259 # The name of an image file (relative to this directory) to place at the top of
260 # The name of an image file (relative to this directory) to place at the top of
260 # the title page.
261 # the title page.
261 #latex_logo = None
262 #latex_logo = None
262
263
263 # For "manual" documents, if this is true, then toplevel headings are parts,
264 # For "manual" documents, if this is true, then toplevel headings are parts,
264 # not chapters.
265 # not chapters.
265 #latex_use_parts = False
266 #latex_use_parts = False
266
267
267 # Additional stuff for the LaTeX preamble.
268 # Additional stuff for the LaTeX preamble.
268 #latex_preamble = ''
269 #latex_preamble = ''
269
270
270 # Documents to append as an appendix to all manuals.
271 # Documents to append as an appendix to all manuals.
271 #latex_appendices = []
272 #latex_appendices = []
272
273
273 # If false, no module index is generated.
274 # If false, no module index is generated.
274 latex_use_modindex = True
275 latex_use_modindex = True
275
276
276
277
277 # Options for texinfo output
278 # Options for texinfo output
278 # --------------------------
279 # --------------------------
279
280
280 texinfo_documents = [
281 texinfo_documents = [
281 (master_doc, 'ipython', 'IPython Documentation',
282 (master_doc, 'ipython', 'IPython Documentation',
282 'The IPython Development Team',
283 'The IPython Development Team',
283 'IPython',
284 'IPython',
284 'IPython Documentation',
285 'IPython Documentation',
285 'Programming',
286 'Programming',
286 1),
287 1),
287 ]
288 ]
288
289
289 modindex_common_prefix = ['IPython.']
290 modindex_common_prefix = ['IPython.']
290
291
291
292
292 # Cleanup
293 # Cleanup
293 # -------
294 # -------
294 # delete release info to avoid pickling errors from sphinx
295 # delete release info to avoid pickling errors from sphinx
295
296
296 del iprelease
297 del iprelease
General Comments 0
You need to be logged in to leave comments. Login now