Skip to content

Commit e5590bf

Browse files
committed
Add instructions and comments in the tutorials
1 parent d23a5f8 commit e5590bf

File tree

4 files changed

+117
-73
lines changed

4 files changed

+117
-73
lines changed

tutorial/julia_demo.ipynb

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,47 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"source": [
6+
"## Jupyterlab Notification Julia Demo\n",
7+
"For this demo, make sure to update `minimum_cell_execution_time` to 1 second in Settings > Advanced Settings Editor > Notifications.\n",
8+
"\n",
9+
"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/)."
10+
],
11+
"metadata": {}
12+
},
313
{
414
"cell_type": "code",
515
"execution_count": 7,
6-
"id": "e80893c2-fa00-440a-baf9-ac49aad29be5",
7-
"metadata": {
8-
"execution": {
9-
"iopub.execute_input": "2021-04-19T20:53:28.895000-06:00",
10-
"iopub.status.busy": "2021-04-19T20:53:28.895000-06:00",
11-
"iopub.status.idle": "2021-04-19T20:53:32.912000-06:00",
12-
"shell.execute_reply": "2021-04-19T20:53:32.911000-06:00"
13-
},
14-
"tags": []
15-
},
16+
"source": [
17+
"sleep(4)\n",
18+
"print(\"hello world!\")"
19+
],
1620
"outputs": [
1721
{
18-
"name": "stdout",
1922
"output_type": "stream",
23+
"name": "stdout",
2024
"text": [
2125
"hello world!"
2226
]
2327
}
2428
],
25-
"source": [
26-
"sleep(4)\n",
27-
"print(\"hello world!\")"
28-
]
29+
"metadata": {
30+
"execution": {
31+
"iopub.execute_input": "2021-04-19T20:53:28.895000-06:00",
32+
"iopub.status.busy": "2021-04-19T20:53:28.895000-06:00",
33+
"iopub.status.idle": "2021-04-19T20:53:32.912000-06:00",
34+
"shell.execute_reply": "2021-04-19T20:53:32.911000-06:00"
35+
},
36+
"tags": []
37+
}
2938
},
3039
{
3140
"cell_type": "code",
3241
"execution_count": null,
33-
"id": "90628a40-aae7-4b1d-a17a-5f03bea0aebf",
34-
"metadata": {},
42+
"source": [],
3543
"outputs": [],
36-
"source": []
44+
"metadata": {}
3745
}
3846
],
3947
"metadata": {
@@ -51,4 +59,4 @@
5159
},
5260
"nbformat": 4,
5361
"nbformat_minor": 5
54-
}
62+
}

tutorial/py3_demo.ipynb

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"cell_type": "markdown",
55
"source": [
66
"## Jupyterlab Notification Python Demo\n",
7-
"For this demo, make sure to update `minimum_cell_execution_time` to 1 second in Settings > Advanced Settings Editor > Notifications."
7+
"For this demo, make sure to update `minimum_cell_execution_time` to 1 second in Settings > Advanced Settings Editor > Notifications.\n",
8+
"\n",
9+
"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. "
810
],
911
"metadata": {}
1012
},
@@ -118,6 +120,15 @@
118120
"tags": []
119121
}
120122
},
123+
{
124+
"cell_type": "markdown",
125+
"source": [
126+
"## Notification for Failed Notebook Cell Execution\n",
127+
"\n",
128+
"If a cell execution fails, the extension will notify you with the failure and share the failure message in the notification as well. "
129+
],
130+
"metadata": {}
131+
},
121132
{
122133
"cell_type": "code",
123134
"execution_count": 40,
@@ -155,6 +166,7 @@
155166
"## Last Cell Execution Notification Only\n",
156167
"For this demo, make sure to update `last_cell_only` to true in Settings > Advanced Settings Editor > Notifications.\n",
157168
"Please select the following three cells and run them at the same time.\n",
169+
"The extension will notify you after the last cell execution completion and display the total duration of the selected cells. \n",
158170
"\n",
159171
"How to select Multiple Cells Shift + J or Shift + Down selects the next sell in a downwards direction."
160172
],
@@ -241,6 +253,14 @@
241253
"tags": []
242254
}
243255
},
256+
{
257+
"cell_type": "markdown",
258+
"source": [
259+
"## Notifications are for code cells only.\n",
260+
"The extensions will only notify you for non-empty code cell executions, so the following `raw | markdown` cells will not produce any notifications. "
261+
],
262+
"metadata": {}
263+
},
244264
{
245265
"cell_type": "markdown",
246266
"source": [

tutorial/py3_demo_2.ipynb

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"source": [
6+
"## Jupyterlab Notification Python 2 Demo\n",
7+
"For this demo, make sure to update `minimum_cell_execution_time` to 1 second in Settings > Advanced Settings Editor > Notifications.\n",
8+
"\n",
9+
"This notebook in conjunction with `py3_demo_3.ipynb` was created to test simultaneous runs with `py3_demo.ipynb`."
10+
],
11+
"metadata": {}
12+
},
313
{
414
"cell_type": "code",
515
"execution_count": 17,
6-
"id": "204ae670-e103-43a8-ad4b-683acb777fa2",
16+
"source": [
17+
"!sleep 2\n",
18+
"print(\"hello from notebook 2\")"
19+
],
20+
"outputs": [
21+
{
22+
"output_type": "stream",
23+
"name": "stdout",
24+
"text": [
25+
"hello from notebook 2\n"
26+
]
27+
}
28+
],
729
"metadata": {
830
"execution": {
931
"iopub.execute_input": "2021-07-26T02:25:17.832538Z",
@@ -13,25 +35,24 @@
1335
"shell.execute_reply.started": "2021-07-26T02:25:17.832508Z"
1436
},
1537
"tags": []
16-
},
38+
}
39+
},
40+
{
41+
"cell_type": "code",
42+
"execution_count": 18,
43+
"source": [
44+
"!sleep 2\n",
45+
"print(\"hello from notebook 2: cell 1\")"
46+
],
1747
"outputs": [
1848
{
19-
"name": "stdout",
2049
"output_type": "stream",
50+
"name": "stdout",
2151
"text": [
22-
"hello from notebook 2\n"
52+
"hello from notebook 2: cell 1\n"
2353
]
2454
}
2555
],
26-
"source": [
27-
"!sleep 2\n",
28-
"print(\"hello from notebook 2\")"
29-
]
30-
},
31-
{
32-
"cell_type": "code",
33-
"execution_count": 18,
34-
"id": "3ed687e7-e95c-4152-b4fe-105bbd2baab7",
3556
"metadata": {
3657
"execution": {
3758
"iopub.execute_input": "2021-07-26T02:25:23.469719Z",
@@ -41,28 +62,14 @@
4162
"shell.execute_reply.started": "2021-07-26T02:25:23.469693Z"
4263
},
4364
"tags": []
44-
},
45-
"outputs": [
46-
{
47-
"name": "stdout",
48-
"output_type": "stream",
49-
"text": [
50-
"hello from notebook 2: cell 1\n"
51-
]
52-
}
53-
],
54-
"source": [
55-
"!sleep 2\n",
56-
"print(\"hello from notebook 2: cell 1\")"
57-
]
65+
}
5866
},
5967
{
6068
"cell_type": "code",
6169
"execution_count": null,
62-
"id": "a84d63a4-bb8e-4d17-bcc6-dd6c9395f6f6",
63-
"metadata": {},
70+
"source": [],
6471
"outputs": [],
65-
"source": []
72+
"metadata": {}
6673
}
6774
],
6875
"metadata": {
@@ -86,4 +93,4 @@
8693
},
8794
"nbformat": 4,
8895
"nbformat_minor": 5
89-
}
96+
}

tutorial/py3_demo_3.ipynb

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,33 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"source": [
6+
"## Jupyterlab Notification Python 3 Demo\n",
7+
"For this demo, make sure to update `minimum_cell_execution_time` to 1 second in Settings > Advanced Settings Editor > Notifications.\n",
8+
"\n",
9+
"This notebook in conjunction with `py3_demo_2.ipynb` was created to test simultaneous runs with `py3_demo.ipynb`.\n",
10+
"\n",
11+
"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. "
12+
],
13+
"metadata": {}
14+
},
315
{
416
"cell_type": "code",
517
"execution_count": 7,
6-
"id": "bcdd95ec-1792-4e0e-b590-bf07cb150ce1",
18+
"source": [
19+
"!sleep 3\n",
20+
"print(\"hello from notebook 3\")"
21+
],
22+
"outputs": [
23+
{
24+
"output_type": "stream",
25+
"name": "stdout",
26+
"text": [
27+
"hello from notebook 3\n"
28+
]
29+
}
30+
],
731
"metadata": {
832
"execution": {
933
"iopub.execute_input": "2021-07-26T02:25:20.354141Z",
@@ -13,36 +37,21 @@
1337
"shell.execute_reply.started": "2021-07-26T02:25:20.354100Z"
1438
},
1539
"tags": []
16-
},
17-
"outputs": [
18-
{
19-
"name": "stdout",
20-
"output_type": "stream",
21-
"text": [
22-
"hello from notebook 3\n"
23-
]
24-
}
25-
],
26-
"source": [
27-
"!sleep 3\n",
28-
"print(\"hello from notebook 3\")"
29-
]
40+
}
3041
},
3142
{
3243
"cell_type": "code",
3344
"execution_count": null,
34-
"id": "43c898c3-bd6b-4451-a1dd-5834b5f9fa49",
35-
"metadata": {},
45+
"source": [],
3646
"outputs": [],
37-
"source": []
47+
"metadata": {}
3848
},
3949
{
4050
"cell_type": "code",
4151
"execution_count": null,
42-
"id": "77346921-725a-4918-a401-a86be734d3cd",
43-
"metadata": {},
52+
"source": [],
4453
"outputs": [],
45-
"source": []
54+
"metadata": {}
4655
}
4756
],
4857
"metadata": {
@@ -66,4 +75,4 @@
6675
},
6776
"nbformat": 4,
6877
"nbformat_minor": 5
69-
}
78+
}

0 commit comments

Comments
 (0)