From e23d35f3528a0fe15ff6a709cd17b5edc8720264 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Fri, 3 Mar 2023 11:37:45 -0500 Subject: [PATCH 1/9] MAINT: Compatibility with pydata-sphinx-theme --- doc/conf.py | 13 ++++++++++--- requirements/doc.txt | 3 +-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 560334d9..7d81588a 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -81,9 +81,16 @@ html_theme = "pydata_sphinx_theme" html_theme_options = { - "github_url": "https://github.com/numpy/numpydoc", "show_prev_next": False, - "navbar_end": ["search-field.html", "navbar-icon-links.html"], + "navbar_end": ["theme-switcher", "search-field.html", "navbar-icon-links.html"], + "icon_links": [ + { + "name": "GitHub", + "url": "https://github.com/numpy/numpydoc", + "icon": "fab fa-github-square", + "type": "fontawesome", + }, + ], } # NOTE: The following is required for supporting of older sphinx toolchains. # The "theme-switcher" templated should be added directly to navbar_end @@ -96,7 +103,7 @@ if packaging.version.parse(pydata_sphinx_theme.__version__) >= packaging.version.parse( "0.9.0" ): - html_theme_options["navbar_end"].insert(0, "theme-switcher") + html_theme_options["navbar_end"].insert(0, ) html_sidebars = { diff --git a/requirements/doc.txt b/requirements/doc.txt index dfc68f92..643fc9a9 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,5 +1,4 @@ numpy>=1.21 matplotlib>=3.5 pydata-sphinx-theme>=0.11 -# TODO: Remove <6 here and in actions when pydata-sphinx-theme handles sphinx 6 -sphinx>=5.2,<6 +sphinx>=5.2 From 6438487be866a06a8282731552d99125fa351186 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Fri, 3 Mar 2023 11:39:14 -0500 Subject: [PATCH 2/9] STY: Black --- doc/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 7d81588a..33db130c 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -103,7 +103,9 @@ if packaging.version.parse(pydata_sphinx_theme.__version__) >= packaging.version.parse( "0.9.0" ): - html_theme_options["navbar_end"].insert(0, ) + html_theme_options["navbar_end"].insert( + 0, + ) html_sidebars = { From 40bccc31cddf64bb292d205b29f9a5c9d0e116bb Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Fri, 3 Mar 2023 11:40:32 -0500 Subject: [PATCH 3/9] FIX: Whoops --- doc/conf.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 33db130c..e6d13af5 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -100,14 +100,6 @@ import packaging import pydata_sphinx_theme -if packaging.version.parse(pydata_sphinx_theme.__version__) >= packaging.version.parse( - "0.9.0" -): - html_theme_options["navbar_end"].insert( - 0, - ) - - html_sidebars = { "**": [], } From cb08fc88a2f7aefd60f945cf5ad61c879b1c1af5 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Fri, 3 Mar 2023 11:40:49 -0500 Subject: [PATCH 4/9] FIX: Cruft --- doc/conf.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index e6d13af5..315bac73 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -92,13 +92,6 @@ }, ], } -# NOTE: The following is required for supporting of older sphinx toolchains. -# The "theme-switcher" templated should be added directly to navbar_end -# above and the following lines removed when the minimum supported -# version of pydata_sphinx_theme is 0.9.0 -# Add version switcher for versions of pydata_sphinx_theme that support it -import packaging -import pydata_sphinx_theme html_sidebars = { "**": [], From f5bc3db326433b21b7ec8eeb93f2dcb8543e2987 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Fri, 3 Mar 2023 11:46:41 -0500 Subject: [PATCH 5/9] MAINT: Test newer sphinx --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7d7e1d4d..6da407b8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: os: [Ubuntu] python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"] sphinx-version: - ["sphinx==4.2", "sphinx==4.5", "sphinx==5.0", "sphinx>=5.0"] + ["sphinx==4.2", "sphinx==4.5", "sphinx==5.0", "sphinx>=5.0", "sphinx>=6.0"] steps: - uses: actions/checkout@v3 From e02cd4cc9a7ab681599d9420b7f043b0d797bcfa Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Fri, 3 Mar 2023 11:47:36 -0500 Subject: [PATCH 6/9] MAINT: Newer --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6da407b8..29cae0a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: os: [Ubuntu] python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"] sphinx-version: - ["sphinx==4.2", "sphinx==4.5", "sphinx==5.0", "sphinx>=5.0", "sphinx>=6.0"] + ["sphinx==4.2", "sphinx==4.5", "sphinx==5.0", "sphinx==5.3", "sphinx==6.0", "sphinx>6.0"] steps: - uses: actions/checkout@v3 From e9a1743ee491b76c46363e1e648b7244280fddad Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Fri, 3 Mar 2023 11:48:51 -0500 Subject: [PATCH 7/9] STY: YAML --- .github/workflows/test.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 29cae0a2..7ccbf9e7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,14 @@ jobs: os: [Ubuntu] python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"] sphinx-version: - ["sphinx==4.2", "sphinx==4.5", "sphinx==5.0", "sphinx==5.3", "sphinx==6.0", "sphinx>6.0"] + [ + "sphinx==4.2", + "sphinx==4.5", + "sphinx==5.0", + "sphinx==5.3", + "sphinx==6.0", + "sphinx>6.0", + ] steps: - uses: actions/checkout@v3 From 585313520f419189e6454fb7f8e9447086dc06bd Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Fri, 3 Mar 2023 11:51:19 -0500 Subject: [PATCH 8/9] FIX: Two exclude --- .github/workflows/test.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7ccbf9e7..41f9c28b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,6 +26,13 @@ jobs: "sphinx==6.0", "sphinx>6.0", ] + exclude: + - os: Ubuntu + python-version: "3.7" + sphinx-version: "sphinx==6.0" + - os: Ubuntu + python-version: "3.7" + sphinx-version: "sphinx>6.0" steps: - uses: actions/checkout@v3 From db9e8fbdf5a5f239e9a11623f57c6db0b193a2f1 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Fri, 3 Mar 2023 11:51:58 -0500 Subject: [PATCH 9/9] FIX: Indent --- .github/workflows/test.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 41f9c28b..1c7dbd2a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,13 +26,13 @@ jobs: "sphinx==6.0", "sphinx>6.0", ] - exclude: - - os: Ubuntu - python-version: "3.7" - sphinx-version: "sphinx==6.0" - - os: Ubuntu - python-version: "3.7" - sphinx-version: "sphinx>6.0" + exclude: + - os: Ubuntu + python-version: "3.7" + sphinx-version: "sphinx==6.0" + - os: Ubuntu + python-version: "3.7" + sphinx-version: "sphinx>6.0" steps: - uses: actions/checkout@v3