Skip to content

Commit cb60dc2

Browse files
authored
Merge pull request #99 from jtpio/beta-14
Update to `jupyterlite==0.1.0b14`
2 parents 96e341d + 01bc1b6 commit cb60dc2

File tree

9 files changed

+280
-152
lines changed

9 files changed

+280
-152
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v3
1717
- name: Setup Python
18-
uses: actions/setup-python@v2
18+
uses: actions/setup-python@v4
1919
with:
20-
python-version: 3.8
20+
python-version: '3.10'
2121
- name: Install the dependencies
2222
run: |
2323
python -m pip install -r requirements.txt

content/pyolite/altair.ipynb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@
2626
},
2727
"outputs": [],
2828
"source": [
29-
"import piplite\n",
30-
"\n",
31-
"await piplite.install(\"altair\")"
29+
"%pip install -q altair"
3230
]
3331
},
3432
{
@@ -110,7 +108,7 @@
110108
},
111109
"outputs": [],
112110
"source": [
113-
"await piplite.install('vega_datasets')"
111+
"%pip install -q vega_datasets"
114112
]
115113
},
116114
{

content/pyolite/folium.ipynb

Lines changed: 91 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,130 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"source": "# `folium` Interactive Map Demo\n\nSimple demonstration of rendering a map in a `jupyterlite` notebook.\n\nNote that the `folium` package has several dependencies which themselves may have dependencies.\n\nThe following code fragement, run in a fresh Python enviroment into which `folium` has already been installed, identifies the packages that are loaded in when `folium` is loaded:\n\n```python\n#https://stackoverflow.com/a/40381601/454773\nimport sys\nbefore = [str(m) for m in sys.modules]\nimport folium\nafter = [str(m) for m in sys.modules]\nset([m.split('.')[0] for m in after if not m in before and not m.startswith('_')])\n```\n\nThe loaded packages are:\n\n```\n{'branca',\n 'certifi',\n 'chardet',\n 'cmath',\n 'csv',\n 'dateutil',\n 'encodings',\n 'folium',\n 'gzip',\n 'http',\n 'idna',\n 'importlib',\n 'jinja2',\n 'markupsafe',\n 'mmap',\n 'numpy',\n 'pandas',\n 'pkg_resources',\n 'pytz',\n 'requests',\n 'secrets',\n 'stringprep',\n 'urllib3',\n 'zipfile'}\n ```\n ",
65
"metadata": {
76
"tags": []
8-
}
7+
},
8+
"source": [
9+
"# `folium` Interactive Map Demo\n",
10+
"\n",
11+
"Simple demonstration of rendering a map in a `jupyterlite` notebook.\n",
12+
"\n",
13+
"Note that the `folium` package has several dependencies which themselves may have dependencies.\n",
14+
"\n",
15+
"The following code fragement, run in a fresh Python enviroment into which `folium` has already been installed, identifies the packages that are loaded in when `folium` is loaded:\n",
16+
"\n",
17+
"```python\n",
18+
"#https://stackoverflow.com/a/40381601/454773\n",
19+
"import sys\n",
20+
"before = [str(m) for m in sys.modules]\n",
21+
"import folium\n",
22+
"after = [str(m) for m in sys.modules]\n",
23+
"set([m.split('.')[0] for m in after if not m in before and not m.startswith('_')])\n",
24+
"```\n",
25+
"\n",
26+
"The loaded packages are:\n",
27+
"\n",
28+
"```\n",
29+
"{'branca',\n",
30+
" 'certifi',\n",
31+
" 'chardet',\n",
32+
" 'cmath',\n",
33+
" 'csv',\n",
34+
" 'dateutil',\n",
35+
" 'encodings',\n",
36+
" 'folium',\n",
37+
" 'gzip',\n",
38+
" 'http',\n",
39+
" 'idna',\n",
40+
" 'importlib',\n",
41+
" 'jinja2',\n",
42+
" 'markupsafe',\n",
43+
" 'mmap',\n",
44+
" 'numpy',\n",
45+
" 'pandas',\n",
46+
" 'pkg_resources',\n",
47+
" 'pytz',\n",
48+
" 'requests',\n",
49+
" 'secrets',\n",
50+
" 'stringprep',\n",
51+
" 'urllib3',\n",
52+
" 'zipfile'}\n",
53+
" ```\n",
54+
" "
55+
]
956
},
1057
{
1158
"cell_type": "markdown",
12-
"source": "The following packages seem to need installing in order load `folium`, along with folium itself:\n\n```\nchardet, certifi, idna, branca, urllib3, Jinja2, requests, Markupsafe\n```\n\nUniversal wheels, with filenames of the form `PACKAGE-VERSION-py2.py3-none-any.whl` appearing in the *Download files* area of a PyPi package page ([example](https://pypi.org/project/requests/#files)] are required in order to install the package.\n\nOne required package, [`Markupsafe`](https://pypi.org/project/Markupsafe/#files)) *did not* have a universal wheel available, so a wheel was manually built elsewhere (by hacking the [`setup.py` file](https://github.com/pallets/markupsafe/blob/main/setup.py) to force it to build the wheel in a platform and speedup free way) and pushed to a downloadable location in an [*ad hoc* wheelhouse](https://opencomputinglab.github.io/vce-wheelhouse/).",
13-
"metadata": {}
59+
"metadata": {},
60+
"source": [
61+
"The following packages seem to need installing in order load `folium`, along with folium itself:\n",
62+
"\n",
63+
"```\n",
64+
"chardet, certifi, idna, branca, urllib3, Jinja2, requests, Markupsafe\n",
65+
"```\n",
66+
"\n",
67+
"Universal wheels, with filenames of the form `PACKAGE-VERSION-py2.py3-none-any.whl` appearing in the *Download files* area of a PyPi package page ([example](https://pypi.org/project/requests/#files)] are required in order to install the package.\n",
68+
"\n",
69+
"One required package, [`Markupsafe`](https://pypi.org/project/Markupsafe/#files)) *did not* have a universal wheel available, so a wheel was manually built elsewhere (by hacking the [`setup.py` file](https://github.com/pallets/markupsafe/blob/main/setup.py) to force it to build the wheel in a platform and speedup free way) and pushed to a downloadable location in an [*ad hoc* wheelhouse](https://opencomputinglab.github.io/vce-wheelhouse/)."
70+
]
1471
},
1572
{
1673
"cell_type": "code",
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\")",
74+
"execution_count": null,
1875
"metadata": {
1976
"trusted": true
2077
},
21-
"execution_count": null,
22-
"outputs": []
78+
"outputs": [],
79+
"source": [
80+
"# Install folium requirements\n",
81+
"%pip install -q folium"
82+
]
2383
},
2484
{
2585
"cell_type": "markdown",
26-
"source": "## Demo of `folium` Map\n\nLoad in the `folium` package:",
27-
"metadata": {}
86+
"metadata": {},
87+
"source": [
88+
"## Demo of `folium` Map\n",
89+
"\n",
90+
"Load in the `folium` package:"
91+
]
2892
},
2993
{
3094
"cell_type": "code",
31-
"source": "import folium",
95+
"execution_count": null,
3296
"metadata": {
3397
"trusted": true
3498
},
35-
"execution_count": null,
36-
"outputs": []
99+
"outputs": [],
100+
"source": [
101+
"import folium"
102+
]
37103
},
38104
{
39105
"cell_type": "markdown",
40-
"source": "And render a demo map:",
41-
"metadata": {}
106+
"metadata": {},
107+
"source": [
108+
"And render a demo map:"
109+
]
42110
},
43111
{
44112
"cell_type": "code",
45-
"source": "m = folium.Map(location=[50.693848, -1.304734], zoom_start=11)\nm",
113+
"execution_count": null,
46114
"metadata": {
47115
"trusted": true
48116
},
49-
"execution_count": null,
50-
"outputs": []
117+
"outputs": [],
118+
"source": [
119+
"m = folium.Map(location=[50.693848, -1.304734], zoom_start=11)\n",
120+
"m"
121+
]
51122
},
52123
{
53124
"cell_type": "code",
54-
"source": "",
55-
"metadata": {},
56125
"execution_count": null,
57-
"outputs": []
126+
"metadata": {},
127+
"outputs": [],
128+
"source": []
58129
}
59130
],
60131
"metadata": {

content/pyolite/interactive-widgets.ipynb

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
"metadata": {},
2020
"outputs": [],
2121
"source": [
22-
"import piplite\n",
23-
"\n",
24-
"await piplite.install('ipywidgets')"
22+
"%pip install -q ipywidgets"
2523
]
2624
},
2725
{
@@ -143,9 +141,7 @@
143141
"metadata": {},
144142
"outputs": [],
145143
"source": [
146-
"import piplite\n",
147-
"\n",
148-
"await piplite.install('bqplot')"
144+
"%pip install -q bqplot"
149145
]
150146
},
151147
{
@@ -247,26 +243,26 @@
247243
}
248244
],
249245
"metadata": {
250-
"kernelspec": {
251-
"display_name": "Pyolite",
252-
"language": "python",
253-
"name": "python"
254-
},
255-
"language_info": {
256-
"codemirror_mode": {
257-
"name": "python",
258-
"version": 3
259-
},
260-
"file_extension": ".py",
261-
"mimetype": "text/x-python",
262-
"name": "python",
263-
"nbconvert_exporter": "python",
264-
"pygments_lexer": "ipython3",
265-
"version": "3.8"
266-
},
267-
"orig_nbformat": 4,
268-
"toc-showcode": false
246+
"kernelspec": {
247+
"display_name": "Pyolite",
248+
"language": "python",
249+
"name": "python"
250+
},
251+
"language_info": {
252+
"codemirror_mode": {
253+
"name": "python",
254+
"version": 3
255+
},
256+
"file_extension": ".py",
257+
"mimetype": "text/x-python",
258+
"name": "python",
259+
"nbconvert_exporter": "python",
260+
"pygments_lexer": "ipython3",
261+
"version": "3.8"
269262
},
263+
"orig_nbformat": 4,
264+
"toc-showcode": false
265+
},
270266
"nbformat": 4,
271267
"nbformat_minor": 5
272268
}

0 commit comments

Comments
 (0)