1818# documentation root, use os.path.abspath to make it absolute, like shown here.
1919#
2020import os
21+
2122# import sys
2223# sys.path.insert(0, os.path.abspath('.'))
2324from pathlib import Path
2425
2526# are we running circle CI?
26- CIRCLECI = ' CIRCLECI' in os .environ
27+ CIRCLECI = " CIRCLECI" in os .environ
2728
2829# -- General configuration ------------------------------------------------
2930
3536# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3637# ones.
3738extensions = [
38- ' sphinx.ext.autodoc' ,
39- ' sphinx.ext.autosummary' ,
40- ' sphinx.ext.githubpages' ,
41- ' sphinx.ext.intersphinx' ,
42- ' sphinx.ext.mathjax' ,
43- ' sphinx.ext.viewcode' ,
44- ' IPython.sphinxext.ipython_directive' ,
45- ' IPython.sphinxext.ipython_console_highlighting' ,
46- ' matplotlib.sphinxext.plot_directive' ,
47- ' numpydoc' ,
48- ' sphinx_copybutton' ,
49- ' sphinx_gallery.gen_gallery' ,
39+ " sphinx.ext.autodoc" ,
40+ " sphinx.ext.autosummary" ,
41+ " sphinx.ext.githubpages" ,
42+ " sphinx.ext.intersphinx" ,
43+ " sphinx.ext.mathjax" ,
44+ " sphinx.ext.viewcode" ,
45+ " IPython.sphinxext.ipython_directive" ,
46+ " IPython.sphinxext.ipython_console_highlighting" ,
47+ " matplotlib.sphinxext.plot_directive" ,
48+ " numpydoc" ,
49+ " sphinx_copybutton" ,
50+ " sphinx_gallery.gen_gallery" ,
5051]
5152
5253# Configuration options for plot_directive. See:
6364
6465# Sphinx gallery configuration
6566
66- def matplotlib_reduced_latex_scraper ( block , block_vars , gallery_conf ,
67- ** kwargs ):
67+
68+ def matplotlib_reduced_latex_scraper ( block , block_vars , gallery_conf , ** kwargs ):
6869 """
6970 Reduce srcset when creating a PDF.
7071
@@ -73,56 +74,59 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
7374 """
7475 from sphinx_gallery .scrapers import matplotlib_scraper
7576
76- if gallery_conf [' builder_name' ] == ' latex' :
77- gallery_conf [' image_srcset' ] = []
77+ if gallery_conf [" builder_name" ] == " latex" :
78+ gallery_conf [" image_srcset" ] = []
7879 return matplotlib_scraper (block , block_vars , gallery_conf , ** kwargs )
7980
8081
8182sphinx_gallery_conf = {
82- 'examples_dirs' : ['../../examples' , ],
83- 'filename_pattern' : '^((?!sgskip).)*$' ,
84- 'gallery_dirs' : ['gallery' ],
85- 'doc_module' : ('data_prototype' ,),
86- 'reference_url' : {
87- 'matplotlib' : None ,
83+ "examples_dirs" : [
84+ "../../examples" ,
85+ ],
86+ "filename_pattern" : "^((?!sgskip).)*$" ,
87+ "gallery_dirs" : ["gallery" ],
88+ "doc_module" : ("data_prototype" ,),
89+ "reference_url" : {
90+ "matplotlib" : None ,
8891 },
89- ' backreferences_dir' : Path (' api' ) / Path (' _as_gen' ),
90- ' remove_config_comments' : True ,
91- ' min_reported_time' : 1 ,
92- ' thumbnail_size' : (320 , 224 ),
93- ' image_scrapers' : (matplotlib_reduced_latex_scraper , ),
92+ " backreferences_dir" : Path (" api" ) / Path (" _as_gen" ),
93+ " remove_config_comments" : True ,
94+ " min_reported_time" : 1 ,
95+ " thumbnail_size" : (320 , 224 ),
96+ " image_scrapers" : (matplotlib_reduced_latex_scraper ,),
9497 # Compression is a significant effort that we skip for local and CI builds.
95- ' compress_images' : (' thumbnails' , ' images' ) if is_release_build else (),
96- ' matplotlib_animations' : True ,
97- ' image_srcset' : ["2x" ],
98- ' junit' : ' ../test-results/sphinx-gallery/junit.xml' if CIRCLECI else '' ,
98+ " compress_images" : (" thumbnails" , " images" ) if is_release_build else (),
99+ " matplotlib_animations" : True ,
100+ " image_srcset" : ["2x" ],
101+ " junit" : " ../test-results/sphinx-gallery/junit.xml" if CIRCLECI else "" ,
99102}
100103
101104mathmpl_fontsize = 11.0
102- mathmpl_srcset = ['2x' ]
105+ mathmpl_srcset = ["2x" ]
103106
104107# Add any paths that contain templates here, relative to this directory.
105- templates_path = [' _templates' ]
108+ templates_path = [" _templates" ]
106109
107110# The suffix(es) of source filenames.
108111# You can specify multiple suffix as a list of string:
109112#
110113# source_suffix = ['.rst', '.md']
111- source_suffix = ' .rst'
114+ source_suffix = " .rst"
112115
113116# The master toctree document.
114- master_doc = ' index'
117+ master_doc = " index"
115118
116119# General information about the project.
117- project = ' data_prototype'
118- copyright = ' 2022, Thomas A Caswell'
119- author = ' Thomas A Caswell'
120+ project = " data_prototype"
121+ copyright = " 2022, Thomas A Caswell"
122+ author = " Thomas A Caswell"
120123
121124# The version info for the project you're documenting, acts as replacement for
122125# |version| and |release|, also used in various other places throughout the
123126# built documents.
124127#
125128import data_prototype
129+
126130# The short X.Y version.
127131version = data_prototype .__version__
128132# The full version, including alpha/beta/rc tags.
@@ -141,7 +145,7 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
141145exclude_patterns = []
142146
143147# The name of the Pygments (syntax highlighting) style to use.
144- pygments_style = ' sphinx'
148+ pygments_style = " sphinx"
145149
146150# If true, `todo` and `todoList` produce output, else they produce nothing.
147151todo_include_todos = False
@@ -160,32 +164,30 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
160164# documentation.
161165#
162166
163- html_theme_options = {
164- "logo" : {}
165- }
167+ html_theme_options = {"logo" : {}}
166168
167169# Add any paths that contain custom static files (such as style sheets) here,
168170# relative to this directory. They are copied after the builtin static files,
169171# so a file named "default.css" will overwrite the builtin "default.css".
170- html_static_path = [' _static' ]
172+ html_static_path = [" _static" ]
171173
172174# Custom sidebar templates, must be a dictionary that maps document names
173175# to template names.
174176#
175177# This is required for the alabaster theme
176178# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
177179html_sidebars = {
178- '**' : [
179- ' relations.html' , # needs 'show_related': True theme option to display
180- ' searchbox.html' ,
180+ "**" : [
181+ " relations.html" , # needs 'show_related': True theme option to display
182+ " searchbox.html" ,
181183 ]
182184}
183185
184186
185187# -- Options for HTMLHelp output ------------------------------------------
186188
187189# Output file base name for HTML help builder.
188- htmlhelp_basename = ' data_prototype'
190+ htmlhelp_basename = " data_prototype"
189191
190192
191193# -- Options for LaTeX output ---------------------------------------------
@@ -194,15 +196,12 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
194196 # The paper size ('letterpaper' or 'a4paper').
195197 #
196198 # 'papersize': 'letterpaper',
197-
198199 # The font size ('10pt', '11pt' or '12pt').
199200 #
200201 # 'pointsize': '10pt',
201-
202202 # Additional stuff for the LaTeX preamble.
203203 #
204204 # 'preamble': '',
205-
206205 # Latex figure (float) alignment
207206 #
208207 # 'figure_align': 'htbp',
@@ -212,19 +211,15 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
212211# (source start file, target name, title,
213212# author, documentclass [howto, manual, or own class]).
214213latex_documents = [
215- (master_doc , 'data_prototype.tex' , 'data_prototype Documentation' ,
216- 'Contributors' , 'manual' ),
214+ (master_doc , "data_prototype.tex" , "data_prototype Documentation" , "Contributors" , "manual" ),
217215]
218216
219217
220218# -- Options for manual page output ---------------------------------------
221219
222220# One entry per manual page. List of tuples
223221# (source start file, name, description, authors, manual section).
224- man_pages = [
225- (master_doc , 'data_prototype' , 'data_prototype Documentation' ,
226- [author ], 1 )
227- ]
222+ man_pages = [(master_doc , "data_prototype" , "data_prototype Documentation" , [author ], 1 )]
228223
229224
230225# -- Options for Texinfo output -------------------------------------------
@@ -233,19 +228,23 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
233228# (source start file, target name, title, author,
234229# dir menu entry, description, category)
235230texinfo_documents = [
236- (master_doc , 'data_prototype' , 'data_prototype Documentation' ,
237- author , 'data_prototype' , 'Experimental code for the upcoming Matplotlib data refactor.' ,
238- 'Miscellaneous' ),
231+ (
232+ master_doc ,
233+ "data_prototype" ,
234+ "data_prototype Documentation" ,
235+ author ,
236+ "data_prototype" ,
237+ "Experimental code for the upcoming Matplotlib data refactor." ,
238+ "Miscellaneous" ,
239+ ),
239240]
240241
241242
242-
243-
244243# Example configuration for intersphinx: refer to the Python standard library.
245244intersphinx_mapping = {
246- ' python' : (' https://docs.python.org/3/' , None ),
247- ' numpy' : (' https://numpy.org/doc/stable/' , None ),
248- ' scipy' : (' https://docs.scipy.org/doc/scipy/reference/' , None ),
249- ' pandas' : (' https://pandas.pydata.org/pandas-docs/stable' , None ),
250- ' matplotlib' : (' https://matplotlib.org/stable' , None ),
245+ " python" : (" https://docs.python.org/3/" , None ),
246+ " numpy" : (" https://numpy.org/doc/stable/" , None ),
247+ " scipy" : (" https://docs.scipy.org/doc/scipy/reference/" , None ),
248+ " pandas" : (" https://pandas.pydata.org/pandas-docs/stable" , None ),
249+ " matplotlib" : (" https://matplotlib.org/stable" , None ),
251250}
0 commit comments