Skip to content

Commit 3cb7023

Browse files
authored
Update to jupyterlite==0.1.0b4 (#63)
* Update to `jupyterlite==0.1.0b4` * Update to `ipywidgets>=7.7,<8` * Update plotly notebook * More dependency updates * Use `piplite` * Update altair notebook
1 parent 799fea9 commit 3cb7023

File tree

8 files changed

+86
-89
lines changed

8 files changed

+86
-89
lines changed

content/pyolite/altair.ipynb

Lines changed: 49 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,49 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5+
"metadata": {},
56
"source": [
67
"# Altair in `JupyterLite`\n",
78
"\n",
89
"**Altair** is a declarative statistical visualization library for Python.\n",
910
"\n",
1011
"Most of the examples below are from: https://altair-viz.github.io/gallery"
11-
],
12-
"metadata": {}
12+
]
1313
},
1414
{
1515
"cell_type": "markdown",
16+
"metadata": {},
1617
"source": [
1718
"## Import the dependencies:"
18-
],
19-
"metadata": {}
19+
]
2020
},
2121
{
2222
"cell_type": "code",
2323
"execution_count": null,
24-
"source": [
25-
"# code snippet below from @lrowe: https://github.com/jtpio/jupyterlite/issues/110#issuecomment-850916083\n",
26-
"import micropip\n",
27-
"\n",
28-
"# Last version of jsonschema before it added the pyrsistent dependency (native code, no wheel)\n",
29-
"await micropip.install(\"https://files.pythonhosted.org/packages/77/de/47e35a97b2b05c2fadbec67d44cfcdcd09b8086951b331d82de90d2912da/jsonschema-2.6.0-py2.py3-none-any.whl\")\n",
30-
"await micropip.install(\"altair\")"
31-
],
32-
"outputs": [],
3324
"metadata": {
3425
"trusted": true
35-
}
26+
},
27+
"outputs": [],
28+
"source": [
29+
"import piplite\n",
30+
"\n",
31+
"await piplite.install(\"altair\")"
32+
]
3633
},
3734
{
3835
"cell_type": "markdown",
36+
"metadata": {},
3937
"source": [
4038
"## Simple Bar Chart"
41-
],
42-
"metadata": {}
39+
]
4340
},
4441
{
4542
"cell_type": "code",
4643
"execution_count": null,
44+
"metadata": {
45+
"trusted": true
46+
},
47+
"outputs": [],
4748
"source": [
4849
"import altair as alt\n",
4950
"import pandas as pd\n",
@@ -57,22 +58,22 @@
5758
" x='a',\n",
5859
" y='b'\n",
5960
")"
60-
],
61-
"outputs": [],
62-
"metadata": {
63-
"trusted": true
64-
}
61+
]
6562
},
6663
{
6764
"cell_type": "markdown",
65+
"metadata": {},
6866
"source": [
6967
"## Simple Heatmap"
70-
],
71-
"metadata": {}
68+
]
7269
},
7370
{
7471
"cell_type": "code",
7572
"execution_count": null,
73+
"metadata": {
74+
"trusted": true
75+
},
76+
"outputs": [],
7677
"source": [
7778
"import altair as alt\n",
7879
"import numpy as np\n",
@@ -92,40 +93,40 @@
9293
" y='y:O',\n",
9394
" color='z:Q'\n",
9495
")\n"
95-
],
96-
"outputs": [],
97-
"metadata": {
98-
"trusted": true
99-
}
96+
]
10097
},
10198
{
10299
"cell_type": "markdown",
100+
"metadata": {},
103101
"source": [
104102
"## Install the Vega Dataset"
105-
],
106-
"metadata": {}
103+
]
107104
},
108105
{
109106
"cell_type": "code",
110107
"execution_count": null,
111-
"source": [
112-
"await micropip.install('vega_datasets')"
113-
],
114-
"outputs": [],
115108
"metadata": {
116109
"trusted": true
117-
}
110+
},
111+
"outputs": [],
112+
"source": [
113+
"await piplite.install('vega_datasets')"
114+
]
118115
},
119116
{
120117
"cell_type": "markdown",
118+
"metadata": {},
121119
"source": [
122120
"## Interactive Average"
123-
],
124-
"metadata": {}
121+
]
125122
},
126123
{
127124
"cell_type": "code",
128125
"execution_count": null,
126+
"metadata": {
127+
"trusted": true
128+
},
129+
"outputs": [],
129130
"source": [
130131
"import altair as alt\n",
131132
"from vega_datasets import data\n",
@@ -149,22 +150,22 @@
149150
")\n",
150151
"\n",
151152
"alt.layer(bars, line, data=source)"
152-
],
153-
"outputs": [],
154-
"metadata": {
155-
"trusted": true
156-
}
153+
]
157154
},
158155
{
159156
"cell_type": "markdown",
157+
"metadata": {},
160158
"source": [
161159
"## Locations of US Airports"
162-
],
163-
"metadata": {}
160+
]
164161
},
165162
{
166163
"cell_type": "code",
167164
"execution_count": null,
165+
"metadata": {
166+
"trusted": true
167+
},
168+
"outputs": [],
168169
"source": [
169170
"import altair as alt\n",
170171
"from vega_datasets import data\n",
@@ -198,18 +199,14 @@
198199
")\n",
199200
"\n",
200201
"background + points\n"
201-
],
202-
"outputs": [],
203-
"metadata": {
204-
"trusted": true
205-
}
202+
]
206203
},
207204
{
208205
"cell_type": "code",
209206
"execution_count": null,
210-
"source": [],
207+
"metadata": {},
211208
"outputs": [],
212-
"metadata": {}
209+
"source": []
213210
}
214211
],
215212
"metadata": {
@@ -233,4 +230,4 @@
233230
},
234231
"nbformat": 4,
235232
"nbformat_minor": 4
236-
}
233+
}

content/pyolite/folium.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
{
1616
"cell_type": "code",
17-
"source": "# Install folium requirements\nimport micropip\nawait micropip.install(\"https://opencomputinglab.github.io/vce-wheelhouse/wheelhouse/MarkupSafe-2.0.1-py2.py3-none-any.whl\")\nawait micropip.install('https://files.pythonhosted.org/packages/19/c7/fa589626997dd07bd87d9269342ccb74b1720384a4d739a1872bd84fbe68/chardet-4.0.0-py2.py3-none-any.whl')\nawait micropip.install('https://files.pythonhosted.org/packages/05/1b/0a0dece0e8aa492a6ec9e4ad2fe366b511558cdc73fd3abc82ba7348e875/certifi-2021.5.30-py2.py3-none-any.whl')\nawait micropip.install('https://files.pythonhosted.org/packages/d7/77/ff688d1504cdc4db2a938e2b7b9adee5dd52e34efbd2431051efc9984de9/idna-3.2-py3-none-any.whl')\nawait micropip.install(\"https://files.pythonhosted.org/packages/61/1f/570b0615c452265d57e4114e633231d6cd9b9d275256778a675681e4f711/branca-0.4.2-py3-none-any.whl\")\nawait micropip.install('https://files.pythonhosted.org/packages/0c/cd/1e2ec680ec7b09846dc6e605f5a7709dfb9d7128e51a026e7154e18a234e/urllib3-1.26.5-py2.py3-none-any.whl')\nawait micropip.install('https://files.pythonhosted.org/packages/80/21/ae597efc7ed8caaa43fb35062288baaf99a7d43ff0cf66452ddf47604ee6/Jinja2-3.0.1-py3-none-any.whl')\nawait micropip.install('https://files.pythonhosted.org/packages/29/c1/24814557f1d22c56d50280771a17307e6bf87b70727d975fd6b2ce6b014a/requests-2.25.1-py2.py3-none-any.whl')\n\n# Install folium \nawait micropip.install(\"https://files.pythonhosted.org/packages/c3/83/e8cb37afc2f016a1cf4caab8d22caf7fe4156c4c15230d8abc9c83547e0c/folium-0.12.1-py2.py3-none-any.whl\")",
17+
"source": "# Install folium requirements\nimport piplite\nawait piplite.install(\"https://opencomputinglab.github.io/vce-wheelhouse/wheelhouse/MarkupSafe-2.0.1-py2.py3-none-any.whl\")\nawait piplite.install('https://files.pythonhosted.org/packages/19/c7/fa589626997dd07bd87d9269342ccb74b1720384a4d739a1872bd84fbe68/chardet-4.0.0-py2.py3-none-any.whl')\nawait piplite.install('https://files.pythonhosted.org/packages/05/1b/0a0dece0e8aa492a6ec9e4ad2fe366b511558cdc73fd3abc82ba7348e875/certifi-2021.5.30-py2.py3-none-any.whl')\nawait piplite.install('https://files.pythonhosted.org/packages/d7/77/ff688d1504cdc4db2a938e2b7b9adee5dd52e34efbd2431051efc9984de9/idna-3.2-py3-none-any.whl')\nawait piplite.install(\"https://files.pythonhosted.org/packages/61/1f/570b0615c452265d57e4114e633231d6cd9b9d275256778a675681e4f711/branca-0.4.2-py3-none-any.whl\")\nawait piplite.install('https://files.pythonhosted.org/packages/0c/cd/1e2ec680ec7b09846dc6e605f5a7709dfb9d7128e51a026e7154e18a234e/urllib3-1.26.5-py2.py3-none-any.whl')\nawait piplite.install('https://files.pythonhosted.org/packages/80/21/ae597efc7ed8caaa43fb35062288baaf99a7d43ff0cf66452ddf47604ee6/Jinja2-3.0.1-py3-none-any.whl')\nawait piplite.install('https://files.pythonhosted.org/packages/29/c1/24814557f1d22c56d50280771a17307e6bf87b70727d975fd6b2ce6b014a/requests-2.25.1-py2.py3-none-any.whl')\n\n# Install folium \nawait piplite.install(\"https://files.pythonhosted.org/packages/c3/83/e8cb37afc2f016a1cf4caab8d22caf7fe4156c4c15230d8abc9c83547e0c/folium-0.12.1-py2.py3-none-any.whl\")",
1818
"metadata": {
1919
"trusted": true
2020
},

content/pyolite/interactive-widgets.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"metadata": {},
2020
"outputs": [],
2121
"source": [
22-
"import micropip\n",
22+
"import piplite\n",
2323
"\n",
24-
"await micropip.install('ipywidgets')"
24+
"await piplite.install('ipywidgets')"
2525
]
2626
},
2727
{
@@ -143,9 +143,9 @@
143143
"metadata": {},
144144
"outputs": [],
145145
"source": [
146-
"import micropip\n",
146+
"import piplite\n",
147147
"\n",
148-
"await micropip.install('bqplot')"
148+
"await piplite.install('bqplot')"
149149
]
150150
},
151151
{

content/pyolite/ipycanvas.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
},
3636
{
3737
"cell_type": "code",
38-
"source": "import micropip\n\nawait micropip.install('ipycanvas')",
38+
"source": "import piplite\n\nawait piplite.install('ipycanvas')",
3939
"metadata": {
4040
"trusted": true
4141
},

content/pyolite/ipyleaflet.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"metadata": {},
77
"outputs": [],
88
"source": [
9-
"import micropip\n",
9+
"import piplite\n",
1010
"\n",
11-
"await micropip.install(['bqplot', 'ipyleaflet'])"
11+
"await piplite.install(['bqplot', 'ipyleaflet'])"
1212
]
1313
},
1414
{

content/pyolite/matplotlib.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@
6464
"metadata": {},
6565
"outputs": [],
6666
"source": [
67-
"import micropip\n",
67+
"import piplite\n",
6868
"\n",
69-
"await micropip.install('ipympl')"
69+
"await piplite.install('ipympl')"
7070
]
7171
},
7272
{

content/pyolite/plotly.ipynb

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
18-
"import micropip\n",
18+
"import piplite\n",
1919
"\n",
20-
"await micropip.install('plotly')"
20+
"await piplite.install(['nbformat', 'plotly'])"
2121
]
2222
},
2323
{
@@ -135,26 +135,26 @@
135135
}
136136
],
137137
"metadata": {
138-
"kernelspec": {
139-
"display_name": "Pyolite",
140-
"language": "python",
141-
"name": "python"
142-
},
143-
"language_info": {
144-
"codemirror_mode": {
145-
"name": "python",
146-
"version": 3
147-
},
148-
"file_extension": ".py",
149-
"mimetype": "text/x-python",
150-
"name": "python",
151-
"nbconvert_exporter": "python",
152-
"pygments_lexer": "ipython3",
153-
"version": "3.8"
154-
},
155-
"orig_nbformat": 4,
156-
"toc-showcode": false
138+
"kernelspec": {
139+
"display_name": "Pyolite",
140+
"language": "python",
141+
"name": "python"
157142
},
143+
"language_info": {
144+
"codemirror_mode": {
145+
"name": "python",
146+
"version": 3
147+
},
148+
"file_extension": ".py",
149+
"mimetype": "text/x-python",
150+
"name": "python",
151+
"nbconvert_exporter": "python",
152+
"pygments_lexer": "ipython3",
153+
"version": "3.8"
154+
},
155+
"orig_nbformat": 4,
156+
"toc-showcode": false
157+
},
158158
"nbformat": 4,
159159
"nbformat_minor": 4
160160
}

requirements.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ bqplot
22
ipycanvas>=0.9.1
33
ipyleaflet
44
ipympl>=0.8.2
5-
ipywidgets>=7.6
6-
jupyterlab~=3.2.0
5+
ipywidgets>=7.7,<8
6+
jupyterlab~=3.3.0
77
jupyterlab-drawio
88
jupyterlab-language-pack-fr-FR
99
jupyterlab-language-pack-zh-CN
1010
jupyterlab-fasta>=3,<4
1111
jupyterlab-geojson>=3,<4
1212
jupyterlab-tour
1313
jupyterlab_miami_nights
14-
jupyterlite==0.1.0b3
14+
jupyterlite==0.1.0b4
1515
jupyterlite-p5-kernel==0.1.0a12
16-
jupyterlite-xeus-lua==0.2.0
17-
jupyterlite-xeus-wren==0.1.2
18-
jupyterlite-xeus-sqlite==0.1.2
16+
jupyterlite-xeus-lua==0.3.0
17+
jupyterlite-xeus-wren==0.2.0
18+
jupyterlite-xeus-sqlite==0.2.0
1919
plotly>=5,<6
2020
theme-darcula

0 commit comments

Comments
 (0)