Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs add try with jupyter lite #958

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ js/jupyter-leaflet-*.tgz
docs/*.csv
docs/*.json
docs/*.nc
docs/test.wkt

# Untitled Notebooks
*Untitled*.ipynb

#Galata
#Galata
ui-test/playwright-report
ui-test/test-results
ui-test/test-results
4 changes: 2 additions & 2 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
- branca
- shapely
- pydata-sphinx-theme

- pip:
- ..


- jupyterlite-sphinx
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# -*- coding: utf-8 -*-

extensions = [
'jupyter_sphinx','sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.napoleon','sphinx.ext.todo', 'sphinx.ext.viewcode'
'jupyter_sphinx', 'jupyterlite_sphinx', 'sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.napoleon','sphinx.ext.todo', 'sphinx.ext.viewcode'
]

templates_path = ['_templates']


jupyterlite_config = "jupyterlite_config.json"

def setup(app):
app.add_css_file("main_stylesheet.css")
Expand Down
4 changes: 2 additions & 2 deletions docs/source/controls/fullscreen_control.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Example

m

Attribute
---------
Attributes
----------

.. autoclass:: ipyleaflet.leaflet.FullScreenControl
:members:
4 changes: 2 additions & 2 deletions docs/source/controls/measure_control.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Example
m


Attributes and methods
----------------------
Attributes
----------

.. autoclass:: ipyleaflet.leaflet.MeasureControl
:members:
11 changes: 11 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
ipyleaflet: Interactive maps in the Jupyter notebook
====================================================


Try it online
-------------

You can try ipyleaflet directly in this documentation page thanks to JupyterLite!

.. retrolite:: ipyleaflet.ipynb

Index
-----

.. toctree::
:maxdepth: 2

Expand Down
53 changes: 53 additions & 0 deletions docs/source/ipyleaflet.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "8eee1995-a52b-4eae-8898-047746e57b19",
"metadata": {},
"outputs": [],
"source": [
"import piplite\n",
"await piplite.install('ipyleaflet')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "dbabb8a7",
"metadata": {},
"outputs": [],
"source": [
"from ipyleaflet import Map, basemaps, basemap_to_tiles\n",
"\n",
"m = Map(\n",
" basemap=basemap_to_tiles(basemaps.OpenStreetMap.Mapnik),\n",
" center=(48.204793, 350.121558),\n",
" zoom=3\n",
" )\n",
"m"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
25 changes: 25 additions & 0 deletions docs/source/jupyterlite_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"LiteBuildConfig": {
"federated_extensions": [
"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",
"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"
],
"ignore_sys_prefix": true,
"piplite_urls": [
"https://files.pythonhosted.org/packages/py2.py3/i/ipyleaflet/ipyleaflet-0.15.0-py2.py3-none-any.whl",
"https://files.pythonhosted.org/packages/py2.py3/i/ipython-genutils/ipython_genutils-0.2.0-py2.py3-none-any.whl",
"https://files.pythonhosted.org/packages/py2.py3/i/ipywidgets/ipywidgets-7.6.5-py2.py3-none-any.whl",
"https://files.pythonhosted.org/packages/py2.py3/r/requests/requests-2.27.1-py2.py3-none-any.whl",
"https://files.pythonhosted.org/packages/py2.py3/t/traittypes/traittypes-0.2.1-py2.py3-none-any.whl",
"https://files.pythonhosted.org/packages/py2.py3/u/urllib3/urllib3-1.26.8-py2.py3-none-any.whl",
"https://files.pythonhosted.org/packages/py3/b/branca/branca-0.4.2-py3-none-any.whl",
"https://files.pythonhosted.org/packages/py3/i/ipython/ipython-8.0.1-py3-none-any.whl",
"https://files.pythonhosted.org/packages/py3/j/jupyter-client/jupyter_client-7.1.2-py3-none-any.whl",
"https://files.pythonhosted.org/packages/py3/j/jupyter-core/jupyter_core-4.9.2-py3-none-any.whl",
"https://files.pythonhosted.org/packages/py3/j/jupyterlab-widgets/jupyterlab_widgets-1.0.2-py3-none-any.whl",
"https://files.pythonhosted.org/packages/py3/n/nest-asyncio/nest_asyncio-1.5.4-py3-none-any.whl",
"https://files.pythonhosted.org/packages/py3/n/notebook/notebook-6.4.8-py3-none-any.whl",
"https://files.pythonhosted.org/packages/py3/t/traitlets/traitlets-5.1.1-py3-none-any.whl"
]
}
}