|
70 | 70 | 'IPython.sphinxext.ipython_directive', |
71 | 71 | 'psyplot.sphinxext.extended_napoleon', |
72 | 72 | 'autodocsumm', |
73 | | - 'sphinx_nbexamples', |
74 | 73 | ] |
75 | 74 |
|
76 | 75 | # Add any paths that contain templates here, relative to this directory. |
77 | 76 | templates_path = ['_templates'] |
78 | 77 |
|
79 | | -# on_rtd is whether we are on readthedocs.org, this line of code grabbed from |
80 | | -# docs.readthedocs.org |
81 | | -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' |
82 | | - |
83 | 78 | # process the examples if they don't exist already |
84 | 79 | process_examples = ( |
85 | 80 | not osp.exists(osp.join(osp.dirname(__file__), 'examples'))) |
86 | 81 |
|
87 | | -if on_rtd: |
88 | | - spr.call([sys.executable] + |
89 | | - ('-m ipykernel install --user --name python3 ' |
90 | | - '--display-name python3').split()) |
91 | | - |
92 | 82 | if not osp.exists(osp.join(osp.dirname(__file__), 'api')): |
93 | 83 | spr.check_call(['bash', 'apigen.bash']) |
94 | 84 |
|
|
164 | 154 | # The theme to use for HTML and HTML Help pages. See the documentation for |
165 | 155 | # a list of builtin themes. |
166 | 156 |
|
167 | | -if not on_rtd: # only import and set the theme if we're building docs locally |
168 | | - import sphinx_rtd_theme |
169 | | - html_theme = 'sphinx_rtd_theme' |
170 | | - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
171 | | - |
172 | | - # Add any paths that contain custom static files (such as style sheets) |
173 | | - # here, relative to this directory. They are copied after the builtin |
174 | | - # static files, so a file named "default.css" will overwrite the builtin |
175 | | - # "default.css". |
176 | | - html_static_path = ['_static'] |
| 157 | +html_theme = 'sphinx_rtd_theme' |
177 | 158 |
|
178 | | -# otherwise, readthedocs.org uses their theme by default, so no need to specify |
| 159 | +# Add any paths that contain custom static files (such as style sheets) |
| 160 | +# here, relative to this directory. They are copied after the builtin |
| 161 | +# static files, so a file named "default.css" will overwrite the builtin |
| 162 | +# "default.css". |
| 163 | +html_static_path = ['_static'] |
179 | 164 |
|
180 | 165 | # Output file base name for HTML help builder. |
181 | 166 | htmlhelp_basename = 'psy-simpledoc' |
|
231 | 216 |
|
232 | 217 | # Example configuration for intersphinx: refer to the Python standard library. |
233 | 218 | intersphinx_mapping = { |
234 | | - 'pandas': ('http://pandas.pydata.org/pandas-docs/stable/', None), |
| 219 | + 'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None), |
235 | 220 | 'numpy': ('https://docs.scipy.org/doc/numpy/', None), |
236 | | - 'matplotlib': ('http://matplotlib.org/', None), |
237 | | - 'sphinx': ('http://www.sphinx-doc.org/en/stable/', None), |
238 | | - 'xarray': ('http://xarray.pydata.org/en/stable/', None), |
239 | | - 'cartopy': ('http://scitools.org.uk/cartopy/docs/latest/', None), |
240 | | - 'mpl_toolkits': ('http://matplotlib.org/basemap/', None), |
241 | | - 'psyplot': ('https://psyplot.readthedocs.io/en/dev', None), |
242 | | - 'psy_maps': ( |
243 | | - 'https://psyplot.readthedocs.io/projects/psy-maps/en/latest/', None), |
244 | | - 'psy_reg': ('https://psyplot.readthedocs.io/projects/psy-reg/en/latest/', |
245 | | - None), |
| 221 | + 'matplotlib': ('https://matplotlib.org/stable/', None), |
| 222 | + 'sphinx': ('https://www.sphinx-doc.org/en/stable/', None), |
| 223 | + 'xarray': ('https://xarray.pydata.org/en/stable/', None), |
| 224 | + 'cartopy': ('https://scitools.org.uk/cartopy/docs/latest/', None), |
| 225 | + 'mpl_toolkits': ('https://matplotlib.org/basemap/', None), |
| 226 | + 'psyplot': ('https://psyplot.github.io/psyplot/', None), |
| 227 | + 'psy_maps': ('https://psyplot.github.io/psy-maps/', None), |
| 228 | + 'psy_reg': ('https://psyplot.github.io/psy-reg/', None), |
| 229 | + 'python': ('https://docs.python.org/3/', None), |
246 | 230 | } |
247 | | -if six.PY3: |
248 | | - intersphinx_mapping['python'] = ('https://docs.python.org/3.7/', None) |
249 | | -else: |
250 | | - intersphinx_mapping['python'] = ('https://docs.python.org/2.7/', None) |
251 | 231 |
|
252 | 232 |
|
253 | 233 | def group_formatoptions(app, what, name, obj, section, parent): |
|
0 commit comments