diff --git a/ci/deps/travis-36-doc.yaml b/ci/deps/travis-36-doc.yaml index 6f33bc58a8b21..45ba1671b2507 100644 --- a/ci/deps/travis-36-doc.yaml +++ b/ci/deps/travis-36-doc.yaml @@ -34,6 +34,7 @@ dependencies: - scipy - seaborn - sphinx + - sphinx_rtd_theme - sqlalchemy - statsmodels - xarray diff --git a/doc/source/conf.py b/doc/source/conf.py index c59d28a6dc3ea..feb924ac41099 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -193,7 +193,7 @@ # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. -html_theme = 'nature_with_gtoc' +html_theme = 'sphinx_rtd_theme' # The style sheet to use for HTML and HTML Help pages. A file of that name # must exist either in Sphinx' static/ path, or in one of the custom paths @@ -203,10 +203,13 @@ # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -# html_theme_options = {} +html_theme_options = { + 'collapse_navigation': False, + 'navigation_depth': 2, +} # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = ['themes'] +# html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". diff --git a/doc/source/themes/nature_with_gtoc/layout.html b/doc/source/themes/nature_with_gtoc/layout.html deleted file mode 100644 index a2106605c5562..0000000000000 --- a/doc/source/themes/nature_with_gtoc/layout.html +++ /dev/null @@ -1,108 +0,0 @@ -{# - -Subset of agogo theme -agogo/layout.html - -Sphinx layout template for the agogo theme, originally written -by Andi Albrecht. - -:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. -:license: BSD, see LICENSE for details. -#} -{% extends "basic/layout.html" %} - -{%- block content %} -
-
-
-
- {%- block sidebar1 %} - {%- block sidebartoc %} -

{{ _('Table Of Contents') }}

- {{ toctree() }} - {%- endblock %} - {%- block sidebarsearch %} -

{{ _('Search') }}

- - -

- {{ _('Enter search terms or a module, class or function name.') }} -

- -
- {%- endblock %} - {# possible location for sidebar #} {% endblock %} - - - {%- block document %} -
- {%- if render_sidebar %} -
- {%- endif %} -
- {% block body %} {% endblock %} -
- {%- if render_sidebar %} -
- {%- endif %} -
- {%- endblock %} - - {%- block sidebar2 %} - - {% endblock %} -
-
-
-
-{%- endblock %} - -{%- block footer %} - -Scroll To Top - - -{% endblock %} \ No newline at end of file diff --git a/doc/source/themes/nature_with_gtoc/static/nature.css_t b/doc/source/themes/nature_with_gtoc/static/nature.css_t deleted file mode 100644 index 4571d97ec50ba..0000000000000 --- a/doc/source/themes/nature_with_gtoc/static/nature.css_t +++ /dev/null @@ -1,356 +0,0 @@ -/* - * nature.css_t - * ~~~~~~~~~~~~ - * - * Sphinx stylesheet -- nature theme. - * - * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: Arial, sans-serif; - font-size: 100%; - background-color: #111; - color: #555; - margin: 0; - padding: 0; -} - - -div.documentwrapper { - width: 100%; -} - -div.bodywrapper { -/* ugly hack, probably not attractive with other font size for re*/ - margin: 0 0 0 {{ theme_sidebarwidth|toint}}px; - min-width: 540px; - max-width: 800px; -} - - -hr { - border: 1px solid #B1B4B6; -} - -div.document { - background-color: #eee; -} - -div.body { - background-color: #ffffff; - color: #3E4349; - padding: 0 30px 30px 30px; - font-size: 0.9em; -} - -div.footer { - color: #555; - width: 100%; - padding: 13px 0; - text-align: center; - font-size: 75%; -} - -div.footer a { - color: #444; - text-decoration: underline; -} - -div.related { - background-color: #6BA81E; - line-height: 32px; - color: #fff; - text-shadow: 0px 1px 0 #444; - font-size: 0.9em; -} - -div.related a { - color: #E2F3CC; -} - -div.sphinxsidebar { - font-size: 0.75em; - line-height: 1.5em; - width: {{ theme_sidebarwidth|toint }}px; - margin: 0 ; - float: left; - - background-color: #eee; -} -/* -div.sphinxsidebarwrapper{ - padding: 20px 0; -} -*/ -div.sphinxsidebar h3, -div.sphinxsidebar h4 { - font-family: Arial, sans-serif; - color: #222; - font-size: 1.2em; - font-weight: normal; - margin: 20px 0 0 0; - padding: 5px 10px; - background-color: #ddd; - text-shadow: 1px 1px 0 white -} - -div.sphinxsidebar h4{ - font-size: 1.1em; -} - -div.sphinxsidebar h3 a { - color: #444; -} - - -div.sphinxsidebar p { - color: #888; -/* padding: 5px 20px;*/ -} - -div.sphinxsidebar p.searchtip { - color: #888; - padding: 5px 20px; -} - - -div.sphinxsidebar p.topless { -} - -div.sphinxsidebar ul { - margin: 10px 20px; - padding: 0; - color: #000; -} - -div.sphinxsidebar a { - color: #444; -} - -div.sphinxsidebar input { - border: 1px solid #ccc; - font-family: sans-serif; - font-size: 1em; -} - -div.sphinxsidebar input[type=text]{ - margin-left: 20px; -} - -/* -- body styles ----------------------------------------------------------- */ - -a { - color: #005B81; - text-decoration: none; -} - -a:hover { - color: #E32E00; - text-decoration: underline; -} - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: Arial, sans-serif; - background-color: #BED4EB; - font-weight: normal; - color: #212224; - margin: 30px 0px 10px 0px; - padding: 5px 0 5px 10px; - text-shadow: 0px 1px 0 white -} - -div.body h1 { border-top: 20px solid white; margin-top: 0; font-size: 200%; } -div.body h2 { font-size: 150%; background-color: #C8D5E3; } -div.body h3 { font-size: 120%; background-color: #D8DEE3; } -div.body h4 { font-size: 110%; background-color: #D8DEE3; } -div.body h5 { font-size: 100%; background-color: #D8DEE3; } -div.body h6 { font-size: 100%; background-color: #D8DEE3; } - -p.rubric { - border-bottom: 1px solid rgb(201, 201, 201); -} - -a.headerlink { - color: #c60f0f; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - background-color: #c60f0f; - color: white; -} - -div.body p, div.body dd, div.body li { - line-height: 1.5em; -} - -div.admonition p.admonition-title + p, div.deprecated p { - display: inline; -} - -div.deprecated { - margin-bottom: 10px; - margin-top: 10px; - padding: 7px; - background-color: #ffe4e4; - border: 1px solid #f66; -} - -div.highlight{ - background-color: white; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre { - padding: 10px; - background-color: rgb(250,250,250); - color: #222; - line-height: 1.2em; - border: 1px solid rgb(201,201,201); - font-size: 1.1em; - margin: 1.5em 0 1.5em 0; - -webkit-box-shadow: 1px 1px 1px #d8d8d8; - -moz-box-shadow: 1px 1px 1px #d8d8d8; -} - -tt { - background-color: #ecf0f3; - color: #222; - /* padding: 1px 2px; */ - font-size: 1.1em; - font-family: monospace; -} - -.viewcode-back { - font-family: Arial, sans-serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} - - -/** - * Styling for field lists - */ - - /* grey highlighting of 'parameter' and 'returns' field */ -table.field-list { - border-collapse: separate; - border-spacing: 10px; - margin-left: 1px; - /* border-left: 5px solid rgb(238, 238, 238) !important; */ -} - -table.field-list th.field-name { - /* display: inline-block; */ - padding: 1px 8px 1px 5px; - white-space: nowrap; - background-color: rgb(238, 238, 238); -} - -/* italic font for parameter types */ -table.field-list td.field-body > p { - font-style: italic; -} - -table.field-list td.field-body > p > strong { - font-style: normal; -} - -/* reduced space around parameter description */ -td.field-body blockquote { - border-left: none; - margin: 0em 0em 0.3em; - padding-left: 30px; -} - -// Adapted from the new Jupyter notebook style -// https://github.com/jupyter/notebook/blob/c8841b68c4c0739bbee1291e0214771f24194079/notebook/static/notebook/less/renderedhtml.less#L59 -table { - margin-left: auto; - margin-right: auto; - border: none; - border-collapse: collapse; - border-spacing: 0; - color: @rendered_html_border_color; - table-layout: fixed; -} -thead { - border-bottom: 1px solid @rendered_html_border_color; - vertical-align: bottom; -} -tr, th, td { - vertical-align: middle; - padding: 0.5em 0.5em; - line-height: normal; - white-space: normal; - max-width: none; - border: none; -} -th { - font-weight: bold; -} -th.col_heading { - text-align: right; -} -tbody tr:nth-child(odd) { - background: #f5f5f5; -} - -table td.data, table th.row_heading table th.col_heading { - font-family: monospace; - text-align: right; -} - - -/** - * See also - */ - -div.seealso dd { - margin-top: 0; - margin-bottom: 0; -} diff --git a/doc/source/themes/nature_with_gtoc/theme.conf b/doc/source/themes/nature_with_gtoc/theme.conf deleted file mode 100644 index 290a07bde8806..0000000000000 --- a/doc/source/themes/nature_with_gtoc/theme.conf +++ /dev/null @@ -1,7 +0,0 @@ -[theme] -inherit = basic -stylesheet = nature.css -pygments_style = tango - -[options] -sidebarwidth = 270 diff --git a/environment.yml b/environment.yml index c1669c9f49017..c20a3c0b4af6a 100644 --- a/environment.yml +++ b/environment.yml @@ -22,6 +22,7 @@ dependencies: - pytest>=4.0.2 - pytest-mock - sphinx + - sphinx_rtd_theme - numpydoc # optional diff --git a/requirements-dev.txt b/requirements-dev.txt index be84c6f29fdeb..18b9fbb6b2ed0 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -13,6 +13,7 @@ moto pytest>=4.0.2 pytest-mock sphinx +sphinx_rtd_theme numpydoc beautifulsoup4>=4.2.1 blosc