Skip to content

Commit b2df257

Browse files
authored
Merge pull request #958 from HaudinFlorence/docs_add_try_with_JupyterLite
Docs add try with jupyter lite
2 parents f65f98e + caad521 commit b2df257

File tree

8 files changed

+100
-10
lines changed

8 files changed

+100
-10
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ js/jupyter-leaflet-*.tgz
2121
docs/*.csv
2222
docs/*.json
2323
docs/*.nc
24+
docs/test.wkt
2425

2526
# Untitled Notebooks
2627
*Untitled*.ipynb
2728

28-
#Galata
29+
#Galata
2930
ui-test/playwright-report
30-
ui-test/test-results
31+
ui-test/test-results

docs/environment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies:
1515
- branca
1616
- shapely
1717
- pydata-sphinx-theme
18+
1819
- pip:
1920
- ..
20-
21-
21+
- jupyterlite-sphinx

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# -*- coding: utf-8 -*-
22

33
extensions = [
4-
'jupyter_sphinx','sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.napoleon','sphinx.ext.todo', 'sphinx.ext.viewcode'
4+
'jupyter_sphinx', 'jupyterlite_sphinx', 'sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.napoleon','sphinx.ext.todo', 'sphinx.ext.viewcode'
55
]
66

77
templates_path = ['_templates']
88

9-
9+
jupyterlite_config = "jupyterlite_config.json"
1010

1111
def setup(app):
1212
app.add_css_file("main_stylesheet.css")

docs/source/controls/fullscreen_control.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Example
1313

1414
m
1515

16-
Attribute
17-
---------
16+
Attributes
17+
----------
1818

1919
.. autoclass:: ipyleaflet.leaflet.FullScreenControl
2020
:members:

docs/source/controls/measure_control.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Example
2828
m
2929

3030

31-
Attributes and methods
32-
----------------------
31+
Attributes
32+
----------
3333

3434
.. autoclass:: ipyleaflet.leaflet.MeasureControl
3535
:members:

docs/source/index.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
ipyleaflet: Interactive maps in the Jupyter notebook
22
====================================================
33

4+
5+
Try it online
6+
-------------
7+
8+
You can try ipyleaflet directly in this documentation page thanks to JupyterLite!
9+
10+
.. retrolite:: ipyleaflet.ipynb
11+
12+
Index
13+
-----
14+
415
.. toctree::
516
:maxdepth: 2
617

docs/source/ipyleaflet.ipynb

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "8eee1995-a52b-4eae-8898-047746e57b19",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": [
10+
"import piplite\n",
11+
"await piplite.install('ipyleaflet')"
12+
]
13+
},
14+
{
15+
"cell_type": "code",
16+
"execution_count": null,
17+
"id": "dbabb8a7",
18+
"metadata": {},
19+
"outputs": [],
20+
"source": [
21+
"from ipyleaflet import Map, basemaps, basemap_to_tiles\n",
22+
"\n",
23+
"m = Map(\n",
24+
" basemap=basemap_to_tiles(basemaps.OpenStreetMap.Mapnik),\n",
25+
" center=(48.204793, 350.121558),\n",
26+
" zoom=3\n",
27+
" )\n",
28+
"m"
29+
]
30+
}
31+
],
32+
"metadata": {
33+
"kernelspec": {
34+
"display_name": "Python 3 (ipykernel)",
35+
"language": "python",
36+
"name": "python3"
37+
},
38+
"language_info": {
39+
"codemirror_mode": {
40+
"name": "ipython",
41+
"version": 3
42+
},
43+
"file_extension": ".py",
44+
"mimetype": "text/x-python",
45+
"name": "python",
46+
"nbconvert_exporter": "python",
47+
"pygments_lexer": "ipython3",
48+
"version": "3.9.12"
49+
}
50+
},
51+
"nbformat": 4,
52+
"nbformat_minor": 5
53+
}

docs/source/jupyterlite_config.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"LiteBuildConfig": {
3+
"federated_extensions": [
4+
"https://github.com/conda-forge/releases/releases/download/noarch/jupyterlab_widgets-1.0.2-pyhd8ed1ab_0.tar.bz2/jupyterlab_widgets-1.0.2-pyhd8ed1ab_0.tar.bz2",
5+
"https://github.com/conda-forge/releases/releases/download/noarch/ipyleaflet-0.15.0-pyhd8ed1ab_3.tar.bz2/ipyleaflet-0.15.0-pyhd8ed1ab_3.tar.bz2"
6+
],
7+
"ignore_sys_prefix": true,
8+
"piplite_urls": [
9+
"https://files.pythonhosted.org/packages/py2.py3/i/ipyleaflet/ipyleaflet-0.15.0-py2.py3-none-any.whl",
10+
"https://files.pythonhosted.org/packages/py2.py3/i/ipython-genutils/ipython_genutils-0.2.0-py2.py3-none-any.whl",
11+
"https://files.pythonhosted.org/packages/py2.py3/i/ipywidgets/ipywidgets-7.6.5-py2.py3-none-any.whl",
12+
"https://files.pythonhosted.org/packages/py2.py3/r/requests/requests-2.27.1-py2.py3-none-any.whl",
13+
"https://files.pythonhosted.org/packages/py2.py3/t/traittypes/traittypes-0.2.1-py2.py3-none-any.whl",
14+
"https://files.pythonhosted.org/packages/py2.py3/u/urllib3/urllib3-1.26.8-py2.py3-none-any.whl",
15+
"https://files.pythonhosted.org/packages/py3/b/branca/branca-0.4.2-py3-none-any.whl",
16+
"https://files.pythonhosted.org/packages/py3/i/ipython/ipython-8.0.1-py3-none-any.whl",
17+
"https://files.pythonhosted.org/packages/py3/j/jupyter-client/jupyter_client-7.1.2-py3-none-any.whl",
18+
"https://files.pythonhosted.org/packages/py3/j/jupyter-core/jupyter_core-4.9.2-py3-none-any.whl",
19+
"https://files.pythonhosted.org/packages/py3/j/jupyterlab-widgets/jupyterlab_widgets-1.0.2-py3-none-any.whl",
20+
"https://files.pythonhosted.org/packages/py3/n/nest-asyncio/nest_asyncio-1.5.4-py3-none-any.whl",
21+
"https://files.pythonhosted.org/packages/py3/n/notebook/notebook-6.4.8-py3-none-any.whl",
22+
"https://files.pythonhosted.org/packages/py3/t/traitlets/traitlets-5.1.1-py3-none-any.whl"
23+
]
24+
}
25+
}

0 commit comments

Comments
 (0)