From 6bd0be6020c1657faca3f4207329a826874687b0 Mon Sep 17 00:00:00 2001 From: Sam Jirovec Date: Tue, 14 May 2024 19:13:21 -0500 Subject: [PATCH 1/6] furo theme for docs site --- AUTHORS | 1 + CONTRIBUTING.rst | 4 ---- changelog/12290.doc.rst | 1 + doc/en/{img => _static}/pytest1.png | Bin doc/en/_templates/sidebar/brand.html | 7 +++++++ doc/en/_templates/slim_searchbox.html | 14 -------------- doc/en/_templates/style.html | 4 ++++ doc/en/conf.py | 20 +++++++++++--------- doc/en/index.rst | 21 +++++++++++---------- doc/en/requirements.txt | 1 + 10 files changed, 36 insertions(+), 37 deletions(-) create mode 100644 changelog/12290.doc.rst rename doc/en/{img => _static}/pytest1.png (100%) create mode 100644 doc/en/_templates/sidebar/brand.html delete mode 100644 doc/en/_templates/slim_searchbox.html create mode 100644 doc/en/_templates/style.html diff --git a/AUTHORS b/AUTHORS index 54ed85fc732..cc53ce10d4f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -358,6 +358,7 @@ Sadra Barikbin Saiprasad Kale Samuel Colvin Samuel Dion-Girardeau +Samuel Jirovec Samuel Searles-Bryant Samuel Therrien (Avasam) Samuele Pedroni diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index d7da59c812d..0bf440da261 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -5,10 +5,6 @@ Contribution getting started Contributions are highly welcomed and appreciated. Every little bit of help counts, so do not hesitate! -.. contents:: - :depth: 2 - :backlinks: none - .. _submitfeedback: diff --git a/changelog/12290.doc.rst b/changelog/12290.doc.rst new file mode 100644 index 00000000000..07fe3babc66 --- /dev/null +++ b/changelog/12290.doc.rst @@ -0,0 +1 @@ +Updated Sphinx theme to use Furo instead of Flask, enabling Dark mode theme. diff --git a/doc/en/img/pytest1.png b/doc/en/_static/pytest1.png similarity index 100% rename from doc/en/img/pytest1.png rename to doc/en/_static/pytest1.png diff --git a/doc/en/_templates/sidebar/brand.html b/doc/en/_templates/sidebar/brand.html new file mode 100644 index 00000000000..f997c4cca5f --- /dev/null +++ b/doc/en/_templates/sidebar/brand.html @@ -0,0 +1,7 @@ + + + diff --git a/doc/en/_templates/slim_searchbox.html b/doc/en/_templates/slim_searchbox.html deleted file mode 100644 index f088ff8d312..00000000000 --- a/doc/en/_templates/slim_searchbox.html +++ /dev/null @@ -1,14 +0,0 @@ -{# - basic/searchbox.html with heading removed. -#} -{%- if pagename != "search" and builder != "singlehtml" %} - - -{%- endif %} diff --git a/doc/en/_templates/style.html b/doc/en/_templates/style.html new file mode 100644 index 00000000000..a9f0933dc69 --- /dev/null +++ b/doc/en/_templates/style.html @@ -0,0 +1,4 @@ + diff --git a/doc/en/conf.py b/doc/en/conf.py index af54b468996..ab1519aaa6a 100644 --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -221,7 +221,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = "flask" +html_theme = "furo" # 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 @@ -266,18 +266,24 @@ html_sidebars = { "index": [ - "slim_searchbox.html", + "sidebar/brand.html", + "sidebar/search.html", + "sidebar/scroll-start.html", "sidebarintro.html", "globaltoc.html", "links.html", - "sourcelink.html", + "sidebar/scroll-end.html", + "style.html", ], "**": [ - "slim_searchbox.html", + "sidebar/brand.html", + "sidebar/search.html", + "sidebar/scroll-start.html", "globaltoc.html", "relations.html", "links.html", - "sourcelink.html", + "sidebar/scroll-end.html", + "style.html", ], } @@ -337,10 +343,6 @@ ) ] -# The name of an image file (relative to this directory) to place at the top of -# the title page. -latex_logo = "img/pytest1.png" - # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. # latex_use_parts = False diff --git a/doc/en/index.rst b/doc/en/index.rst index 83eb27b0a53..cd95587b5ba 100644 --- a/doc/en/index.rst +++ b/doc/en/index.rst @@ -1,15 +1,5 @@ :orphan: -.. sidebar:: Next Open Trainings and Events - - - `Professional Testing with Python `_, via `Python Academy `_ (3 day in-depth training): - * **June 11th to 13th 2024**, Remote - * **March 4th to 6th 2025**, Leipzig, Germany / Remote - - `pytest development sprint `_, **June 17th -- 22nd 2024** - - pytest tips and tricks for a better testsuite, `Europython 2024 `_, **July 8th -- 14th 2024** (3h), Prague - - Also see :doc:`previous talks and blogposts `. - .. _features: pytest: helps you write better programs @@ -25,6 +15,17 @@ scale to support complex functional testing for applications and libraries. **PyPI package name**: :pypi:`pytest` +.. note:: + **Next Open Trainings and Events** + + - `Professional Testing with Python `_, via `Python Academy `_ (3 day in-depth training): + * **June 11th to 13th 2024**, Remote + * **March 4th to 6th 2025**, Leipzig, Germany / Remote + - `pytest development sprint `_, **June 17th -- 22nd 2024** + - pytest tips and tricks for a better testsuite, `Europython 2024 `_, **July 8th -- 14th 2024** (3h), Prague + + Also see :doc:`previous talks and blogposts `. + A quick example --------------- diff --git a/doc/en/requirements.txt b/doc/en/requirements.txt index 974988c8cf4..9b84ac14a78 100644 --- a/doc/en/requirements.txt +++ b/doc/en/requirements.txt @@ -9,3 +9,4 @@ sphinxcontrib-svg2pdfconverter # is the version that is assigned to the docs. # See https://github.com/pytest-dev/pytest/pull/10578#issuecomment-1348249045. packaging <22 +furo From 2f8a057068e3f10ae50d11a3fa86c988716c0fb1 Mon Sep 17 00:00:00 2001 From: Sam Jirovec Date: Wed, 15 May 2024 15:46:06 -0500 Subject: [PATCH 2/6] removing duplicate tocs from deprecations and reference pages --- doc/en/deprecations.rst | 4 ---- doc/en/reference/reference.rst | 3 --- 2 files changed, 7 deletions(-) diff --git a/doc/en/deprecations.rst b/doc/en/deprecations.rst index a65ea331663..bf6268a4980 100644 --- a/doc/en/deprecations.rst +++ b/doc/en/deprecations.rst @@ -7,10 +7,6 @@ This page lists all pytest features that are currently deprecated or have been r The objective is to give users a clear rationale why a certain feature has been removed, and what alternatives should be used instead. -.. contents:: - :depth: 3 - :local: - Deprecated Features ------------------- diff --git a/doc/en/reference/reference.rst b/doc/en/reference/reference.rst index 4036b7d9912..3675c7cb2ee 100644 --- a/doc/en/reference/reference.rst +++ b/doc/en/reference/reference.rst @@ -7,9 +7,6 @@ API Reference This page contains the full reference to pytest's API. -.. contents:: - :depth: 3 - :local: Constants --------- From 43f344efe54b55ff2ab75229407530593129159e Mon Sep 17 00:00:00 2001 From: Sam Jirovec Date: Thu, 16 May 2024 14:53:47 -0500 Subject: [PATCH 3/6] removing pallets references in code and config --- doc/en/conf.py | 6 ------ doc/en/requirements.txt | 1 - 2 files changed, 7 deletions(-) diff --git a/doc/en/conf.py b/doc/en/conf.py index ab1519aaa6a..6c81ad7152a 100644 --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -15,9 +15,7 @@ # # The full version, including alpha/beta/rc tags. # The short X.Y version. -import os import shutil -import sys from textwrap import dedent from typing import TYPE_CHECKING @@ -65,7 +63,6 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ - "pallets_sphinx_themes", "pygments_pytest", "sphinx.ext.autodoc", "sphinx.ext.autosummary", @@ -216,9 +213,6 @@ # -- Options for HTML output --------------------------------------------------- -sys.path.append(os.path.abspath("_themes")) -html_theme_path = ["_themes"] - # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = "furo" diff --git a/doc/en/requirements.txt b/doc/en/requirements.txt index 9b84ac14a78..5ffa099d9dc 100644 --- a/doc/en/requirements.txt +++ b/doc/en/requirements.txt @@ -1,4 +1,3 @@ -pallets-sphinx-themes pluggy>=1.5.0 pygments-pytest>=2.3.0 sphinx-removed-in>=0.2.0 From 27859836beff856c78059d7c2cf8014d60bdbf96 Mon Sep 17 00:00:00 2001 From: Sam Jirovec Date: Thu, 16 May 2024 21:23:11 -0500 Subject: [PATCH 4/6] reverting trainings to sidebar --- doc/en/index.rst | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/doc/en/index.rst b/doc/en/index.rst index cd95587b5ba..2aebb0d6b9c 100644 --- a/doc/en/index.rst +++ b/doc/en/index.rst @@ -2,6 +2,16 @@ .. _features: +.. sidebar:: **Next Open Trainings and Events** + + - `Professional Testing with Python `_, via `Python Academy `_ (3 day in-depth training): + * **June 11th to 13th 2024**, Remote + * **March 4th to 6th 2025**, Leipzig, Germany / Remote + - `pytest development sprint `_, **June 17th -- 22nd 2024** + - pytest tips and tricks for a better testsuite, `Europython 2024 `_, **July 8th -- 14th 2024** (3h), Prague + + Also see :doc:`previous talks and blogposts ` + pytest: helps you write better programs ======================================= @@ -15,18 +25,6 @@ scale to support complex functional testing for applications and libraries. **PyPI package name**: :pypi:`pytest` -.. note:: - **Next Open Trainings and Events** - - - `Professional Testing with Python `_, via `Python Academy `_ (3 day in-depth training): - * **June 11th to 13th 2024**, Remote - * **March 4th to 6th 2025**, Leipzig, Germany / Remote - - `pytest development sprint `_, **June 17th -- 22nd 2024** - - pytest tips and tricks for a better testsuite, `Europython 2024 `_, **July 8th -- 14th 2024** (3h), Prague - - Also see :doc:`previous talks and blogposts `. - - A quick example --------------- From 68b486ea2147786d98a234fadf597be3ca452968 Mon Sep 17 00:00:00 2001 From: Sam Jirovec Date: Fri, 17 May 2024 09:47:05 -0500 Subject: [PATCH 5/6] removed sphinx style and unpinned packaging version --- doc/en/conf.py | 4 ---- doc/en/requirements.txt | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/doc/en/conf.py b/doc/en/conf.py index 6c81ad7152a..e64931ae5c8 100644 --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -137,10 +137,6 @@ # output. They are ignored by default. # show_authors = False -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = "sphinx" - - # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] diff --git a/doc/en/requirements.txt b/doc/en/requirements.txt index 5ffa099d9dc..6e7221d645a 100644 --- a/doc/en/requirements.txt +++ b/doc/en/requirements.txt @@ -7,5 +7,5 @@ sphinxcontrib-svg2pdfconverter # Pin packaging because it no longer handles 'latest' version, which # is the version that is assigned to the docs. # See https://github.com/pytest-dev/pytest/pull/10578#issuecomment-1348249045. -packaging <22 +packaging furo From 6e3a9e83b9a6dcce41d051ec6a9c2899511058b4 Mon Sep 17 00:00:00 2001 From: Sam Jirovec Date: Mon, 20 May 2024 16:00:13 -0500 Subject: [PATCH 6/6] updated styles --- doc/en/_templates/style.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/en/_templates/style.html b/doc/en/_templates/style.html index a9f0933dc69..400cb75ff97 100644 --- a/doc/en/_templates/style.html +++ b/doc/en/_templates/style.html @@ -1,4 +1,7 @@