Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Fix a bug in patching jupyter-sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
kwankyu committed Apr 24, 2022
1 parent ee57bfc commit a5479ba
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Date: Sun, 27 Mar 2022 13:33:56 -0700
Subject: [PATCH 1/4] Fix a bug and suppress a warning
Expand All @@ -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):
Expand All @@ -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,
+ )

Expand Down
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Date: Sun, 3 Apr 2022 21:24:36 +0900
Subject: [PATCH 2/4] Use latest thebe for interact to work
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Date: Tue, 5 Apr 2022 13:49:03 +0900
Subject: [PATCH 3/4] Use SageExecuteJupyterCells for faster processing
Expand Down Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Date: Tue, 12 Apr 2022 14:42:44 +0900
Subject: [PATCH 4/4] Prevent unnecessary js injections
Expand Down

0 comments on commit a5479ba

Please sign in to comment.