From d1992e77914af7802c35ce2975095625b348e4b0 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Tue, 7 May 2024 16:39:30 +0200 Subject: [PATCH 01/14] Updated template and deploy book with features --- book/external/deploy-book-workflow | 2 +- book/external/template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/book/external/deploy-book-workflow b/book/external/deploy-book-workflow index 32e1eb8..8db87a9 160000 --- a/book/external/deploy-book-workflow +++ b/book/external/deploy-book-workflow @@ -1 +1 @@ -Subproject commit 32e1eb8725fe4c63612a13f7467491cc9765d95e +Subproject commit 8db87a9f26fcea97cc2f353d454cf2c0557e7e57 diff --git a/book/external/template b/book/external/template index 1f74f5f..0742432 160000 --- a/book/external/template +++ b/book/external/template @@ -1 +1 @@ -Subproject commit 1f74f5f2cf71a282e29b9a96a61bb8a140b9c6ab +Subproject commit 0742432a4f3a14b3813cb697d7834b721ca7925a From 070c0ba6dddb01cd4afbcb321a3195ae53ca0eed Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Tue, 7 May 2024 17:14:41 +0200 Subject: [PATCH 02/14] Clarified cell tags only in python cells, not in markdown cells --- book/features/live_code.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/features/live_code.ipynb b/book/features/live_code.ipynb index 0c356e7..1111605 100644 --- a/book/features/live_code.ipynb +++ b/book/features/live_code.ipynb @@ -85,7 +85,7 @@ "If you push to main, you can test the interactivity on the book-draft website as well.\n", "\n", "## Custom cell tags\n", - "With the extended functionality of live code, additional cell tags have been developed to be added to cells in any .ipynb file, next to the [existing tags] of the jupyter book (https://jupyterbook.org/en/stable/content/metadata.html):\n", + "With the extended functionality of live code, additional cell tags have been developed to be added to python cells (not markdown cells) in any .ipynb file, next to the [existing tags] of the jupyter book (https://jupyterbook.org/en/stable/content/metadata.html):\n", "- `disable-execution-cell` disables the ability to execute the cell when thebe is activated. This might be useful if you notebook file includes interactivity for only a part of the coding cells\n", "- `disable-execution-page` disables the ability to execute the entire page. This might be useful if you use python code for creating a page, but the code is not part of the actual content of the book.\n", "- `auto-execute-page` automatically starts the thebe live coding functionality whenever the page is opened. This is particularly useful if you're using widgets on a page.\n", From 162b27c750909c75964d23ea7dbffa6d4ffd6e77 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Mon, 13 May 2024 09:55:27 +0200 Subject: [PATCH 03/14] Updated author --- book/_config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/_config.yml b/book/_config.yml index 4322295..3c7269e 100644 --- a/book/_config.yml +++ b/book/_config.yml @@ -1,5 +1,5 @@ title: TeachBooks Manual -author: TeachBooks Team, built with Jupyter Book, CC BY 4.0 +author: TeachBooks Team from Delft university of Technology, built with TeachBooks and Jupyter Book, CC BY 4.0 logo: images/Logo_without_background.png From 9db8cd450aba9216f7e95dc08e2369ad737ace5c Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Tue, 14 May 2024 08:31:14 +0200 Subject: [PATCH 04/14] Didn't really change anything --- book/external/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/external/template b/book/external/template index 0742432..7165661 160000 --- a/book/external/template +++ b/book/external/template @@ -1 +1 @@ -Subproject commit 0742432a4f3a14b3813cb697d7834b721ca7925a +Subproject commit 71656612afa24342f345d9e113553b8ff3cdf4b1 From 0e7d09ccf18a2a0af09a0853f58dceb0ea6e5dc1 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Thu, 16 May 2024 09:07:43 +0200 Subject: [PATCH 05/14] Added issue thingy --- book/intro.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/book/intro.md b/book/intro.md index 1471cd6..50ab6b9 100644 --- a/book/intro.md +++ b/book/intro.md @@ -3,4 +3,5 @@ This is an introduction to Git, VS Code and Jupyter Books for teachers and teaching assistants involved in TeachBooks, our platform easing the process of making a Jupyter book. This book is still work in progress, so feel free to contribute https://gitlab.tudelft.nl/interactivetextbooks-citg/jupyter-book-manual! For more information about teachbooks, visit [https://teachbooks.tudelft.nl/](https://teachbooks.tudelft.nl/). ## Contact -If you encounter any issues, please contact Tom van Woudenberg, Robert Lanzafame or one of our TAs Julie Kirsch at TeachBooks@tudelft.nl. \ No newline at end of file +If you encounter any issues and you've a TU Delft account, report it by clicking {fa}`gitlab` --> {fa}`lightbulb` on the top right corner of this page. +Or contact Tom van Woudenberg, Robert Lanzafame or one of our TAs Julie Kirsch at TeachBooks@tudelft.nl, also for non-TU Delft account holders. \ No newline at end of file From e47b7d93ce982dff18b0be6f919917c0350b1c0d Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Thu, 16 May 2024 09:15:18 +0200 Subject: [PATCH 06/14] Now with gitlab thingy? --- book/intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/intro.md b/book/intro.md index 50ab6b9..bd0c144 100644 --- a/book/intro.md +++ b/book/intro.md @@ -3,5 +3,5 @@ This is an introduction to Git, VS Code and Jupyter Books for teachers and teaching assistants involved in TeachBooks, our platform easing the process of making a Jupyter book. This book is still work in progress, so feel free to contribute https://gitlab.tudelft.nl/interactivetextbooks-citg/jupyter-book-manual! For more information about teachbooks, visit [https://teachbooks.tudelft.nl/](https://teachbooks.tudelft.nl/). ## Contact -If you encounter any issues and you've a TU Delft account, report it by clicking {fa}`gitlab` --> {fa}`lightbulb` on the top right corner of this page. +If you encounter any issues and you've a TU Delft account, report it by clicking {fa}`fa-gitlab` --> {fa}`lightbulb` on the top right corner of this page. Or contact Tom van Woudenberg, Robert Lanzafame or one of our TAs Julie Kirsch at TeachBooks@tudelft.nl, also for non-TU Delft account holders. \ No newline at end of file From 7b8544a37e835ea996b4d2287c4e3fef33c3c568 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Thu, 16 May 2024 09:19:23 +0200 Subject: [PATCH 07/14] Now properly --- book/intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/intro.md b/book/intro.md index bd0c144..17a384e 100644 --- a/book/intro.md +++ b/book/intro.md @@ -3,5 +3,5 @@ This is an introduction to Git, VS Code and Jupyter Books for teachers and teaching assistants involved in TeachBooks, our platform easing the process of making a Jupyter book. This book is still work in progress, so feel free to contribute https://gitlab.tudelft.nl/interactivetextbooks-citg/jupyter-book-manual! For more information about teachbooks, visit [https://teachbooks.tudelft.nl/](https://teachbooks.tudelft.nl/). ## Contact -If you encounter any issues and you've a TU Delft account, report it by clicking {fa}`fa-gitlab` --> {fa}`lightbulb` on the top right corner of this page. +If you encounter any issues and you've a TU Delft account, report it by clicking --> {fa}`lightbulb` on the top right corner of this page. Or contact Tom van Woudenberg, Robert Lanzafame or one of our TAs Julie Kirsch at TeachBooks@tudelft.nl, also for non-TU Delft account holders. \ No newline at end of file From 57eef5859b24c5f313141b7b831ad43e26575198 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Wed, 22 May 2024 09:58:23 +0200 Subject: [PATCH 08/14] Update deploy-book-workflow --- book/external/deploy-book-workflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/external/deploy-book-workflow b/book/external/deploy-book-workflow index 8db87a9..72fd515 160000 --- a/book/external/deploy-book-workflow +++ b/book/external/deploy-book-workflow @@ -1 +1 @@ -Subproject commit 8db87a9f26fcea97cc2f353d454cf2c0557e7e57 +Subproject commit 72fd5157e3c9b1aca9f4d42c7a6cde68b8e4cbf8 From 0486ef95955360ecdde9aa9d4ba9a631099a0172 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Wed, 22 May 2024 10:02:07 +0200 Subject: [PATCH 09/14] Update deploy-book-workflow --- book/external/deploy-book-workflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/external/deploy-book-workflow b/book/external/deploy-book-workflow index 72fd515..9596ee8 160000 --- a/book/external/deploy-book-workflow +++ b/book/external/deploy-book-workflow @@ -1 +1 @@ -Subproject commit 72fd5157e3c9b1aca9f4d42c7a6cde68b8e4cbf8 +Subproject commit 9596ee85f43820924ad3216bd964fcfce405e60a From 08f2634f6a01607f7023e2e1617bf50d231830f1 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Wed, 22 May 2024 10:04:19 +0200 Subject: [PATCH 10/14] Update deploy-book-workflow --- book/external/deploy-book-workflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/external/deploy-book-workflow b/book/external/deploy-book-workflow index 9596ee8..d5eab25 160000 --- a/book/external/deploy-book-workflow +++ b/book/external/deploy-book-workflow @@ -1 +1 @@ -Subproject commit 9596ee85f43820924ad3216bd964fcfce405e60a +Subproject commit d5eab25a29e2cc558ec449577dab669c02758a11 From 41f5701aabb1e1f8dc7b0143e339c9df73abaf49 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Mon, 27 May 2024 09:34:41 +0200 Subject: [PATCH 11/14] Removed unnecessary import --- book/examples/example_gumbel.ipynb | 14 -------------- book/examples/example_gumbel.py | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/book/examples/example_gumbel.ipynb b/book/examples/example_gumbel.ipynb index 9095c4c..e23cc7a 100644 --- a/book/examples/example_gumbel.ipynb +++ b/book/examples/example_gumbel.ipynb @@ -34,20 +34,6 @@ "To complete this assignment, you can use `numpy`, `matplotlib` and from the `math` library, `log` and `e` (these are imported for you when you inialize the notebook)." ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "tags": [ - "thebe-remove-input-init" - ] - }, - "outputs": [], - "source": [ - "import micropip\n", - "await micropip.install(\"ipywidgets\")" - ] - }, { "cell_type": "code", "execution_count": 2, diff --git a/book/examples/example_gumbel.py b/book/examples/example_gumbel.py index a2c1337..7a91657 100644 --- a/book/examples/example_gumbel.py +++ b/book/examples/example_gumbel.py @@ -1,4 +1,4 @@ -from grading import check +#from grading import check from math import isclose tolerance = 0.001 From ebfede3879d90622b0e26c26a17a0bfc2175c6b5 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Mon, 27 May 2024 09:50:01 +0200 Subject: [PATCH 12/14] Added missing grading.py file --- book/examples/example_gumbel.py | 2 +- book/examples/grading.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 book/examples/grading.py diff --git a/book/examples/example_gumbel.py b/book/examples/example_gumbel.py index 7a91657..a2c1337 100644 --- a/book/examples/example_gumbel.py +++ b/book/examples/example_gumbel.py @@ -1,4 +1,4 @@ -#from grading import check +from grading import check from math import isclose tolerance = 0.001 diff --git a/book/examples/grading.py b/book/examples/grading.py new file mode 100644 index 0000000..c282bf3 --- /dev/null +++ b/book/examples/grading.py @@ -0,0 +1,16 @@ +from IPython.display import display +import ipywidgets as widgets + +def check(f): + def wrapper(*args, **kwargs): + output = widgets.Output() + button = widgets.Button(description="Check Answer(s)") + @output.capture(clear_output=True,wait=True) + def _inner_check(button): + try: + f(*args, **kwargs) + except: + print("Something went wrong, have you filled all the functions and run the cells?") + button.on_click(_inner_check) + display(button, output) + return wrapper From 08b62633953ab5fd993114a347f4e53d9b694232 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Mon, 27 May 2024 13:18:25 +0200 Subject: [PATCH 13/14] Create call-deploy-book.yml --- .github/workflows/call-deploy-book.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/call-deploy-book.yml diff --git a/.github/workflows/call-deploy-book.yml b/.github/workflows/call-deploy-book.yml new file mode 100644 index 0000000..bec1772 --- /dev/null +++ b/.github/workflows/call-deploy-book.yml @@ -0,0 +1,24 @@ +name: call-deploy-book + +on: + push: + branches: + - '**' + # If your git repository has the Jupyter Book within some-subfolder next to + # unrelated files, you can make this run only if a file within that specific + # folder (or the workflow file itself) has been modified. + # + paths: + - book/** + - .github/workflows/call-deploy-book.yml + workflow_dispatch: + +jobs: + call-workflow: + uses: TeachBooks/deploy-book-workflow/.github/workflows/deploy-book.yml@main + secrets: inherit + permissions: + contents: read + pages: write + id-token: write + From e557b544773e134fe4b456442deed533c277db66 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Mon, 27 May 2024 13:23:44 +0200 Subject: [PATCH 14/14] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 5c6680c..d42b694 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ jupyter-book +teachbooks sphinx-inline-tabs jupyterlite-sphinx