From c3593ae4318c290ba9412e402101d16de1ae6ccd Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Tue, 18 Mar 2025 11:29:09 +0000 Subject: [PATCH 1/5] Look at pydata theme --- docs/conf.py | 3 ++- pyproject.toml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 06ff71f..1c3eaee 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -122,7 +122,8 @@ # 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_rtd_theme" +html_theme = "pydata_sphinx_theme" # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, diff --git a/pyproject.toml b/pyproject.toml index 7364679..66811a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,4 +23,5 @@ optional-dependencies.docs = [ "sphinx", "sphinx-argparse<0.5", "sphinx-rtd-theme", + "pydata-sphinx-theme" ] From eeac93a13ad60773478b8555d1d14fe767b36313 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 11:31:15 +0000 Subject: [PATCH 2/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 66811a7..9590a4b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,9 +19,9 @@ classifiers = [ optional-dependencies.docs = [ "nbsphinx", "pandoc", + "pydata-sphinx-theme", "requests", "sphinx", "sphinx-argparse<0.5", "sphinx-rtd-theme", - "pydata-sphinx-theme" ] From 58827be315378486dfcf14becbf4e3d7042d7160 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Thu, 27 Mar 2025 13:12:44 +0000 Subject: [PATCH 3/5] Remove reference to sphinx rtd theme --- docs/conf.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 1c3eaee..cad708d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -52,7 +52,6 @@ # ones. extensions = [ "sphinx.ext.todo", - "sphinx_rtd_theme", "nbsphinx", "sphinx.ext.graphviz", "sphinx.ext.intersphinx", @@ -121,8 +120,7 @@ # 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 = "pydata_sphinx_theme" # Add any paths that contain custom static files (such as style sheets) here, From c744135d12e48dffd37af3ec5f14ba602b228dc4 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Thu, 27 Mar 2025 14:56:31 +0000 Subject: [PATCH 4/5] Update to sort out sidebars --- docs/conf.py | 7 +++++++ docs/contributing/contributing.rst | 9 +++++++++ docs/index.rst | 12 +----------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index cad708d..556f17d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -129,6 +129,13 @@ html_static_path = ["_static"] html_css_files = ["style.css"] +# Here we control which pages have what sidebars +html_sidebars = { + "index": [], + "overview": [], + "contributing/**": ["search-field.html", "sidebar-nav-bs.html"], +} + todo_include_todos = not read_the_docs_build diff --git a/docs/contributing/contributing.rst b/docs/contributing/contributing.rst index ae59df4..d0b8e90 100644 --- a/docs/contributing/contributing.rst +++ b/docs/contributing/contributing.rst @@ -83,3 +83,12 @@ before enabling automated checks. Please follow the `GitHub Code of Conduct `_ for respectful collaboration. + +.. toctree:: + :maxdepth: 2 + + environment + guidelines + code_style + testing + documentation diff --git a/docs/index.rst b/docs/index.rst index 69444c9..12623fe 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -15,20 +15,10 @@ models from existing recipes but with their own data. .. toctree:: :maxdepth: 1 - :caption: The Anemoi Framework + :hidden: overview - -.. toctree:: - :maxdepth: 1 - :caption: Contributing - contributing/contributing.rst - contributing/environment.rst - contributing/guidelines.rst - contributing/code_style.rst - contributing/testing.rst - contributing/documentation.rst ************** Dependencies From 27de9adf8355f2add34281e865fcb0165d053915 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Thu, 27 Mar 2025 16:41:21 +0000 Subject: [PATCH 5/5] Hide toctree and resize image --- docs/contributing/contributing.rst | 1 + docs/index.rst | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/contributing/contributing.rst b/docs/contributing/contributing.rst index d0b8e90..aa753fb 100644 --- a/docs/contributing/contributing.rst +++ b/docs/contributing/contributing.rst @@ -86,6 +86,7 @@ for respectful collaboration. .. toctree:: :maxdepth: 2 + :hidden: environment guidelines diff --git a/docs/index.rst b/docs/index.rst index 12623fe..5c16cab 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -13,13 +13,6 @@ framework it seeks to handle many of the complexities that meteorological organisations will share, allowing them to easily train models from existing recipes but with their own data. -.. toctree:: - :maxdepth: 1 - :hidden: - - overview - contributing/contributing.rst - ************** Dependencies ************** @@ -27,7 +20,7 @@ models from existing recipes but with their own data. .. raw:: html
- + Fallback image description @@ -54,4 +47,11 @@ optional dependencies. *Anemoi* is available under the open source `Apache License`__. +.. toctree:: + :maxdepth: 1 + :hidden: + + overview + contributing/contributing.rst + .. __: http://www.apache.org/licenses/LICENSE-2.0.html