From bf0d6e0f4447609428b9a806f66dd60909c36098 Mon Sep 17 00:00:00 2001 From: MarcSkovMadsen Date: Sun, 14 Jan 2024 05:39:10 +0000 Subject: [PATCH 1/2] improve getting started --- .gitignore | 1 - lite/files/Getting_Started.ipynb | 41 +--------- lite/files/Reset_Jupyterlite.ipynb | 119 +++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+), 41 deletions(-) create mode 100644 lite/files/Reset_Jupyterlite.ipynb diff --git a/.gitignore b/.gitignore index d090971534..82839abe8e 100644 --- a/.gitignore +++ b/.gitignore @@ -117,7 +117,6 @@ jupyter_execute builtdocs/ .doit.db -lite/ .jupyterlite.doit.db # jetbrains settings diff --git a/lite/files/Getting_Started.ipynb b/lite/files/Getting_Started.ipynb index 65b644444b..2e6e563e1f 100644 --- a/lite/files/Getting_Started.ipynb +++ b/lite/files/Getting_Started.ipynb @@ -121,46 +121,7 @@ "id": "f4efdeef-e3c5-4cb0-b358-b40f03c59f93", "metadata": {}, "source": [ - "The contents of Panelite are updated on every release, however Jupyterlite caches old edits to files. If you want to reset the storage and **delete all modifications you made to the contents** the click the button below." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "a6477040-13bc-4cbf-8939-1e893563bc1e", - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import display, HTML\n", - "display(HTML(\"\"\"\n", - "\n", - "\n", - "\"\"\"))" + "The contents of Panelite are updated on every release, however Jupyterlite caches old edits to files. If you want to reset the storage and **delete all modifications you made to the contents** then use the [Reset_Jupyterlite.ipynb](Reset_Jupyterlite.ipynb) notebook." ] } ], diff --git a/lite/files/Reset_Jupyterlite.ipynb b/lite/files/Reset_Jupyterlite.ipynb new file mode 100644 index 0000000000..3e7c4a66cf --- /dev/null +++ b/lite/files/Reset_Jupyterlite.ipynb @@ -0,0 +1,119 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The contents of Panelite are updated on every release, however Jupyterlite caches old edits to files. If you want to reset the storage and **delete all modifications you made to the contents** then run the code below and click the button `Clear JupyterLite local storage` button." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + "
\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "from IPython.display import display, HTML\n", + "display(HTML(\"\"\"\n", + "\n", + "
\n", + "\n", + "\"\"\"))" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": ".venv", + "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.10.13" + }, + "orig_nbformat": 4 + }, + "nbformat": 4, + "nbformat_minor": 2 +} From cd89c4e680abfa364832fbabcd735bd7ac6e1cc0 Mon Sep 17 00:00:00 2001 From: MarcSkovMadsen Date: Sun, 14 Jan 2024 05:48:19 +0000 Subject: [PATCH 2/2] improve getting started --- .gitignore | 2 +- .pre-commit-config.yaml | 2 +- lite/files/Getting_Started.ipynb | 5 --- lite/files/Reset_Jupyterlite.ipynb | 64 ++---------------------------- 4 files changed, 5 insertions(+), 68 deletions(-) diff --git a/.gitignore b/.gitignore index 82839abe8e..47952f9bce 100644 --- a/.gitignore +++ b/.gitignore @@ -116,7 +116,7 @@ jupyter_execute # this dir contains the whole website and should not be checked in on main builtdocs/ .doit.db - +lite/files/*/ .jupyterlite.doit.db # jetbrains settings diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3a6e21dd31..2c6c08faea 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: hooks: - id: clean-notebook args: [-i, tags] - exclude: '^lite/files' + exclude: '^lite/files/.*/' - repo: https://github.com/codespell-project/codespell rev: v2.2.6 hooks: diff --git a/lite/files/Getting_Started.ipynb b/lite/files/Getting_Started.ipynb index 2e6e563e1f..e4a8947ba4 100644 --- a/lite/files/Getting_Started.ipynb +++ b/lite/files/Getting_Started.ipynb @@ -126,11 +126,6 @@ } ], "metadata": { - "kernelspec": { - "display_name": "Python (Pyodide)", - "language": "python", - "name": "python" - }, "language_info": { "name": "python", "pygments_lexer": "ipython3" diff --git a/lite/files/Reset_Jupyterlite.ipynb b/lite/files/Reset_Jupyterlite.ipynb index 3e7c4a66cf..1a0444a265 100644 --- a/lite/files/Reset_Jupyterlite.ipynb +++ b/lite/files/Reset_Jupyterlite.ipynb @@ -11,51 +11,7 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "
\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "from IPython.display import display, HTML\n", "display(HTML(\"\"\"\n", @@ -95,24 +51,10 @@ } ], "metadata": { - "kernelspec": { - "display_name": ".venv", - "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.10.13" - }, - "orig_nbformat": 4 + "pygments_lexer": "ipython3" + } }, "nbformat": 4, "nbformat_minor": 2