From 690d0c080a0c04c0a314845e26a245f72a26622a Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Mon, 29 Aug 2022 21:13:06 +0530 Subject: [PATCH 01/20] test if rtd-search extension works with furo --- docs/requirements-docs.txt | 1 + docs/source/conf.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index b2c5a5e8213..e1003f96766 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,5 +1,6 @@ sphinx==5.1.1 sphinx-pypi-upload furo==2022.6.21 +readthedocs-sphinx-search sphinx-paramlinks==0.5.4 sphinxcontrib-mermaid==0.7.1 \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 037623e73f0..764df743194 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -5,7 +5,7 @@ import sys from enum import Enum from pathlib import Path -from typing import Tuple +from typing import Any, Tuple # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -46,6 +46,7 @@ "sphinx.ext.linkcode", "sphinx_paramlinks", "sphinxcontrib.mermaid", + "sphinx_search.extension", ] # Use intersphinx to reference the python builtin library docs @@ -376,7 +377,7 @@ def autodoc_skip_member(app, what, name, obj, skip, options): import telegram.ext # Needed for checking if an object is a BaseFilter -def autodoc_process_docstring(app: Sphinx, what, name: str, obj: object, options, lines): +def autodoc_process_docstring(app: Sphinx, what, name: str, obj: Any, options, lines): """We misuse this autodoc hook to get the file names & line numbers because we have access to the actual object here. """ From cfa8dab01396975ae86c837eb5f090629d5abb0e Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Mon, 29 Aug 2022 23:21:14 +0530 Subject: [PATCH 02/20] change search ranking modelled after most common search queries --- .readthedocs.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 7a2c8f32aff..2bf122e5e55 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -21,6 +21,18 @@ python: - requirements: docs/requirements-docs.txt build: - os: ubuntu-20.04 + os: ubuntu-22.04 tools: python: "3" # latest stable cpython version + +search: + ranking: # bump up rank of commonly searched pages: (default: 0, values range from -10 to 10) + telegram.bot.html: 3 + telegram.message.html: 2 + telegram.update.html: 2 + telegram.user.html: 2 + telegram.chat.html: 2 + telegram.ext.application.html: 2 + telegram.ext.filters.html: 2 + telegram.ext.callbackcontext.html: 2 + telegram.ext.inlinekeyboardbutton.html: 1 From 3b2d1f292fff4e650fc8674f4b1283b1934e731e Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Mon, 29 Aug 2022 23:22:10 +0530 Subject: [PATCH 03/20] try un-minified version of search box to improve ui --- docs/source/conf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index 764df743194..3d4dd5c530c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -259,6 +259,8 @@ man_pages = [(master_doc, "python-telegram-bot", "python-telegram-bot Documentation", [author], 1)] +rtd_sphinx_search_file_type = "un-minified" # Configuration for rtd-sphinx-search + # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples From 5f6b955819038cf35eec94c218e63768d398f61d Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Tue, 30 Aug 2022 00:17:51 +0530 Subject: [PATCH 04/20] apply theme fixes --- docs/source/_static/style_search_box.css | 82 ++++++++++++++++++++++++ docs/source/conf.py | 1 + 2 files changed, 83 insertions(+) create mode 100644 docs/source/_static/style_search_box.css diff --git a/docs/source/_static/style_search_box.css b/docs/source/_static/style_search_box.css new file mode 100644 index 00000000000..5152113e412 --- /dev/null +++ b/docs/source/_static/style_search_box.css @@ -0,0 +1,82 @@ +/* This will style PTB's search box to dark mode, otherwise the theme is broken w/ furo */ + +.search__outer { /* fullscreen search box */ + border-color: rgb(57, 61, 64); + background-color: rgb(26, 28, 29); + box-shadow: rgba(0, 0, 0, 0.09) 1px 3px 4px; +} + +/* Modify search box scrollbar colors */ +.search__outer::-webkit-scrollbar-track { + background-color: #292727; +} + +.search__outer::-webkit-scrollbar { + background-color: #292727; +} + +.search__outer::-webkit-scrollbar-thumb { + background-color: #4b4848; +} + +.search__outer .search__result__title span { /* if search result is a heading */ + background-color: #2f2f2f; + padding-bottom: 3px; + border-bottom-color: black; +} + +.outer_div_page_results:hover { /* change color when hovering over a search result */ + background-color: rgb(30, 32, 33); +} + +.search__result__single { /* The full block of a search result */ + border-bottom-color: rgb(55, 60, 62); + border-color: rgb(57, 61, 64); +} + +.search__result__subheading { /* search result subheading */ + color: rgb(232, 230, 227); +} + +.search__result__subheading span { /* search result subheading content underline */ + border-bottom-color: rgb(140, 130, 115); +} + +.search__result__content { /* This is the text that appears in the content of the results */ + color: rgb(232, 230, 227); +} + +.rtd__search__credits { /* This is the "Search by" text */ + background-image: initial; + background-color: rgb(34, 36, 38); + border-color: rgb(53, 57, 59); + color: rgb(232, 230, 227); +} + +.rtd__search__credits a { /* This is the link to the search provider */ + color: rgb(232, 230, 227); +} + +.search__result__title { /* This is the title of the search result */ + color: rgb(108, 174, 236); + border-bottom-color: rgb(18, 64, 134); +} + +.search__outer__input { /* This is the search box */ + outline-color: initial; + background-color: rgb(26, 28, 29); + border-top-color: initial; + border-right-color: initial; + border-left-color: initial; + border-bottom-color: rgb(101, 94, 83); + background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUwIiBoZWlnaHQ9IjE1MCI+PGRlZnM+PGZpbHRlciBpZD0iZGFya3JlYWRlci1pbWFnZS1maWx0ZXIiPjxmZUNvbG9yTWF0cml4IHR5cGU9Im1hdHJpe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1M0Mll6STVMalF0TXpNdU9DdzBOeTR5TFRjM0xqa3NORGN1TWkweE1qWXVNVU16T0RRdU5qVXNPRFl1TWl3eU9UZ3VNelVzTUN3eE9USXVNelVzTUVNNE5pNHlOU3d3TERBdU1EVXNPRFl1TXl3d0xqQTFMREU1TWk0ekRRb0pDWE00Tmk0ekxERTVNaTR6TERFNU1pNHpMREU1TWk0ell6UTRMaklzTUN3NU1pNHpMVEUzTGpnc01USTJMakV0TkRjdU1rdzBNamd1TURVc05EUTNZekl1Tml3eUxqWXNOaTR4TERRc09TNDFMRFJ6Tmk0NUxURXVNeXc1TGpVdE5BMEtDUWxETkRVeUxqSTFMRFEwTVM0NExEUTFNaTR5TlN3ME16TXVNaXcwTkRjdU1EVXNOREk0ZWlCTk1qWXVPVFVzTVRreUxqTmpNQzA1TVM0eUxEYzBMakl0TVRZMUxqTXNNVFkxTGpNdE1UWTFMak5qT1RFdU1pd3dMREUyTlM0ekxEYzBMaklzTVRZMUxqTXNNVFkxTGpNTkNna0pjeTAzTkM0eExERTJOUzQwTFRFMk5TNHpMREUyTlM0MFF6RXdNUzR4TlN3ek5UY3VOeXd5Tmk0NU5Td3lPRE11TlN3eU5pNDVOU3d4T1RJdU0zb2lMejROQ2p3dlp6NE5DanhuUGcwS1BDOW5QZzBLUEdjK0RRbzhMMmMrRFFvOFp6NE5Dand2Wno0TkNqeG5QZzBLUEM5blBnMEtQR2MrRFFvOEwyYytEUW84Wno0TkNqd3ZaejROQ2p4blBnMEtQQzluUGcwS1BHYytEUW84TDJjK0RRbzhaejROQ2p3dlp6NE5DanhuUGcwS1BDOW5QZzBLUEdjK0RRbzhMMmMrRFFvOFp6NE5Dand2Wno0TkNqeG5QZzBLUEM5blBnMEtQR2MrRFFvOEwyYytEUW84Wno0TkNqd3ZaejROQ2p3dmMzWm5QZzBLIiAvPjwvc3ZnPg=="); +} + +.search__error__box { /* This will style the error message when no results are found */ + color: rgb(232, 230, 227); +} + +.search__outer .search__result__content span { /* style the underlined result */ + background-color: rgb(31, 34, 35); + border-bottom-color: rgb(140, 130, 115); +} diff --git a/docs/source/conf.py b/docs/source/conf.py index 3d4dd5c530c..1d4280ed292 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -216,6 +216,7 @@ html_css_files = [ "style_external_link.css", "style_mermaid_diagrams.css", + "style_search_box.css", ] html_permalinks_icon = "¶" # Furo's default permalink icon is `#`` which doesn't look great imo. From 45783d567870250094554185aa5fd4d547e97e7b Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Tue, 30 Aug 2022 03:47:37 +0530 Subject: [PATCH 05/20] fix search priority? --- .readthedocs.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 2bf122e5e55..6bd9196a0da 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -27,12 +27,12 @@ build: search: ranking: # bump up rank of commonly searched pages: (default: 0, values range from -10 to 10) - telegram.bot.html: 3 - telegram.message.html: 2 - telegram.update.html: 2 - telegram.user.html: 2 - telegram.chat.html: 2 - telegram.ext.application.html: 2 - telegram.ext.filters.html: 2 - telegram.ext.callbackcontext.html: 2 - telegram.ext.inlinekeyboardbutton.html: 1 + '*/telegram.bot.html': 3 + '*/telegram.message.html': 2 + '*/telegram.update.html': 2 + '*/telegram.user.html': 2 + '*/telegram.chat.html': 2 + '*/telegram.ext.application.html': 2 + '*/telegram.ext.filters.html': 2 + '*/telegram.ext.callbackcontext.html': 2 + '*/telegram.ext.inlinekeyboardbutton.html': 1 From 7c8142628ced7e86222fd3aedeb3c2f56e246dfd Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Tue, 30 Aug 2022 03:48:24 +0530 Subject: [PATCH 06/20] get started on improving results --- docs/source/_static/sort_search_results.js | 11 +++++++++++ docs/source/conf.py | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 docs/source/_static/sort_search_results.js diff --git a/docs/source/_static/sort_search_results.js b/docs/source/_static/sort_search_results.js new file mode 100644 index 00000000000..154d67597e4 --- /dev/null +++ b/docs/source/_static/sort_search_results.js @@ -0,0 +1,11 @@ +const getSearchTerm = () => { + let search_outer_input = document.querySelector(".search__outer__input"); + if (search_outer_input !== null) { + let word = search_outer_input.value + if (/^[A-Z]/.test(word)) { /* if first letter is capital, assume user is searching for a class */ + return "telegram." + word || ""; /* it could also be from ext, but this works well enough */ + } + return search_outer_input.value || ""; + } + return ""; +} \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 1d4280ed292..ca6bdc2f6f6 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -218,6 +218,8 @@ "style_mermaid_diagrams.css", "style_search_box.css", ] +html_js_files = ["sort_search_results.js"] + html_permalinks_icon = "¶" # Furo's default permalink icon is `#`` which doesn't look great imo. # Output file base name for HTML help builder. From 31f9d133b0bf0d2135cf7716609435ad6c675032 Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Tue, 30 Aug 2022 21:11:52 +0530 Subject: [PATCH 07/20] modify search ranking again --- .readthedocs.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 6bd9196a0da..a41f05181a2 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -27,12 +27,14 @@ build: search: ranking: # bump up rank of commonly searched pages: (default: 0, values range from -10 to 10) - '*/telegram.bot.html': 3 - '*/telegram.message.html': 2 - '*/telegram.update.html': 2 + '*/telegram.bot.html': 4 + '*/telegram.message.html': 3 + '*/telegram.update.html': 3 '*/telegram.user.html': 2 '*/telegram.chat.html': 2 - '*/telegram.ext.application.html': 2 - '*/telegram.ext.filters.html': 2 + '*/telegram.ext.application.html': 3 + '*/telegram.ext.filters.html': 3 '*/telegram.ext.callbackcontext.html': 2 '*/telegram.ext.inlinekeyboardbutton.html': 1 + + '*/telegram.passport*.html': -6 \ No newline at end of file From d18c065f9c78f2d0ca0ff8dffdd969bb3d019658 Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Wed, 31 Aug 2022 05:45:29 +0530 Subject: [PATCH 08/20] move rtd-sphinx-search to a forked repo --- docs/requirements-docs.txt | 2 +- docs/source/_static/sort_search_results.js | 11 --- docs/source/_static/style_search_box.css | 82 ---------------------- docs/source/conf.py | 2 - 4 files changed, 1 insertion(+), 96 deletions(-) delete mode 100644 docs/source/_static/sort_search_results.js delete mode 100644 docs/source/_static/style_search_box.css diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index e1003f96766..c4d1b4b0bf4 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,6 +1,6 @@ sphinx==5.1.1 sphinx-pypi-upload furo==2022.6.21 -readthedocs-sphinx-search +git+https://github.com/harshil21/readthedocs-sphinx-search@main sphinx-paramlinks==0.5.4 sphinxcontrib-mermaid==0.7.1 \ No newline at end of file diff --git a/docs/source/_static/sort_search_results.js b/docs/source/_static/sort_search_results.js deleted file mode 100644 index 154d67597e4..00000000000 --- a/docs/source/_static/sort_search_results.js +++ /dev/null @@ -1,11 +0,0 @@ -const getSearchTerm = () => { - let search_outer_input = document.querySelector(".search__outer__input"); - if (search_outer_input !== null) { - let word = search_outer_input.value - if (/^[A-Z]/.test(word)) { /* if first letter is capital, assume user is searching for a class */ - return "telegram." + word || ""; /* it could also be from ext, but this works well enough */ - } - return search_outer_input.value || ""; - } - return ""; -} \ No newline at end of file diff --git a/docs/source/_static/style_search_box.css b/docs/source/_static/style_search_box.css deleted file mode 100644 index 5152113e412..00000000000 --- a/docs/source/_static/style_search_box.css +++ /dev/null @@ -1,82 +0,0 @@ -/* This will style PTB's search box to dark mode, otherwise the theme is broken w/ furo */ - -.search__outer { /* fullscreen search box */ - border-color: rgb(57, 61, 64); - background-color: rgb(26, 28, 29); - box-shadow: rgba(0, 0, 0, 0.09) 1px 3px 4px; -} - -/* Modify search box scrollbar colors */ -.search__outer::-webkit-scrollbar-track { - background-color: #292727; -} - -.search__outer::-webkit-scrollbar { - background-color: #292727; -} - -.search__outer::-webkit-scrollbar-thumb { - background-color: #4b4848; -} - -.search__outer .search__result__title span { /* if search result is a heading */ - background-color: #2f2f2f; - padding-bottom: 3px; - border-bottom-color: black; -} - -.outer_div_page_results:hover { /* change color when hovering over a search result */ - background-color: rgb(30, 32, 33); -} - -.search__result__single { /* The full block of a search result */ - border-bottom-color: rgb(55, 60, 62); - border-color: rgb(57, 61, 64); -} - -.search__result__subheading { /* search result subheading */ - color: rgb(232, 230, 227); -} - -.search__result__subheading span { /* search result subheading content underline */ - border-bottom-color: rgb(140, 130, 115); -} - -.search__result__content { /* This is the text that appears in the content of the results */ - color: rgb(232, 230, 227); -} - -.rtd__search__credits { /* This is the "Search by" text */ - background-image: initial; - background-color: rgb(34, 36, 38); - border-color: rgb(53, 57, 59); - color: rgb(232, 230, 227); -} - -.rtd__search__credits a { /* This is the link to the search provider */ - color: rgb(232, 230, 227); -} - -.search__result__title { /* This is the title of the search result */ - color: rgb(108, 174, 236); - border-bottom-color: rgb(18, 64, 134); -} - -.search__outer__input { /* This is the search box */ - outline-color: initial; - background-color: rgb(26, 28, 29); - border-top-color: initial; - border-right-color: initial; - border-left-color: initial; - border-bottom-color: rgb(101, 94, 83); - background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUwIiBoZWlnaHQ9IjE1MCI+PGRlZnM+PGZpbHRlciBpZD0iZGFya3JlYWRlci1pbWFnZS1maWx0ZXIiPjxmZUNvbG9yTWF0cml4IHR5cGU9Im1hdHJpeCIgdmFsdWVzPSIwLjI0OSAtMC42MTQgLTAuNjcyIDAuMDAwIDEuMDM1IC0wLjY0NiAwLjI4OCAtMC42NjQg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UZ3VNelVzTUN3eE9USXVNelVzTUVNNE5pNHlOU3d3TERBdU1EVXNPRFl1TXl3d0xqQTFMREU1TWk0ekRRb0pDWE00Tmk0ekxERTVNaTR6TERFNU1pNHpMREU1TWk0ell6UTRMaklzTUN3NU1pNHpMVEUzTGpnc01USTJMakV0TkRjdU1rdzBNamd1TURVc05EUTNZekl1Tml3eUxqWXNOaTR4TERRc09TNDFMRFJ6Tmk0NUxURXVNeXc1TGpVdE5BMEtDUWxETkRVeUxqSTFMRFEwTVM0NExEUTFNaTR5TlN3ME16TXVNaXcwTkRjdU1EVXNOREk0ZWlCTk1qWXVPVFVzTVRreUxqTmpNQzA1TVM0eUxEYzBMakl0TVRZMUxqTXNNVFkxTGpNdE1UWTFMak5qT1RFdU1pd3dMREUyTlM0ekxEYzBMaklzTVRZMUxqTXNNVFkxTGpNTkNna0pjeTAzTkM0eExERTJOUzQwTFRFMk5TNHpMREUyTlM0MFF6RXdNUzR4TlN3ek5UY3VOeXd5Tmk0NU5Td3lPRE11TlN3eU5pNDVOU3d4T1RJdU0zb2lMejROQ2p3dlp6NE5DanhuUGcwS1BDOW5QZzBLUEdjK0RRbzhMMmMrRFFvOFp6NE5Dand2Wno0TkNqeG5QZzBLUEM5blBnMEtQR2MrRFFvOEwyYytEUW84Wno0TkNqd3ZaejROQ2p4blBnMEtQQzluUGcwS1BHYytEUW84TDJjK0RRbzhaejROQ2p3dlp6NE5DanhuUGcwS1BDOW5QZzBLUEdjK0RRbzhMMmMrRFFvOFp6NE5Dand2Wno0TkNqeG5QZzBLUEM5blBnMEtQR2MrRFFvOEwyYytEUW84Wno0TkNqd3ZaejROQ2p3dmMzWm5QZzBLIiAvPjwvc3ZnPg=="); -} - -.search__error__box { /* This will style the error message when no results are found */ - color: rgb(232, 230, 227); -} - -.search__outer .search__result__content span { /* style the underlined result */ - background-color: rgb(31, 34, 35); - border-bottom-color: rgb(140, 130, 115); -} diff --git a/docs/source/conf.py b/docs/source/conf.py index ca6bdc2f6f6..a872494c952 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -216,9 +216,7 @@ html_css_files = [ "style_external_link.css", "style_mermaid_diagrams.css", - "style_search_box.css", ] -html_js_files = ["sort_search_results.js"] html_permalinks_icon = "¶" # Furo's default permalink icon is `#`` which doesn't look great imo. From a401832d702723682c239fa9b9d790ade5135f3c Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Sat, 3 Sep 2022 19:41:38 +0530 Subject: [PATCH 09/20] use minified config and trigger doc re-run --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index a872494c952..71494791f75 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -260,7 +260,7 @@ man_pages = [(master_doc, "python-telegram-bot", "python-telegram-bot Documentation", [author], 1)] -rtd_sphinx_search_file_type = "un-minified" # Configuration for rtd-sphinx-search +# rtd_sphinx_search_file_type = "un-minified" # Configuration for rtd-sphinx-search # -- Options for Texinfo output ------------------------------------------- From 1b61de35b86ad7b1f9fe7ab05bb7ecd482257836 Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Sun, 4 Sep 2022 06:53:55 +0530 Subject: [PATCH 10/20] trigger doc re-run --- docs/source/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 71494791f75..8211af558ea 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -259,7 +259,6 @@ # (source start file, name, description, authors, manual section). man_pages = [(master_doc, "python-telegram-bot", "python-telegram-bot Documentation", [author], 1)] - # rtd_sphinx_search_file_type = "un-minified" # Configuration for rtd-sphinx-search # -- Options for Texinfo output ------------------------------------------- From fc6e7c0a26cc4c6ab5f18c5bef18b31d27f2b561 Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Sun, 4 Sep 2022 20:42:59 +0530 Subject: [PATCH 11/20] use renamed fork --- docs/requirements-docs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index c4d1b4b0bf4..61a89be0c54 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,6 +1,6 @@ sphinx==5.1.1 sphinx-pypi-upload furo==2022.6.21 -git+https://github.com/harshil21/readthedocs-sphinx-search@main +git+https://github.com/harshil21/furo-sphinx-search@main sphinx-paramlinks==0.5.4 sphinxcontrib-mermaid==0.7.1 \ No newline at end of file From 46d64e0a153dbfe36f513d582b0f046d1afafad6 Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Sun, 4 Sep 2022 21:07:43 +0530 Subject: [PATCH 12/20] trigger doc re-run --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 8211af558ea..2069f489ff8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -34,7 +34,7 @@ release = "20.0a3" # telegram.__version__ # If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx = "4.5.0" +needs_sphinx = "5.1.1" # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom From 29bb0a85539eb98b2f67a69073920bda0e5fdcb8 Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Sun, 4 Sep 2022 22:43:12 +0530 Subject: [PATCH 13/20] trigger re-run 4 --- docs/source/conf.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 2069f489ff8..7009b16bf9b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -213,10 +213,7 @@ # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] -html_css_files = [ - "style_external_link.css", - "style_mermaid_diagrams.css", -] +html_css_files = ["style_external_link.css", "style_mermaid_diagrams.css"] html_permalinks_icon = "¶" # Furo's default permalink icon is `#`` which doesn't look great imo. From de858a4f067a6a4c1ae8fa80fc38705e5c052d13 Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Sat, 10 Sep 2022 02:04:26 +0530 Subject: [PATCH 14/20] ignore some files from search --- .readthedocs.yml | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index a41f05181a2..e94c78520bc 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -27,14 +27,23 @@ build: search: ranking: # bump up rank of commonly searched pages: (default: 0, values range from -10 to 10) - '*/telegram.bot.html': 4 - '*/telegram.message.html': 3 - '*/telegram.update.html': 3 - '*/telegram.user.html': 2 - '*/telegram.chat.html': 2 - '*/telegram.ext.application.html': 3 - '*/telegram.ext.filters.html': 3 - '*/telegram.ext.callbackcontext.html': 2 - '*/telegram.ext.inlinekeyboardbutton.html': 1 - - '*/telegram.passport*.html': -6 \ No newline at end of file + telegram.bot.html: 7 + telegram.message.html: 3 + telegram.update.html: 3 + telegram.user.html: 2 + telegram.chat.html: 2 + telegram.ext.application.html: 3 + telegram.ext.filters.html: 3 + telegram.ext.callbackcontext.html: 2 + telegram.ext.inlinekeyboardbutton.html: 1 + + telegram.passport*.html: -7 + + ignore: + - coc.html + - bot_methods.html + # Defaults + - search.html + - search/index.html + - 404.html + - 404/index.html' \ No newline at end of file From 17064037a485f6d01f389ee2f2af855cdb5b6919 Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Sat, 10 Sep 2022 02:24:12 +0530 Subject: [PATCH 15/20] trigger rebuild --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 7009b16bf9b..4594fec2bfe 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -256,7 +256,7 @@ # (source start file, name, description, authors, manual section). man_pages = [(master_doc, "python-telegram-bot", "python-telegram-bot Documentation", [author], 1)] -# rtd_sphinx_search_file_type = "un-minified" # Configuration for rtd-sphinx-search +# rtd_sphinx_search_file_type = "un-minified" # Configuration for furo-sphinx-search # -- Options for Texinfo output ------------------------------------------- From 6b5a4d18e148dfed4b7636734acb664a5bc9f55d Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Sat, 10 Sep 2022 02:36:41 +0530 Subject: [PATCH 16/20] last rebuild for day --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 4594fec2bfe..f33cc2ee8c8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -215,7 +215,7 @@ html_static_path = ["_static"] html_css_files = ["style_external_link.css", "style_mermaid_diagrams.css"] -html_permalinks_icon = "¶" # Furo's default permalink icon is `#`` which doesn't look great imo. +html_permalinks_icon = "¶" # Furo's default permalink icon is `#` which doesn't look great imo. # Output file base name for HTML help builder. htmlhelp_basename = "python-telegram-bot-doc" From 54b4e22c642b6368f2e5be3350b4b1cacbfab4dc Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Mon, 12 Sep 2022 01:02:41 +0530 Subject: [PATCH 17/20] review + add egg project name and one more ignored file in search --- .readthedocs.yml | 5 +++-- docs/requirements-docs.txt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index e94c78520bc..ea24216f5a4 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -40,10 +40,11 @@ search: telegram.passport*.html: -7 ignore: + - changelog.html - coc.html - - bot_methods.html + - bot_methods.html# # Defaults - search.html - search/index.html - 404.html - - 404/index.html' \ No newline at end of file + - 404/index.html' diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index 61a89be0c54..7c9b150646a 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,6 +1,6 @@ sphinx==5.1.1 sphinx-pypi-upload furo==2022.6.21 -git+https://github.com/harshil21/furo-sphinx-search@main +git+https://github.com/harshil21/furo-sphinx-search@fa07ed54336faaa4e5710733da25b31daafb6f49#egg=furo-sphinx-search sphinx-paramlinks==0.5.4 sphinxcontrib-mermaid==0.7.1 \ No newline at end of file From fad4aca32adf915c60f6b35bccbe0e76528c8a3b Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Tue, 13 Sep 2022 01:46:11 +0530 Subject: [PATCH 18/20] fix search not triggering when query present bug --- .readthedocs.yml | 1 + docs/requirements-docs.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index ea24216f5a4..bd9f8c51f93 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -43,6 +43,7 @@ search: - changelog.html - coc.html - bot_methods.html# + - bot_methods.html # Defaults - search.html - search/index.html diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index 7c9b150646a..03dfcc805e3 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,6 +1,6 @@ sphinx==5.1.1 sphinx-pypi-upload furo==2022.6.21 -git+https://github.com/harshil21/furo-sphinx-search@fa07ed54336faaa4e5710733da25b31daafb6f49#egg=furo-sphinx-search +git+https://github.com/harshil21/furo-sphinx-search@be5cfa221a01f6e259bb2bb1f76d6ede7ffc1f11#egg=furo-sphinx-search sphinx-paramlinks==0.5.4 sphinxcontrib-mermaid==0.7.1 \ No newline at end of file From f883fb6f28f6eee3b33fcb7125e1feab28bfd2c3 Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Fri, 16 Sep 2022 17:58:17 +0530 Subject: [PATCH 19/20] bump furo and use py3.11rc2 --- .github/workflows/test.yml | 6 +++--- docs/requirements-docs.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 39d414ab5c3..d7f5b7b844c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,13 +21,13 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] experimental: [false] include: - - python-version: 3.11.0-rc.1 + - python-version: 3.11.0-rc.2 os: ubuntu-latest experimental: true - - python-version: 3.11.0-rc.1 + - python-version: 3.11.0-rc.2 os: windows-latest experimental: true - - python-version: 3.11.0-rc.1 + - python-version: 3.11.0-rc.2 os: macos-latest experimental: true fail-fast: False diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index 03dfcc805e3..99dd6fe54d9 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,6 +1,6 @@ sphinx==5.1.1 sphinx-pypi-upload -furo==2022.6.21 +furo==2022.9.15 git+https://github.com/harshil21/furo-sphinx-search@be5cfa221a01f6e259bb2bb1f76d6ede7ffc1f11#egg=furo-sphinx-search sphinx-paramlinks==0.5.4 sphinxcontrib-mermaid==0.7.1 \ No newline at end of file From 27814fecf5599fc61881eb2584f0090e88c782a2 Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Sat, 17 Sep 2022 17:37:04 +0530 Subject: [PATCH 20/20] revert upgrading to py3.11rc2 here --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d7f5b7b844c..39d414ab5c3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,13 +21,13 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] experimental: [false] include: - - python-version: 3.11.0-rc.2 + - python-version: 3.11.0-rc.1 os: ubuntu-latest experimental: true - - python-version: 3.11.0-rc.2 + - python-version: 3.11.0-rc.1 os: windows-latest experimental: true - - python-version: 3.11.0-rc.2 + - python-version: 3.11.0-rc.1 os: macos-latest experimental: true fail-fast: False