Skip to content

Commit 37997d7

Browse files
authored
Refactor: remove ipyleaflet-core and have only ipyleaflet and jupyter-leaflet packages (#1189)
* Refactor: remove ipyleaflet-core and have only ipyleaflet and jupyter-leaflet packages This will ease the releasing so much. ipyleaflet-core itself was not really useful on its own anyway. * Attempt to fix README GIFs in symlink * fix README GIFs in symlink * Fix missing dynamic entry * Unneeded jupyterlab dependency in build env + couple of fixes * Fix version for now * Fix release steps * Fix path to README
1 parent 8a286fc commit 37997d7

31 files changed

+133
-220
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- python==${{ matrix.python-version }}
3535
3636
- name: Install ipyleaflet
37-
run: pip install python/jupyter_leaflet python/ipyleaflet_core python/ipyleaflet --no-deps
37+
run: pip install python/jupyter_leaflet python/ipyleaflet --no-deps
3838

3939
- name: Check installation files
4040
run: |

.github/workflows/ui-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
channels: conda-forge
2626

2727
- name: Install ipyleaflet
28-
run: pip install python/jupyter_leaflet python/ipyleaflet_core python/ipyleaflet --no-deps
28+
run: pip install python/jupyter_leaflet python/ipyleaflet --no-deps
2929

3030
- name: Install browser
3131
run: |

README.md

-119
This file was deleted.

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python/ipyleaflet/README.md

RELEASE.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@
44
```sh
55
git clone [email protected]:jupyter-widgets/ipyleaflet.git
66
```
7-
2. Update the version numbers in the following files (see https://github.com/jupyter-widgets/ipyleaflet/commit/48f3cb68cd07e6c4ae7b353a17861e4e51ca4471)
8-
- `ipyleaflet/ipyleaflet_core/ipyleaflet/_version.py` (two places)
9-
- `ipyleaflet/python/jupyter_leaflet/package.json`
7+
2. Update the version numbers in the following files
8+
- `python/ipyleaflet/_version.py` (two places)
9+
- `python/jupyter_leaflet/package.json`
1010
- `environment.yml`
1111
3. Make sure the changelog is updated: `CHANGELOG.md`
1212
4. Build and publish to npm (if yarn prompts for the new version, I give the same as what is already in the `package.json`)
1313
```sh
14-
cd ipyleaflet/python/jupyter_leaflet
14+
cd python/jupyter_leaflet
1515
yarn install && yarn run build && yarn publish
1616
cd ..
1717
```
1818
5. Build and publish Python package
1919
```sh
20-
python -m build
21-
twine upload dist/*
20+
python -m build python/jupyter_leaflet
21+
twine upload python/jupyter_leaflet/dist/jupyter_leaflet*
22+
python -m build python/ipyleaflet
23+
twine upload python/ipyleaflet/dist/ipyleaflet*
2224
```
2325
6. Update environment config with new ipyleaflet pypi download link: `docs/jupyterlite_config.json`
2426
7. Commit and push in git

docs/build-environment.yml

-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,4 @@ dependencies:
2020
- jupyterlite-xeus-python >=0.9.2,<0.10
2121
- pip:
2222
- ../python/jupyter_leaflet
23-
- ../python/ipyleaflet_core
24-
- ../python/ipyleaflet
2523
- ../python/ipyleaflet

docs/environment.yml

-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,4 @@ dependencies:
1010
- branca
1111
- pip:
1212
- ../python/jupyter_leaflet
13-
- ../python/ipyleaflet_core
14-
- ../python/ipyleaflet
1513
- ../python/ipyleaflet

python/ipyleaflet/README.md

+94-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,94 @@
1-
ipyleaflet meta package
1+
# ipyleaflet
2+
3+
[![Documentation](http://readthedocs.org/projects/ipyleaflet/badge/?version=latest)](https://ipyleaflet.readthedocs.io/en/latest/?badge=latest)
4+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter-widgets/ipyleaflet/stable?urlpath=lab%2Ftree%2Fexamples)
5+
[![Join the Gitter Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jupyter-widgets/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6+
[![Downloads](https://pepy.tech/badge/ipyleaflet/month)](https://pepy.tech/project/ipyleaflet/month)
7+
8+
A Jupyter / Leaflet bridge enabling interactive maps in the Jupyter notebook.
9+
10+
## Usage
11+
12+
### Selecting a basemap for a leaflet map:
13+
14+
![Basemap Screencast](https://github.com/jupyter-widgets/ipyleaflet/blob/master/python/ipyleaflet/basemap.gif)
15+
16+
### Loading a geojson map:
17+
18+
![GeoJSON Screencast](https://github.com/jupyter-widgets/ipyleaflet/blob/master/python/ipyleaflet/geojson.gif)
19+
20+
### Making use of leafletjs primitives:
21+
22+
![Primitives Screencast](https://github.com/jupyter-widgets/ipyleaflet/blob/master/python/ipyleaflet/primitives.gif)
23+
24+
### Using the splitmap control:
25+
26+
![Splitmap Screencast](https://github.com/jupyter-widgets/ipyleaflet/blob/master/python/ipyleaflet/splitmap.gif)
27+
28+
### Displaying velocity data on the top of a map:
29+
30+
![Velocity Screencast](https://github.com/jupyter-widgets/ipyleaflet/blob/master/python/ipyleaflet/velocity.gif)
31+
32+
### Choropleth layer:
33+
34+
![Choropleth Screencast](https://github.com/jupyter-widgets/ipyleaflet/blob/master/python/ipyleaflet/choropleth.gif)
35+
36+
### Widget control
37+
38+
![Widget Control](https://github.com/jupyter-widgets/ipyleaflet/blob/master/python/ipyleaflet/widget_control.gif)
39+
40+
## Installation
41+
42+
Using conda:
43+
44+
```
45+
conda install -c conda-forge ipyleaflet
46+
```
47+
48+
Using pip:
49+
50+
```
51+
pip install ipyleaflet
52+
```
53+
54+
## Installation from sources
55+
56+
For a development installation (requires yarn, you can install it with `conda install -c conda-forge yarn`):
57+
58+
```
59+
git clone https://github.com/jupyter-widgets/ipyleaflet.git
60+
cd ipyleaflet
61+
(cd python/jupyter_leaflet; pip install -e .)
62+
(cd python/ipyleaflet; pip install -e .)
63+
```
64+
65+
For developing with JupyterLab:
66+
67+
```
68+
jupyter labextension develop --overwrite jupyter_leaflet
69+
```
70+
71+
## Documentation
72+
73+
To get started with using `ipyleaflet`, check out the full documentation
74+
75+
https://ipyleaflet.readthedocs.io/
76+
77+
## License
78+
79+
We use a shared copyright model that enables all contributors to maintain the
80+
copyright on their contributions.
81+
82+
This software is licensed under the MIT license. See the [LICENSE](LICENSE) file for details.
83+
84+
## Related projects
85+
86+
The `ipyleaflet` repository includes the `jupyter-leaflet` npm package, which
87+
is a front-end component, and the `ipyleaflet` python package which is the
88+
backend for the Python Jupyter kernel.
89+
90+
Similarly, the [`xleaflet`](https://github.com/jupyter-xeus/xleaflet/) project
91+
provides a backend to `jupyter-leaflet` for the "xeus-cling" C++ Jupyter
92+
kernel.
93+
94+
![Xleaflet Screencast](xleaflet.gif)
File renamed without changes.
File renamed without changes.
File renamed without changes.

python/ipyleaflet_core/ipyleaflet/_version.py python/ipyleaflet/ipyleaflet/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Distributed under the terms of the Modified BSD License.
33

44
EXTENSION_VERSION = "^0.18"
5-
__version__ = "0.18.1"
5+
__version__ = "0.18.1"
File renamed without changes.

python/ipyleaflet/pyproject.toml

+25-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
[build-system]
22
requires = [
33
"hatchling",
4-
"jupyterlab==4.*",
54
]
65
build-backend = "hatchling.build"
76

87
[project]
98
name = "ipyleaflet"
10-
version = "0.18.1"
119
description = "A Jupyter widget for dynamic Leaflet maps"
12-
readme = "../../README.md"
10+
readme = "README.md"
1311
authors = [
1412
{ name = "Project Jupyter", email = "[email protected]" },
1513
]
@@ -29,12 +27,33 @@ classifiers = [
2927
]
3028
requires-python = ">=3.8"
3129
dependencies = [
32-
"ipyleaflet_core",
33-
"jupyter_leaflet",
30+
"ipywidgets>=7.6.0,<9",
31+
"traittypes>=0.2.1,<3",
32+
"xyzservices>=2021.8.1",
33+
"branca>=0.5.0",
34+
# Is there no automatic way to compute this with hatch??
35+
"jupyter_leaflet>=0.18,<0.19",
3436
]
37+
dynamic = [
38+
"version",
39+
]
40+
41+
[tool.hatch.version]
42+
path = "ipyleaflet/_version.py"
43+
source = "code"
3544

3645
[project.urls]
3746
Homepage = "https://github.com/jupyter-widgets/ipyleaflet"
3847

3948
[tool.hatch.build.targets.wheel]
40-
packages = ["ipyleaflet_core", "jupyer_leaflet"]
49+
packages = ["ipyleaflet"]
50+
51+
[tool.ruff]
52+
extend-include = ["*.ipynb"]
53+
54+
[tool.ruff.lint]
55+
select = [
56+
# pycodestyle
57+
"E",
58+
]
59+
ignore = ["E501", "E731"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

python/ipyleaflet_core/LICENSE

-21
This file was deleted.

python/ipyleaflet_core/README.md

-1
This file was deleted.

0 commit comments

Comments
 (0)