From 32a151726f90e09f2670c1909fb796049c808f3d Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:06:45 -0800 Subject: [PATCH 1/4] DEPS: Unpin pydata-sphinx-theme --- doc/source/conf.py | 2 ++ doc/source/whatsnew/v0.17.0.rst | 7 ++++--- environment.yml | 2 +- requirements-dev.txt | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 6b52b52ce5e13..56565e056e28a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -247,7 +247,9 @@ "plausible_analytics_url": "https://views.scientific-python.org/js/script.js", }, "logo": {"image_dark": "https://pandas.pydata.org/static/img/pandas_white.svg"}, + "navbar_align": "left", "navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"], + "sidebar_includehidden": False, "switcher": { "json_url": "https://pandas.pydata.org/versions.json", "version_match": switcher_version, diff --git a/doc/source/whatsnew/v0.17.0.rst b/doc/source/whatsnew/v0.17.0.rst index ec441688fc91e..7035ea2987239 100644 --- a/doc/source/whatsnew/v0.17.0.rst +++ b/doc/source/whatsnew/v0.17.0.rst @@ -727,10 +727,11 @@ be broadcast: or it can return False if broadcasting can not be done: -.. ipython:: python - :okwarning: +.. code-block:: ipython + + In [11]: np.array([1, 2, 3]) == np.array([1, 2]) - np.array([1, 2, 3]) == np.array([1, 2]) + Out[11]: False Changes to boolean comparisons vs. None ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/environment.yml b/environment.yml index e41389c7f262a..3ab844f02f82f 100644 --- a/environment.yml +++ b/environment.yml @@ -84,7 +84,7 @@ dependencies: - google-auth - natsort # DataFrame.sort_values doctest - numpydoc - - pydata-sphinx-theme=0.13 + - pydata-sphinx-theme>=0.14 - pytest-cython # doctest - sphinx - sphinx-design diff --git a/requirements-dev.txt b/requirements-dev.txt index 490e170299030..2b16ce9d0c583 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -59,7 +59,7 @@ gitdb google-auth natsort numpydoc -pydata-sphinx-theme==0.13 +pydata-sphinx-theme>=0.14 pytest-cython sphinx sphinx-design From 93afd2157f6977782e232db5f1052d1012fae69b Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Thu, 9 Nov 2023 08:50:54 -0800 Subject: [PATCH 2/4] Pin to 0.14 --- environment.yml | 2 +- requirements-dev.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index 3ab844f02f82f..a0a277c35cf7e 100644 --- a/environment.yml +++ b/environment.yml @@ -84,7 +84,7 @@ dependencies: - google-auth - natsort # DataFrame.sort_values doctest - numpydoc - - pydata-sphinx-theme>=0.14 + - pydata-sphinx-theme=0.14 - pytest-cython # doctest - sphinx - sphinx-design diff --git a/requirements-dev.txt b/requirements-dev.txt index 2b16ce9d0c583..cc1c935a7e861 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -59,7 +59,7 @@ gitdb google-auth natsort numpydoc -pydata-sphinx-theme>=0.14 +pydata-sphinx-theme==0.14 pytest-cython sphinx sphinx-design From 68c7f08182d54b2a1cd2ceb5e483c84e56856322 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Fri, 10 Nov 2023 16:48:37 +0100 Subject: [PATCH 3/4] update switcher_version --- doc/source/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 56565e056e28a..4895b2da452da 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -231,11 +231,13 @@ # further. For a list of options available for each theme, see the # documentation. -switcher_version = version if ".dev" in version: switcher_version = "dev" elif "rc" in version: switcher_version = version.split("rc", maxsplit=1)[0] + " (rc)" +else: + # only keep major.minor version number to match versions.json + switcher_version = ".".join(version.split(".")[:2]) html_theme_options = { "external_links": [], From 30438b6ff6e99d9e1f6d28bc6b39e9299cf67d78 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Mon, 11 Dec 2023 16:57:07 -0800 Subject: [PATCH 4/4] Add preferred version --- doc/source/conf.py | 2 +- web/pandas/versions.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 3808dd1cd21f2..9e8b63243d98c 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -251,11 +251,11 @@ "logo": {"image_dark": "https://pandas.pydata.org/static/img/pandas_white.svg"}, "navbar_align": "left", "navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"], - "sidebar_includehidden": False, "switcher": { "json_url": "https://pandas.pydata.org/versions.json", "version_match": switcher_version, }, + "show_version_warning_banner": True, "icon_links": [ { "name": "Mastodon", diff --git a/web/pandas/versions.json b/web/pandas/versions.json index 43efaf8ebe259..e355005c7c937 100644 --- a/web/pandas/versions.json +++ b/web/pandas/versions.json @@ -7,7 +7,8 @@ { "name": "2.1 (stable)", "version": "2.1", - "url": "https://pandas.pydata.org/docs/" + "url": "https://pandas.pydata.org/docs/", + "preferred": true }, { "name": "2.0",