From 429af8bf5ea902c28f61987eb8a87cd8ee11ac01 Mon Sep 17 00:00:00 2001
From: Pierre Augier <pierre.augier@univ-grenoble-alpes.fr>
Date: Sun, 26 Feb 2023 13:51:05 +0100
Subject: [PATCH] Change default for launch_buttons.binderhub_url to "" (thus
 no launch buttons) (#1944)

* Change default for launch_buttons.binderhub_url to "" (thus no launch buttons)

* Try to fix tests after changing default_config.yml
---
 jupyter_book/default_config.yml                                 | 2 +-
 tests/test_config/test_config_sphinx_command.txt                | 2 +-
 .../test_config_sphinx_command_only_build_toc_files.txt         | 2 +-
 .../test_get_final_config_custom_myst_extensions.yml            | 2 +-
 tests/test_config/test_get_final_config_empty_.yml              | 2 +-
 tests/test_config/test_get_final_config_exclude_patterns_.yml   | 2 +-
 tests/test_config/test_get_final_config_execute_method_.yml     | 2 +-
 tests/test_config/test_get_final_config_extended_syntax_.yml    | 2 +-
 tests/test_config/test_get_final_config_html_extra_footer_.yml  | 2 +-
 tests/test_config/test_get_final_config_latex_doc_.yml          | 2 +-
 tests/test_config/test_get_final_config_repository_.yml         | 2 +-
 tests/test_config/test_get_final_config_title_.yml              | 2 +-
 tests/test_config/test_mathjax_config_warning.sphinx4.yml       | 2 +-
 .../test_mathjax_config_warning_mathjax2path.sphinx4.yml        | 2 +-
 14 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/jupyter_book/default_config.yml b/jupyter_book/default_config.yml
index 03573a3e..f790e4e4 100644
--- a/jupyter_book/default_config.yml
+++ b/jupyter_book/default_config.yml
@@ -72,7 +72,7 @@ latex:
 # Launch button settings
 launch_buttons:
   notebook_interface        : classic  # The interface interactive links will activate ["classic", "jupyterlab"]
-  binderhub_url             : https://mybinder.org  # The URL of the BinderHub (e.g., https://mybinder.org)
+  binderhub_url             : ""  # The URL of the BinderHub (e.g., https://mybinder.org)
   jupyterhub_url            : ""  # The URL of the JupyterHub (e.g., https://datahub.berkeley.edu)
   thebe                     : false  # Add a thebe button to pages (requires the repository to run on Binder)
   colab_url                 : "" # The URL of Google Colab (https://colab.research.google.com)
diff --git a/tests/test_config/test_config_sphinx_command.txt b/tests/test_config/test_config_sphinx_command.txt
index 8609dac2..a2e1137a 100644
--- a/tests/test_config/test_config_sphinx_command.txt
+++ b/tests/test_config/test_config_sphinx_command.txt
@@ -19,7 +19,7 @@ html_favicon = ''
 html_logo = ''
 html_sourcelink_suffix = ''
 html_theme = 'sphinx_book_theme'
-html_theme_options = {'search_bar_text': 'Search this book...', 'launch_buttons': {'notebook_interface': 'classic', 'binderhub_url': 'https://mybinder.org', 'jupyterhub_url': '', 'thebe': False, 'colab_url': ''}, 'path_to_docs': '', 'repository_url': 'https://github.com/executablebooks/jupyter-book', 'repository_branch': 'master', 'google_analytics_id': '', 'extra_navbar': 'Powered by <a href="https://jupyterbook.org">Jupyter Book</a>', 'extra_footer': '', 'home_page_in_toc': True, 'announcement': '', 'use_repository_button': False, 'use_edit_page_button': False, 'use_issues_button': False}
+html_theme_options = {'search_bar_text': 'Search this book...', 'launch_buttons': {'notebook_interface': 'classic', 'binderhub_url': '', 'jupyterhub_url': '', 'thebe': False, 'colab_url': ''}, 'path_to_docs': '', 'repository_url': 'https://github.com/executablebooks/jupyter-book', 'repository_branch': 'master', 'google_analytics_id': '', 'extra_navbar': 'Powered by <a href="https://jupyterbook.org">Jupyter Book</a>', 'extra_footer': '', 'home_page_in_toc': True, 'announcement': '', 'use_repository_button': False, 'use_edit_page_button': False, 'use_issues_button': False}
 html_title = 'test'
 jupyter_cache = ''
 jupyter_execute_notebooks = 'auto'
diff --git a/tests/test_config/test_config_sphinx_command_only_build_toc_files.txt b/tests/test_config/test_config_sphinx_command_only_build_toc_files.txt
index 1897d367..be3c2092 100644
--- a/tests/test_config/test_config_sphinx_command_only_build_toc_files.txt
+++ b/tests/test_config/test_config_sphinx_command_only_build_toc_files.txt
@@ -19,7 +19,7 @@ html_favicon = ''
 html_logo = ''
 html_sourcelink_suffix = ''
 html_theme = 'sphinx_book_theme'
-html_theme_options = {'search_bar_text': 'Search this book...', 'launch_buttons': {'notebook_interface': 'classic', 'binderhub_url': 'https://mybinder.org', 'jupyterhub_url': '', 'thebe': False, 'colab_url': ''}, 'path_to_docs': '', 'repository_url': 'https://github.com/executablebooks/jupyter-book', 'repository_branch': 'master', 'google_analytics_id': '', 'extra_navbar': 'Powered by <a href="https://jupyterbook.org">Jupyter Book</a>', 'extra_footer': '', 'home_page_in_toc': True, 'announcement': '', 'use_repository_button': False, 'use_edit_page_button': False, 'use_issues_button': False}
+html_theme_options = {'search_bar_text': 'Search this book...', 'launch_buttons': {'notebook_interface': 'classic', 'binderhub_url': '', 'jupyterhub_url': '', 'thebe': False, 'colab_url': ''}, 'path_to_docs': '', 'repository_url': 'https://github.com/executablebooks/jupyter-book', 'repository_branch': 'master', 'google_analytics_id': '', 'extra_navbar': 'Powered by <a href="https://jupyterbook.org">Jupyter Book</a>', 'extra_footer': '', 'home_page_in_toc': True, 'announcement': '', 'use_repository_button': False, 'use_edit_page_button': False, 'use_issues_button': False}
 html_title = 'My Jupyter Book'
 jupyter_cache = ''
 jupyter_execute_notebooks = 'auto'
diff --git a/tests/test_config/test_get_final_config_custom_myst_extensions.yml b/tests/test_config/test_get_final_config_custom_myst_extensions.yml
index 9bac2a4e..274f725e 100644
--- a/tests/test_config/test_get_final_config_custom_myst_extensions.yml
+++ b/tests/test_config/test_get_final_config_custom_myst_extensions.yml
@@ -42,7 +42,7 @@ final:
     google_analytics_id: ''
     home_page_in_toc: true
     launch_buttons:
-      binderhub_url: https://mybinder.org
+      binderhub_url: ''
       colab_url: ''
       jupyterhub_url: ''
       notebook_interface: classic
diff --git a/tests/test_config/test_get_final_config_empty_.yml b/tests/test_config/test_get_final_config_empty_.yml
index 0babde27..d9998b0c 100644
--- a/tests/test_config/test_get_final_config_empty_.yml
+++ b/tests/test_config/test_get_final_config_empty_.yml
@@ -39,7 +39,7 @@ final:
     google_analytics_id: ''
     home_page_in_toc: true
     launch_buttons:
-      binderhub_url: https://mybinder.org
+      binderhub_url: ''
       colab_url: ''
       jupyterhub_url: ''
       notebook_interface: classic
diff --git a/tests/test_config/test_get_final_config_exclude_patterns_.yml b/tests/test_config/test_get_final_config_exclude_patterns_.yml
index cae005e2..206a24fb 100644
--- a/tests/test_config/test_get_final_config_exclude_patterns_.yml
+++ b/tests/test_config/test_get_final_config_exclude_patterns_.yml
@@ -42,7 +42,7 @@ final:
     google_analytics_id: ''
     home_page_in_toc: true
     launch_buttons:
-      binderhub_url: https://mybinder.org
+      binderhub_url: ''
       colab_url: ''
       jupyterhub_url: ''
       notebook_interface: classic
diff --git a/tests/test_config/test_get_final_config_execute_method_.yml b/tests/test_config/test_get_final_config_execute_method_.yml
index 7276c783..b336a651 100644
--- a/tests/test_config/test_get_final_config_execute_method_.yml
+++ b/tests/test_config/test_get_final_config_execute_method_.yml
@@ -41,7 +41,7 @@ final:
     google_analytics_id: ''
     home_page_in_toc: true
     launch_buttons:
-      binderhub_url: https://mybinder.org
+      binderhub_url: ''
       colab_url: ''
       jupyterhub_url: ''
       notebook_interface: classic
diff --git a/tests/test_config/test_get_final_config_extended_syntax_.yml b/tests/test_config/test_get_final_config_extended_syntax_.yml
index 8d81a10b..91d0e054 100644
--- a/tests/test_config/test_get_final_config_extended_syntax_.yml
+++ b/tests/test_config/test_get_final_config_extended_syntax_.yml
@@ -43,7 +43,7 @@ final:
     google_analytics_id: ''
     home_page_in_toc: true
     launch_buttons:
-      binderhub_url: https://mybinder.org
+      binderhub_url: ''
       colab_url: ''
       jupyterhub_url: ''
       notebook_interface: classic
diff --git a/tests/test_config/test_get_final_config_html_extra_footer_.yml b/tests/test_config/test_get_final_config_html_extra_footer_.yml
index 8ad8c839..b0851651 100644
--- a/tests/test_config/test_get_final_config_html_extra_footer_.yml
+++ b/tests/test_config/test_get_final_config_html_extra_footer_.yml
@@ -41,7 +41,7 @@ final:
     google_analytics_id: ''
     home_page_in_toc: true
     launch_buttons:
-      binderhub_url: https://mybinder.org
+      binderhub_url: ''
       colab_url: ''
       jupyterhub_url: ''
       notebook_interface: classic
diff --git a/tests/test_config/test_get_final_config_latex_doc_.yml b/tests/test_config/test_get_final_config_latex_doc_.yml
index 0e9136da..042e42ce 100644
--- a/tests/test_config/test_get_final_config_latex_doc_.yml
+++ b/tests/test_config/test_get_final_config_latex_doc_.yml
@@ -43,7 +43,7 @@ final:
     google_analytics_id: ''
     home_page_in_toc: true
     launch_buttons:
-      binderhub_url: https://mybinder.org
+      binderhub_url: ''
       colab_url: ''
       jupyterhub_url: ''
       notebook_interface: classic
diff --git a/tests/test_config/test_get_final_config_repository_.yml b/tests/test_config/test_get_final_config_repository_.yml
index 1ecff240..fad32f3c 100644
--- a/tests/test_config/test_get_final_config_repository_.yml
+++ b/tests/test_config/test_get_final_config_repository_.yml
@@ -41,7 +41,7 @@ final:
     google_analytics_id: ''
     home_page_in_toc: true
     launch_buttons:
-      binderhub_url: https://mybinder.org
+      binderhub_url: ''
       colab_url: ''
       jupyterhub_url: ''
       notebook_interface: classic
diff --git a/tests/test_config/test_get_final_config_title_.yml b/tests/test_config/test_get_final_config_title_.yml
index 7e47a265..2a17f700 100644
--- a/tests/test_config/test_get_final_config_title_.yml
+++ b/tests/test_config/test_get_final_config_title_.yml
@@ -40,7 +40,7 @@ final:
     google_analytics_id: ''
     home_page_in_toc: true
     launch_buttons:
-      binderhub_url: https://mybinder.org
+      binderhub_url: ''
       colab_url: ''
       jupyterhub_url: ''
       notebook_interface: classic
diff --git a/tests/test_config/test_mathjax_config_warning.sphinx4.yml b/tests/test_config/test_mathjax_config_warning.sphinx4.yml
index 63052520..dced3dc1 100644
--- a/tests/test_config/test_mathjax_config_warning.sphinx4.yml
+++ b/tests/test_config/test_mathjax_config_warning.sphinx4.yml
@@ -45,7 +45,7 @@ final:
     google_analytics_id: ''
     home_page_in_toc: true
     launch_buttons:
-      binderhub_url: https://mybinder.org
+      binderhub_url: ''
       colab_url: ''
       jupyterhub_url: ''
       notebook_interface: classic
diff --git a/tests/test_config/test_mathjax_config_warning_mathjax2path.sphinx4.yml b/tests/test_config/test_mathjax_config_warning_mathjax2path.sphinx4.yml
index 9dd725ec..d998872d 100644
--- a/tests/test_config/test_mathjax_config_warning_mathjax2path.sphinx4.yml
+++ b/tests/test_config/test_mathjax_config_warning_mathjax2path.sphinx4.yml
@@ -46,7 +46,7 @@ final:
     google_analytics_id: ''
     home_page_in_toc: true
     launch_buttons:
-      binderhub_url: https://mybinder.org
+      binderhub_url: ''
       colab_url: ''
       jupyterhub_url: ''
       notebook_interface: classic
-- 
GitLab