|
19 | 19 | # |
20 | 20 | import os |
21 | 21 | import sys |
22 | | -sys.path.insert(0, os.path.abspath('..')) |
| 22 | + |
| 23 | +sys.path.insert(0, os.path.abspath("..")) |
23 | 24 |
|
24 | 25 | import schimpy |
| 26 | + |
25 | 27 | tls_verify = False |
26 | 28 | # 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: |
30 | 32 | # sys.modules[mod_name] = mock.Mock() |
31 | 33 |
|
32 | 34 | # -- General configuration --------------------------------------------- |
33 | 35 |
|
34 | 36 | # If your documentation needs a minimal Sphinx version, state it here. |
35 | 37 | # |
36 | 38 | # needs_sphinx = '1.0' |
37 | | - |
38 | 39 |
|
39 | 40 |
|
40 | 41 | # Add any Sphinx extension module names here, as strings. They can be |
41 | 42 | # 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 | +] |
51 | 56 |
|
52 | 57 | # Figure configuration |
53 | 58 | numfig = True |
54 | 59 | numfig_number_figures = True |
55 | 60 | numfig_figure_caption_prefix = "Figure" |
56 | 61 |
|
57 | 62 | 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"] |
61 | 66 | numpydoc_class_members_toctree = False |
62 | 67 |
|
63 | 68 | # Add any paths that contain templates here, relative to this directory. |
64 | | -templates_path = ['_templates'] |
| 69 | +templates_path = ["_templates"] |
65 | 70 |
|
66 | 71 | # 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 | +} |
71 | 77 |
|
72 | 78 | # The suffix(es) of source filenames. |
73 | 79 | # You can specify multiple suffix as a list of string: |
74 | 80 | # |
75 | 81 | # source_suffix = ['.rst', '.md'] |
76 | | -source_suffix = '.rst' |
| 82 | +source_suffix = ".rst" |
77 | 83 |
|
78 | 84 | # The master toctree document. |
79 | | -master_doc = 'index' |
80 | | - |
| 85 | +master_doc = "index" |
81 | 86 |
|
82 | 87 |
|
83 | 88 | # General information about the project. |
84 | | -project = 'schimpy' |
| 89 | +project = "schimpy" |
85 | 90 | copyright = "2020, California Department of Water Resources" |
86 | 91 | author = "Eli Ateljevich, Kijin Nam, Nicky Sandhu" |
87 | 92 |
|
|
99 | 104 | # |
100 | 105 | # This is also used if you do content translation via gettext catalogs. |
101 | 106 | # Usually you set "language" from the command line for these cases. |
102 | | -language = 'en' |
| 107 | +language = "en" |
103 | 108 |
|
104 | 109 | # List of patterns, relative to source directory, that match files and |
105 | 110 | # directories to ignore when looking for source files. |
106 | | -exclude_patterns = ['*test*'] |
| 111 | +exclude_patterns = ["*test*"] |
107 | 112 | # 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 | +] |
110 | 121 |
|
111 | 122 | # The name of the Pygments (syntax highlighting) style to use. |
112 | | -pygments_style = 'sphinx' |
| 123 | +pygments_style = "sphinx" |
113 | 124 |
|
114 | 125 | # If true, `todo` and `todoList` produce output, else they produce nothing. |
115 | 126 | todo_include_todos = False |
|
123 | 134 |
|
124 | 135 | import sphinx_rtd_theme |
125 | 136 |
|
126 | | -html_theme = 'sphinx_rtd_theme' |
| 137 | +html_theme = "sphinx_rtd_theme" |
127 | 138 | html_logo = "./_static/dwr_logo_small.png" |
128 | 139 | 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", |
132 | 143 | } |
133 | 144 |
|
134 | 145 | # Theme options are theme-specific and customize the look and feel of a |
|
138 | 149 | # Add any paths that contain custom static files (such as style sheets) here, |
139 | 150 | # relative to this directory. They are copied after the builtin static files, |
140 | 151 | # so a file named "default.css" will overwrite the builtin "default.css". |
141 | | -html_static_path = ['_static'] |
| 152 | +html_static_path = ["_static"] |
142 | 153 |
|
143 | 154 |
|
144 | 155 | # -- Options for HTMLHelp output --------------------------------------- |
145 | 156 |
|
146 | 157 | # Output file base name for HTML help builder. |
147 | | -htmlhelp_basename = 'schimpydoc' |
| 158 | +htmlhelp_basename = "schimpydoc" |
148 | 159 |
|
149 | 160 |
|
150 | 161 | # -- Options for LaTeX output ------------------------------------------ |
|
153 | 164 | # The paper size ('letterpaper' or 'a4paper'). |
154 | 165 | # |
155 | 166 | # 'papersize': 'letterpaper', |
156 | | - |
157 | 167 | # The font size ('10pt', '11pt' or '12pt'). |
158 | 168 | # |
159 | 169 | # 'pointsize': '10pt', |
160 | | - |
161 | 170 | # Additional stuff for the LaTeX preamble. |
162 | 171 | # |
163 | 172 | # 'preamble': '', |
164 | | - |
165 | 173 | # Latex figure (float) alignment |
166 | 174 | # |
167 | 175 | # 'figure_align': 'htbp', |
|
171 | 179 | # (source start file, target name, title, author, documentclass |
172 | 180 | # [howto, manual, or own class]). |
173 | 181 | 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 | + ), |
177 | 189 | ] |
178 | 190 |
|
179 | 191 |
|
180 | 192 | # -- Options for manual page output ------------------------------------ |
181 | 193 |
|
182 | 194 | # One entry per manual page. List of tuples |
183 | 195 | # (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)] |
189 | 197 |
|
190 | 198 |
|
191 | 199 | # -- Options for Texinfo output ---------------------------------------- |
|
194 | 202 | # (source start file, target name, title, author, |
195 | 203 | # dir menu entry, description, category) |
196 | 204 | 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 | + ), |
203 | 214 | ] |
204 | | - |
205 | | - |
206 | | - |
|
0 commit comments