Skip to content

Commit 3579d97

Browse files
black format
1 parent 5c25e4c commit 3579d97

File tree

1 file changed

+65
-57
lines changed

1 file changed

+65
-57
lines changed

docsrc/conf.py

Lines changed: 65 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -19,69 +19,74 @@
1919
#
2020
import os
2121
import sys
22-
sys.path.insert(0, os.path.abspath('..'))
22+
23+
sys.path.insert(0, os.path.abspath(".."))
2324

2425
import schimpy
26+
2527
tls_verify = False
2628
# using mock to avoid nodepy documentation which is hard to import
27-
#import mock
28-
#MOCK_MODULES = ['nodepy']
29-
#for mod_name in MOCK_MODULES:
29+
# import mock
30+
# MOCK_MODULES = ['nodepy']
31+
# for mod_name in MOCK_MODULES:
3032
# sys.modules[mod_name] = mock.Mock()
3133

3234
# -- General configuration ---------------------------------------------
3335

3436
# If your documentation needs a minimal Sphinx version, state it here.
3537
#
3638
# needs_sphinx = '1.0'
37-
3839

3940

4041
# Add any Sphinx extension module names here, as strings. They can be
4142
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
42-
extensions = ['nbsphinx', 'sphinx.ext.mathjax',
43-
'sphinx.ext.autodoc','sphinxarg.ext', #'sphinx.ext.viewcode',
44-
'matplotlib.sphinxext.mathmpl',
45-
'matplotlib.sphinxext.plot_directive',
46-
'IPython.sphinxext.ipython_directive',
47-
'IPython.sphinxext.ipython_console_highlighting',
48-
'sphinx.ext.intersphinx',
49-
'sphinx.ext.doctest',
50-
'numpydoc']
43+
extensions = [
44+
"nbsphinx",
45+
"sphinx.ext.mathjax",
46+
"sphinx.ext.autodoc",
47+
"sphinxarg.ext", #'sphinx.ext.viewcode',
48+
"matplotlib.sphinxext.mathmpl",
49+
"matplotlib.sphinxext.plot_directive",
50+
"IPython.sphinxext.ipython_directive",
51+
"IPython.sphinxext.ipython_console_highlighting",
52+
"sphinx.ext.intersphinx",
53+
"sphinx.ext.doctest",
54+
"numpydoc",
55+
]
5156

5257
# Figure configuration
5358
numfig = True
5459
numfig_number_figures = True
5560
numfig_figure_caption_prefix = "Figure"
5661

5762
autosummary_generate = False
58-
autodoc_member_order = 'alphabetical'
59-
autodoc_mock_imports = ["numpy","nodepy"]
60-
autosummary_mock_imports = ["numpy","nodepy"]
63+
autodoc_member_order = "alphabetical"
64+
autodoc_mock_imports = ["numpy", "nodepy"]
65+
autosummary_mock_imports = ["numpy", "nodepy"]
6166
numpydoc_class_members_toctree = False
6267

6368
# Add any paths that contain templates here, relative to this directory.
64-
templates_path = ['_templates']
69+
templates_path = ["_templates"]
6570

6671
# mappings for intersphinx extension
67-
intersphinx_mapping = {'pandas': ('https://pandas.pydata.org/pandas-docs/stable',None),
68-
'python': ('https://docs.python.org/3', None),
69-
'xarray' : ('https://docs.xarray.dev/en/stable',None)
70-
}
72+
intersphinx_mapping = {
73+
"pandas": ("https://pandas.pydata.org/pandas-docs/stable", None),
74+
"python": ("https://docs.python.org/3", None),
75+
"xarray": ("https://docs.xarray.dev/en/stable", None),
76+
}
7177

7278
# The suffix(es) of source filenames.
7379
# You can specify multiple suffix as a list of string:
7480
#
7581
# source_suffix = ['.rst', '.md']
76-
source_suffix = '.rst'
82+
source_suffix = ".rst"
7783

7884
# The master toctree document.
79-
master_doc = 'index'
80-
85+
master_doc = "index"
8186

8287

8388
# General information about the project.
84-
project = 'schimpy'
89+
project = "schimpy"
8590
copyright = "2020, California Department of Water Resources"
8691
author = "Eli Ateljevich, Kijin Nam, Nicky Sandhu"
8792

@@ -99,17 +104,23 @@
99104
#
100105
# This is also used if you do content translation via gettext catalogs.
101106
# Usually you set "language" from the command line for these cases.
102-
language = 'en'
107+
language = "en"
103108

104109
# List of patterns, relative to source directory, that match files and
105110
# directories to ignore when looking for source files.
106-
exclude_patterns = ['*test*']
111+
exclude_patterns = ["*test*"]
107112
# This patterns also effect to html_static_path and html_extra_path
108-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store',
109-
'*test*','_build','**.ipynb_checkpoints']
113+
exclude_patterns = [
114+
"_build",
115+
"Thumbs.db",
116+
".DS_Store",
117+
"*test*",
118+
"_build",
119+
"**.ipynb_checkpoints",
120+
]
110121

111122
# The name of the Pygments (syntax highlighting) style to use.
112-
pygments_style = 'sphinx'
123+
pygments_style = "sphinx"
113124

114125
# If true, `todo` and `todoList` produce output, else they produce nothing.
115126
todo_include_todos = False
@@ -123,12 +134,12 @@
123134

124135
import sphinx_rtd_theme
125136

126-
html_theme = 'sphinx_rtd_theme'
137+
html_theme = "sphinx_rtd_theme"
127138
html_logo = "./_static/dwr_logo_small.png"
128139
html_theme_options = {
129-
'logo_only': True,
130-
'display_version': False,
131-
'prev_next_buttons_location': 'both'
140+
"logo_only": True,
141+
"display_version": False,
142+
"prev_next_buttons_location": "both",
132143
}
133144

134145
# Theme options are theme-specific and customize the look and feel of a
@@ -138,13 +149,13 @@
138149
# Add any paths that contain custom static files (such as style sheets) here,
139150
# relative to this directory. They are copied after the builtin static files,
140151
# so a file named "default.css" will overwrite the builtin "default.css".
141-
html_static_path = ['_static']
152+
html_static_path = ["_static"]
142153

143154

144155
# -- Options for HTMLHelp output ---------------------------------------
145156

146157
# Output file base name for HTML help builder.
147-
htmlhelp_basename = 'schimpydoc'
158+
htmlhelp_basename = "schimpydoc"
148159

149160

150161
# -- Options for LaTeX output ------------------------------------------
@@ -153,15 +164,12 @@
153164
# The paper size ('letterpaper' or 'a4paper').
154165
#
155166
# 'papersize': 'letterpaper',
156-
157167
# The font size ('10pt', '11pt' or '12pt').
158168
#
159169
# 'pointsize': '10pt',
160-
161170
# Additional stuff for the LaTeX preamble.
162171
#
163172
# 'preamble': '',
164-
165173
# Latex figure (float) alignment
166174
#
167175
# 'figure_align': 'htbp',
@@ -171,21 +179,21 @@
171179
# (source start file, target name, title, author, documentclass
172180
# [howto, manual, or own class]).
173181
latex_documents = [
174-
(master_doc, 'schimpy.tex',
175-
'schimpy Documentation',
176-
'Eli Ateljevich, Kijin Nam', 'manual'),
182+
(
183+
master_doc,
184+
"schimpy.tex",
185+
"schimpy Documentation",
186+
"Eli Ateljevich, Kijin Nam",
187+
"manual",
188+
),
177189
]
178190

179191

180192
# -- Options for manual page output ------------------------------------
181193

182194
# One entry per manual page. List of tuples
183195
# (source start file, name, description, authors, manual section).
184-
man_pages = [
185-
(master_doc, 'schimpy',
186-
'schimpy',
187-
[author], 1)
188-
]
196+
man_pages = [(master_doc, "schimpy", "schimpy", [author], 1)]
189197

190198

191199
# -- Options for Texinfo output ----------------------------------------
@@ -194,13 +202,13 @@
194202
# (source start file, target name, title, author,
195203
# dir menu entry, description, category)
196204
texinfo_documents = [
197-
(master_doc, 'schimpy',
198-
'schimpy Documentation',
199-
author,
200-
'schimpy',
201-
'Python scripts for SCHISM',
202-
'Miscellaneous'),
205+
(
206+
master_doc,
207+
"schimpy",
208+
"schimpy Documentation",
209+
author,
210+
"schimpy",
211+
"Python scripts for SCHISM",
212+
"Miscellaneous",
213+
),
203214
]
204-
205-
206-

0 commit comments

Comments
 (0)