From a5479ba9e365878410ead7d468e072d8164b0663 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 24 Apr 2022 16:29:43 +0900 Subject: [PATCH] Fix a bug in patching jupyter-sphinx --- .../patches/0001-Fix-a-bug-and-suppress-a-warning.patch | 6 +++--- .../0002-Use-latest-thebe-for-interact-to-work.patch | 2 +- ...-Use-SageExecuteJupyterCells-for-faster-processing.patch | 4 ++-- .../patches/0004-Prevent-unnecessary-js-injections.patch | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build/pkgs/jupyter_sphinx/patches/0001-Fix-a-bug-and-suppress-a-warning.patch b/build/pkgs/jupyter_sphinx/patches/0001-Fix-a-bug-and-suppress-a-warning.patch index 0fc91fa4d55..a17a4df8321 100644 --- a/build/pkgs/jupyter_sphinx/patches/0001-Fix-a-bug-and-suppress-a-warning.patch +++ b/build/pkgs/jupyter_sphinx/patches/0001-Fix-a-bug-and-suppress-a-warning.patch @@ -1,4 +1,4 @@ -From 1f1a767cf51627ac5bf2cf3209f44bdb32f4af46 Mon Sep 17 00:00:00 2001 +From f93e4ea3eaedd549b56bc86f27225aee2f4c847d Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 27 Mar 2022 13:33:56 -0700 Subject: [PATCH 1/4] Fix a bug and suppress a warning @@ -8,7 +8,7 @@ Subject: [PATCH 1/4] Fix a bug and suppress a warning 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/jupyter_sphinx/execute.py b/jupyter_sphinx/execute.py -index e6cc5db..7514cff 100644 +index e6cc5db..ef41337 100644 --- a/jupyter_sphinx/execute.py +++ b/jupyter_sphinx/execute.py @@ -147,11 +147,14 @@ class ExecuteJupyterCells(SphinxTransform): @@ -25,7 +25,7 @@ index e6cc5db..7514cff 100644 + warnings.simplefilter("ignore") + notebook = execute_cells( + kernel_name, -+ [nbformat.v4.new_code_cell(node.astext() if node["execute"] else "") for node in nodes], ++ [nbformat.v4.new_code_cell(node.astext() if not "execute" in node or node["execute"] else "") for node in nodes], + self.config.jupyter_execute_kwargs, + ) diff --git a/build/pkgs/jupyter_sphinx/patches/0002-Use-latest-thebe-for-interact-to-work.patch b/build/pkgs/jupyter_sphinx/patches/0002-Use-latest-thebe-for-interact-to-work.patch index 5735865c7bb..0135d3cc0fd 100644 --- a/build/pkgs/jupyter_sphinx/patches/0002-Use-latest-thebe-for-interact-to-work.patch +++ b/build/pkgs/jupyter_sphinx/patches/0002-Use-latest-thebe-for-interact-to-work.patch @@ -1,4 +1,4 @@ -From e5bedf302361f6208817cd5b656b02888feaaa8d Mon Sep 17 00:00:00 2001 +From e134aeddc5df1fe421325202a867048c04ee00ed Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 3 Apr 2022 21:24:36 +0900 Subject: [PATCH 2/4] Use latest thebe for interact to work diff --git a/build/pkgs/jupyter_sphinx/patches/0003-Use-SageExecuteJupyterCells-for-faster-processing.patch b/build/pkgs/jupyter_sphinx/patches/0003-Use-SageExecuteJupyterCells-for-faster-processing.patch index ddb3bc908e1..99b4b14ce13 100644 --- a/build/pkgs/jupyter_sphinx/patches/0003-Use-SageExecuteJupyterCells-for-faster-processing.patch +++ b/build/pkgs/jupyter_sphinx/patches/0003-Use-SageExecuteJupyterCells-for-faster-processing.patch @@ -1,4 +1,4 @@ -From af16bbccc1e1e1a586fe86371a9437d9342bfa6f Mon Sep 17 00:00:00 2001 +From 1c8bbceae278fb43c985c4daeadcfd52338df7c6 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 5 Apr 2022 13:49:03 +0900 Subject: [PATCH 3/4] Use SageExecuteJupyterCells for faster processing @@ -35,7 +35,7 @@ index c493685..5c8a32c 100644 # For syntax highlighting diff --git a/jupyter_sphinx/execute.py b/jupyter_sphinx/execute.py -index 7514cff..1aca4fd 100644 +index ef41337..d907633 100644 --- a/jupyter_sphinx/execute.py +++ b/jupyter_sphinx/execute.py @@ -323,3 +323,36 @@ def setup(app): diff --git a/build/pkgs/jupyter_sphinx/patches/0004-Prevent-unnecessary-js-injections.patch b/build/pkgs/jupyter_sphinx/patches/0004-Prevent-unnecessary-js-injections.patch index 5b10593a73c..059a2633d8c 100644 --- a/build/pkgs/jupyter_sphinx/patches/0004-Prevent-unnecessary-js-injections.patch +++ b/build/pkgs/jupyter_sphinx/patches/0004-Prevent-unnecessary-js-injections.patch @@ -1,4 +1,4 @@ -From 43d677000707b136c6cd0079356677e6408627f2 Mon Sep 17 00:00:00 2001 +From 227864ac59a536b91ce8aa6cc40a8fb30c967963 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 12 Apr 2022 14:42:44 +0900 Subject: [PATCH 4/4] Prevent unnecessary js injections