From 46118a3db4d151eeb5c674d67ac9bca11284463b Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Mon, 3 Jul 2023 19:48:45 +0200 Subject: [PATCH 1/2] update sphinx documentation theme --- doc/_static/theme_overrides.css | 74 --------------------------------- doc/conf.py | 15 ++++--- doc/environment.yaml | 38 ----------------- setup.py | 2 +- 4 files changed, 8 insertions(+), 121 deletions(-) delete mode 100644 doc/_static/theme_overrides.css delete mode 100644 doc/environment.yaml diff --git a/doc/_static/theme_overrides.css b/doc/_static/theme_overrides.css deleted file mode 100644 index 9b38285e..00000000 --- a/doc/_static/theme_overrides.css +++ /dev/null @@ -1,74 +0,0 @@ -/* SPDX-FileCopyrightText: 2020 - 2023 The Atlite Authors - SPDX-License-Identifier: MIT -*/ - -.wy-side-nav-search { - background-color: #eeeeee; -} - -.wy-side-nav-search .wy-dropdown>a, -.wy-side-nav-search>a { - color: rgb(34, 97, 156) -} - -.wy-side-nav-search>div.version { - color: rgb(34, 97, 156) -} - -.wy-menu-vertical header, -.wy-menu-vertical p.caption, -.rst-versions a { - color: #999999; -} - -.wy-menu-vertical a.reference:hover, -.wy-menu-vertical a.reference.internal:hover { - background: #dddddd; - color: #fff; -} - -.wy-nav-side { - background: #efefef; -} - -.wy-menu-vertical a.reference { - color: #000; -} - -.rst-versions .rst-current-version, -.wy-nav-top, -.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a:hover { - background: #002221; -} - -.wy-nav-content .highlight { - background: #ffffff; -} - -.rst-content code.literal, -.rst-content tt.literal { - color: rgb(34, 97, 156) -} - -.wy-nav-content a.reference { - color: rgb(34, 97, 156); -} - - -/* override table width restrictions */ - -@media screen and (min-width: 767px) { - .wy-table-responsive table td { - /* !important prevents the common CSS stylesheets from overriding - this as on RTD they are loaded after this stylesheet */ - white-space: normal !important; - background: rgb(250, 250, 250) !important; - } - .wy-table-responsive { - max-width: 100%; - overflow: visible !important; - } - .wy-nav-content { - max-width: 910px !important; - } -} diff --git a/doc/conf.py b/doc/conf.py index 23b64186..6d6ed7d9 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -70,7 +70,7 @@ # General information about the project. project = "atlite" author = "The Atlite Authors" -copyright = "2016-2012" + ", " + author +copyright = "2016-2023" + ", " + author documentation_title = "Atlite Documentation" # The version info for the project you're documenting, acts as replacement for @@ -145,24 +145,23 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = "sphinx_rtd_theme" +html_theme = "sphinx_book_theme" # 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 = { - "display_version": True, - "sticky_navigation": True, - # 'style_nav_header_background': '#009682', + "repository_url": "https://github.com/pypsa/atlite", + "use_repository_button": True, + "show_navbar_depth": 1, } - # These folders are copied to the documentation's HTML output -html_static_path = ["_static"] +# html_static_path = ["_static"] # These paths are either relative to html_static_path # or fully qualified paths (eg. https://...) -html_css_files = ["theme_overrides.css"] +# html_css_files = ["theme_overrides.css"] # The name for this set of Sphinx documents. If None, it defaults to diff --git a/doc/environment.yaml b/doc/environment.yaml deleted file mode 100644 index 650f0afe..00000000 --- a/doc/environment.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- - -# SPDX-FileCopyrightText: 2016 - 2023 The Atlite Authors -# -# SPDX-License-Identifier: MIT - -name: atlite -channels: -- defaults -- conda-forge -- defaults -dependencies: -- python>=3.6 - - # Recommended for pandas and xarray -- bottleneck -- numexpr - - # Following suggestion from nbsphinx documentation, install this from conda-forge -- pandoc -- ipython -- pip - -- pip: - - sphinx - - sphinx_rtd_theme - - nbsphinx - - nbsphinx_link - - scipy - - pandas>=1.0 - - xarray>=0.16.2 - - netcdf4 - - dask>=0.18.0 - - pyyaml - - geopandas - - cdsapi - - pyproj>=2.0 - - rasterio>=1.0 diff --git a/setup.py b/setup.py index 4fb0e426..348d4fa7 100644 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ "cdsapi", ], extras_require={ - "docs": ["numpydoc", "sphinx", "sphinx_rtd_theme", "nbsphinx", "nbsphinx-link"], + "docs": ["numpydoc", "sphinx", "sphinx-book-theme", "nbsphinx", "nbsphinx-link"], "dev": ["pre-commit", "pytest", "pytest-cov", "matplotlib"], }, classifiers=[ From 39f7fa71da439c282606ce85794698ddbfaa01fd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Jul 2023 17:49:47 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- setup.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 348d4fa7..70339ce4 100644 --- a/setup.py +++ b/setup.py @@ -44,7 +44,13 @@ "cdsapi", ], extras_require={ - "docs": ["numpydoc", "sphinx", "sphinx-book-theme", "nbsphinx", "nbsphinx-link"], + "docs": [ + "numpydoc", + "sphinx", + "sphinx-book-theme", + "nbsphinx", + "nbsphinx-link", + ], "dev": ["pre-commit", "pytest", "pytest-cov", "matplotlib"], }, classifiers=[