Skip to content

Commit

Permalink
Add instructions and comments in the tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
mwakaba2 committed Aug 1, 2021
1 parent d23a5f8 commit e5590bf
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 73 deletions.
46 changes: 27 additions & 19 deletions tutorial/julia_demo.ipynb
Original file line number Diff line number Diff line change
@@ -1,39 +1,47 @@
{
"cells": [
{
"cell_type": "markdown",
"source": [
"## Jupyterlab Notification Julia Demo\n",
"For this demo, make sure to update `minimum_cell_execution_time` to 1 second in Settings > Advanced Settings Editor > Notifications.\n",
"\n",
"For instructions on how to install and set-up a Julia Notebook Kernel, please check out [here](https://julialang.github.io/IJulia.jl/dev/manual/running/)."
],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": 7,
"id": "e80893c2-fa00-440a-baf9-ac49aad29be5",
"metadata": {
"execution": {
"iopub.execute_input": "2021-04-19T20:53:28.895000-06:00",
"iopub.status.busy": "2021-04-19T20:53:28.895000-06:00",
"iopub.status.idle": "2021-04-19T20:53:32.912000-06:00",
"shell.execute_reply": "2021-04-19T20:53:32.911000-06:00"
},
"tags": []
},
"source": [
"sleep(4)\n",
"print(\"hello world!\")"
],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"name": "stdout",
"text": [
"hello world!"
]
}
],
"source": [
"sleep(4)\n",
"print(\"hello world!\")"
]
"metadata": {
"execution": {
"iopub.execute_input": "2021-04-19T20:53:28.895000-06:00",
"iopub.status.busy": "2021-04-19T20:53:28.895000-06:00",
"iopub.status.idle": "2021-04-19T20:53:32.912000-06:00",
"shell.execute_reply": "2021-04-19T20:53:32.911000-06:00"
},
"tags": []
}
},
{
"cell_type": "code",
"execution_count": null,
"id": "90628a40-aae7-4b1d-a17a-5f03bea0aebf",
"metadata": {},
"source": [],
"outputs": [],
"source": []
"metadata": {}
}
],
"metadata": {
Expand All @@ -51,4 +59,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
22 changes: 21 additions & 1 deletion tutorial/py3_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"cell_type": "markdown",
"source": [
"## Jupyterlab Notification Python Demo\n",
"For this demo, make sure to update `minimum_cell_execution_time` to 1 second in Settings > Advanced Settings Editor > Notifications."
"For this demo, make sure to update `minimum_cell_execution_time` to 1 second in Settings > Advanced Settings Editor > Notifications.\n",
"\n",
"Try running all the cells in notebooks with the prefix `py3_demo_` to see that notebook name and cell execution duration is correct in the notification. "
],
"metadata": {}
},
Expand Down Expand Up @@ -118,6 +120,15 @@
"tags": []
}
},
{
"cell_type": "markdown",
"source": [
"## Notification for Failed Notebook Cell Execution\n",
"\n",
"If a cell execution fails, the extension will notify you with the failure and share the failure message in the notification as well. "
],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": 40,
Expand Down Expand Up @@ -155,6 +166,7 @@
"## Last Cell Execution Notification Only\n",
"For this demo, make sure to update `last_cell_only` to true in Settings > Advanced Settings Editor > Notifications.\n",
"Please select the following three cells and run them at the same time.\n",
"The extension will notify you after the last cell execution completion and display the total duration of the selected cells. \n",
"\n",
"How to select Multiple Cells Shift + J or Shift + Down selects the next sell in a downwards direction."
],
Expand Down Expand Up @@ -241,6 +253,14 @@
"tags": []
}
},
{
"cell_type": "markdown",
"source": [
"## Notifications are for code cells only.\n",
"The extensions will only notify you for non-empty code cell executions, so the following `raw | markdown` cells will not produce any notifications. "
],
"metadata": {}
},
{
"cell_type": "markdown",
"source": [
Expand Down
69 changes: 38 additions & 31 deletions tutorial/py3_demo_2.ipynb
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
{
"cells": [
{
"cell_type": "markdown",
"source": [
"## Jupyterlab Notification Python 2 Demo\n",
"For this demo, make sure to update `minimum_cell_execution_time` to 1 second in Settings > Advanced Settings Editor > Notifications.\n",
"\n",
"This notebook in conjunction with `py3_demo_3.ipynb` was created to test simultaneous runs with `py3_demo.ipynb`."
],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": 17,
"id": "204ae670-e103-43a8-ad4b-683acb777fa2",
"source": [
"!sleep 2\n",
"print(\"hello from notebook 2\")"
],
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"hello from notebook 2\n"
]
}
],
"metadata": {
"execution": {
"iopub.execute_input": "2021-07-26T02:25:17.832538Z",
Expand All @@ -13,25 +35,24 @@
"shell.execute_reply.started": "2021-07-26T02:25:17.832508Z"
},
"tags": []
},
}
},
{
"cell_type": "code",
"execution_count": 18,
"source": [
"!sleep 2\n",
"print(\"hello from notebook 2: cell 1\")"
],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"name": "stdout",
"text": [
"hello from notebook 2\n"
"hello from notebook 2: cell 1\n"
]
}
],
"source": [
"!sleep 2\n",
"print(\"hello from notebook 2\")"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "3ed687e7-e95c-4152-b4fe-105bbd2baab7",
"metadata": {
"execution": {
"iopub.execute_input": "2021-07-26T02:25:23.469719Z",
Expand All @@ -41,28 +62,14 @@
"shell.execute_reply.started": "2021-07-26T02:25:23.469693Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"hello from notebook 2: cell 1\n"
]
}
],
"source": [
"!sleep 2\n",
"print(\"hello from notebook 2: cell 1\")"
]
}
},
{
"cell_type": "code",
"execution_count": null,
"id": "a84d63a4-bb8e-4d17-bcc6-dd6c9395f6f6",
"metadata": {},
"source": [],
"outputs": [],
"source": []
"metadata": {}
}
],
"metadata": {
Expand All @@ -86,4 +93,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
53 changes: 31 additions & 22 deletions tutorial/py3_demo_3.ipynb
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
{
"cells": [
{
"cell_type": "markdown",
"source": [
"## Jupyterlab Notification Python 3 Demo\n",
"For this demo, make sure to update `minimum_cell_execution_time` to 1 second in Settings > Advanced Settings Editor > Notifications.\n",
"\n",
"This notebook in conjunction with `py3_demo_2.ipynb` was created to test simultaneous runs with `py3_demo.ipynb`.\n",
"\n",
"Try running all the cells in notebooks with the prefix `py3_demo_` to see that notebook name and cell execution duration is correct in the notification. "
],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": 7,
"id": "bcdd95ec-1792-4e0e-b590-bf07cb150ce1",
"source": [
"!sleep 3\n",
"print(\"hello from notebook 3\")"
],
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"hello from notebook 3\n"
]
}
],
"metadata": {
"execution": {
"iopub.execute_input": "2021-07-26T02:25:20.354141Z",
Expand All @@ -13,36 +37,21 @@
"shell.execute_reply.started": "2021-07-26T02:25:20.354100Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"hello from notebook 3\n"
]
}
],
"source": [
"!sleep 3\n",
"print(\"hello from notebook 3\")"
]
}
},
{
"cell_type": "code",
"execution_count": null,
"id": "43c898c3-bd6b-4451-a1dd-5834b5f9fa49",
"metadata": {},
"source": [],
"outputs": [],
"source": []
"metadata": {}
},
{
"cell_type": "code",
"execution_count": null,
"id": "77346921-725a-4918-a401-a86be734d3cd",
"metadata": {},
"source": [],
"outputs": [],
"source": []
"metadata": {}
}
],
"metadata": {
Expand All @@ -66,4 +75,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}

0 comments on commit e5590bf

Please sign in to comment.