From 9e6ef956fec4fb387b36d511339b3d399a8af6f7 Mon Sep 17 00:00:00 2001 From: Robert Lanzafame Date: Sat, 14 Dec 2024 09:36:44 +0100 Subject: [PATCH 1/4] gitlab outage fix --- book/_toc.yml | 5 +- .../text_and_code_gitlab_down.ipynb | 47 +++++++++++++++++++ requirements.txt | 8 ++-- 3 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 book/some_content/text_and_code_gitlab_down.ipynb diff --git a/book/_toc.yml b/book/_toc.yml index 10f519a..88a3ecb 100644 --- a/book/_toc.yml +++ b/book/_toc.yml @@ -6,7 +6,10 @@ parts: chapters: - file: some_content/overview.md sections: - - file: some_content/text_and_code.ipynb + # DEC 14, 2024: REINSTATE THE COMMENTED PAGE ONCE GITLAB.TUDELFT.NL IS BACK ONLINE + # - file: some_content/text_and_code.ipynb + - file: some_content/text_and_code_gitlab_down.ipynb + # END OF DEC 14, 2024 OUTAGE COMMENT - file: exercises/exercises sections: - file: exercises/001.md diff --git a/book/some_content/text_and_code_gitlab_down.ipynb b/book/some_content/text_and_code_gitlab_down.ipynb new file mode 100644 index 0000000..cf94cf7 --- /dev/null +++ b/book/some_content/text_and_code_gitlab_down.ipynb @@ -0,0 +1,47 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Text and code\n", + "\n", + "```{error}\n", + "The interactive Python feature has been temporarily removed from the TeachBooks Template Book because of a system outage at TU Delft's GitLab repository.\n", + "\n", + "This outage affects: 1) new books that are created from the TeachBooks Template, and 2) exising books that are _modified_ while TU Delft GitLab is down.\n", + "\n", + "To see what this page would look like when there is _not_ an outage, you can [visit this book which was created beforehand](https://rlanzafame.github.io/my-first-book/main/some_content/text_and_code.html).\n", + "\n", + "**Did you make a book using this template while the website was down?**\n", + "\n", + "Check whether TU Delft GitLab is live again by visiting [this link](https://gitlab.tudelft.nl/). If it is, you can restore the interactive Python feature to your book by following the one of the two approaches below.\n", + "\n", + "- **Option 1:** Create a new book using the template, following the instructions at [github.com/teachbooks/template](https://github.com/teachbooks/template).\n", + "- **Option 2:** Replace this page in the table of contents file (`_toc.yml`) with the file `text_and_code.ipynb`, then uncomment the lines in the config file (`_config.yml`) that are related to the interactive Python feature. Commit the changes in the GitHub repository of your book, and the GitHub Actions workflow should take care of the rest!\n", + "```" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "base", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.18" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/requirements.txt b/requirements.txt index 849cdf4..3f3ef09 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,8 @@ jupyterbook-patches sphinx-image-inverter download_link_replacer -# now list the packages (and the respective url) you wish to download from the GitLab package registry ---extra-index-url https://gitlab.tudelft.nl/api/v4/projects/11239/packages/pypi/simple -sphinx-thebe ~= 0.9.9 +# DEC 14, 2024: THESE LINES ARE TEMPORARILY TAKEN OUT BECAUSE GITLAB.TUDELFT.NL IS DOWN +# # now list the packages (and the respective url) you wish to download from the GitLab package registry +# --extra-index-url https://gitlab.tudelft.nl/api/v4/projects/11239/packages/pypi/simple +# sphinx-thebe ~= 0.9.9 +# END PART REMOVED DEC 14, 2024 From c53f09a3e276825a552c14a0bb5ebfa5c0a1e0e4 Mon Sep 17 00:00:00 2001 From: Robert Lanzafame Date: Sat, 14 Dec 2024 09:38:13 +0100 Subject: [PATCH 2/4] add note --- book/some_content/text_and_code_gitlab_down.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/some_content/text_and_code_gitlab_down.ipynb b/book/some_content/text_and_code_gitlab_down.ipynb index cf94cf7..d9185a4 100644 --- a/book/some_content/text_and_code_gitlab_down.ipynb +++ b/book/some_content/text_and_code_gitlab_down.ipynb @@ -9,7 +9,7 @@ "```{error}\n", "The interactive Python feature has been temporarily removed from the TeachBooks Template Book because of a system outage at TU Delft's GitLab repository.\n", "\n", - "This outage affects: 1) new books that are created from the TeachBooks Template, and 2) exising books that are _modified_ while TU Delft GitLab is down.\n", + "This outage affects: 1) new books that are created from the TeachBooks Template, and 2) existing books that are _modified_ while TU Delft GitLab is down.\n", "\n", "To see what this page would look like when there is _not_ an outage, you can [visit this book which was created beforehand](https://rlanzafame.github.io/my-first-book/main/some_content/text_and_code.html).\n", "\n", @@ -18,7 +18,7 @@ "Check whether TU Delft GitLab is live again by visiting [this link](https://gitlab.tudelft.nl/). If it is, you can restore the interactive Python feature to your book by following the one of the two approaches below.\n", "\n", "- **Option 1:** Create a new book using the template, following the instructions at [github.com/teachbooks/template](https://github.com/teachbooks/template).\n", - "- **Option 2:** Replace this page in the table of contents file (`_toc.yml`) with the file `text_and_code.ipynb`, then uncomment the lines in the config file (`_config.yml`) that are related to the interactive Python feature. Commit the changes in the GitHub repository of your book, and the GitHub Actions workflow should take care of the rest!\n", + "- **Option 2:** Replace this page in the table of contents file (`_toc.yml`) with the file `text_and_code.ipynb`, then uncomment the lines in the config file (`_config.yml`) that are related to the interactive Python feature. Commit the changes in the GitHub repository of your book, and the GitHub Actions workflow should take care of the rest! This is explained in more detail on [this page in the TeachBooks Manual](https://teachbooks.io/manual/features/live_code.html).\n", "```" ] } From d90cfb5e92dac0151672d762cf2d573c9fc1343e Mon Sep 17 00:00:00 2001 From: Robert Lanzafame Date: Sat, 14 Dec 2024 09:39:40 +0100 Subject: [PATCH 3/4] config --- book/_config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/book/_config.yml b/book/_config.yml index 744a3b5..b79830f 100644 --- a/book/_config.yml +++ b/book/_config.yml @@ -11,11 +11,13 @@ html: sphinx: config: + # DEC 14, 2024: REINSTATE THE COMMENTED LINES ONCE GITLAB.TUDELFT.NL IS BACK ONLINE html_js_files: - https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js thebe_config: use_thebe_lite: true exclude_patterns: ["**/_*.yml", "**/*.md", "**/*.ipynb"] + # END OF DEC 14, 2024 OUTAGE COMMENT html_theme_options: logo: text: Template From b51f679a4fd0428b68e69ae9657953809a238e53 Mon Sep 17 00:00:00 2001 From: Robert Lanzafame Date: Sat, 14 Dec 2024 13:45:11 +0100 Subject: [PATCH 4/4] Revert "Temporarily remove interactive python feature while TU Delft GitLab is down" --- book/_config.yml | 2 - book/_toc.yml | 5 +- .../text_and_code_gitlab_down.ipynb | 47 ------------------- requirements.txt | 8 ++-- 4 files changed, 4 insertions(+), 58 deletions(-) delete mode 100644 book/some_content/text_and_code_gitlab_down.ipynb diff --git a/book/_config.yml b/book/_config.yml index b79830f..744a3b5 100644 --- a/book/_config.yml +++ b/book/_config.yml @@ -11,13 +11,11 @@ html: sphinx: config: - # DEC 14, 2024: REINSTATE THE COMMENTED LINES ONCE GITLAB.TUDELFT.NL IS BACK ONLINE html_js_files: - https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js thebe_config: use_thebe_lite: true exclude_patterns: ["**/_*.yml", "**/*.md", "**/*.ipynb"] - # END OF DEC 14, 2024 OUTAGE COMMENT html_theme_options: logo: text: Template diff --git a/book/_toc.yml b/book/_toc.yml index 88a3ecb..10f519a 100644 --- a/book/_toc.yml +++ b/book/_toc.yml @@ -6,10 +6,7 @@ parts: chapters: - file: some_content/overview.md sections: - # DEC 14, 2024: REINSTATE THE COMMENTED PAGE ONCE GITLAB.TUDELFT.NL IS BACK ONLINE - # - file: some_content/text_and_code.ipynb - - file: some_content/text_and_code_gitlab_down.ipynb - # END OF DEC 14, 2024 OUTAGE COMMENT + - file: some_content/text_and_code.ipynb - file: exercises/exercises sections: - file: exercises/001.md diff --git a/book/some_content/text_and_code_gitlab_down.ipynb b/book/some_content/text_and_code_gitlab_down.ipynb deleted file mode 100644 index d9185a4..0000000 --- a/book/some_content/text_and_code_gitlab_down.ipynb +++ /dev/null @@ -1,47 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Text and code\n", - "\n", - "```{error}\n", - "The interactive Python feature has been temporarily removed from the TeachBooks Template Book because of a system outage at TU Delft's GitLab repository.\n", - "\n", - "This outage affects: 1) new books that are created from the TeachBooks Template, and 2) existing books that are _modified_ while TU Delft GitLab is down.\n", - "\n", - "To see what this page would look like when there is _not_ an outage, you can [visit this book which was created beforehand](https://rlanzafame.github.io/my-first-book/main/some_content/text_and_code.html).\n", - "\n", - "**Did you make a book using this template while the website was down?**\n", - "\n", - "Check whether TU Delft GitLab is live again by visiting [this link](https://gitlab.tudelft.nl/). If it is, you can restore the interactive Python feature to your book by following the one of the two approaches below.\n", - "\n", - "- **Option 1:** Create a new book using the template, following the instructions at [github.com/teachbooks/template](https://github.com/teachbooks/template).\n", - "- **Option 2:** Replace this page in the table of contents file (`_toc.yml`) with the file `text_and_code.ipynb`, then uncomment the lines in the config file (`_config.yml`) that are related to the interactive Python feature. Commit the changes in the GitHub repository of your book, and the GitHub Actions workflow should take care of the rest! This is explained in more detail on [this page in the TeachBooks Manual](https://teachbooks.io/manual/features/live_code.html).\n", - "```" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "base", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.18" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/requirements.txt b/requirements.txt index 3f3ef09..849cdf4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,8 +4,6 @@ jupyterbook-patches sphinx-image-inverter download_link_replacer -# DEC 14, 2024: THESE LINES ARE TEMPORARILY TAKEN OUT BECAUSE GITLAB.TUDELFT.NL IS DOWN -# # now list the packages (and the respective url) you wish to download from the GitLab package registry -# --extra-index-url https://gitlab.tudelft.nl/api/v4/projects/11239/packages/pypi/simple -# sphinx-thebe ~= 0.9.9 -# END PART REMOVED DEC 14, 2024 +# now list the packages (and the respective url) you wish to download from the GitLab package registry +--extra-index-url https://gitlab.tudelft.nl/api/v4/projects/11239/packages/pypi/simple +sphinx-thebe ~= 0.9.9