Skip to content

Commit

Permalink
Refactor: remove ipyleaflet-core and have only ipyleaflet and jupyter…
Browse files Browse the repository at this point in the history
…-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
  • Loading branch information
martinRenou committed Apr 23, 2024
1 parent 8a286fc commit 37997d7
Show file tree
Hide file tree
Showing 31 changed files with 133 additions and 220 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- python==${{ matrix.python-version }}
- name: Install ipyleaflet
run: pip install python/jupyter_leaflet python/ipyleaflet_core python/ipyleaflet --no-deps
run: pip install python/jupyter_leaflet python/ipyleaflet --no-deps

- name: Check installation files
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
channels: conda-forge

- name: Install ipyleaflet
run: pip install python/jupyter_leaflet python/ipyleaflet_core python/ipyleaflet --no-deps
run: pip install python/jupyter_leaflet python/ipyleaflet --no-deps

- name: Install browser
run: |
Expand Down
119 changes: 0 additions & 119 deletions README.md

This file was deleted.

1 change: 1 addition & 0 deletions README.md
14 changes: 8 additions & 6 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,23 @@
```sh
git clone [email protected]:jupyter-widgets/ipyleaflet.git
```
2. Update the version numbers in the following files (see https://github.com/jupyter-widgets/ipyleaflet/commit/48f3cb68cd07e6c4ae7b353a17861e4e51ca4471)
- `ipyleaflet/ipyleaflet_core/ipyleaflet/_version.py` (two places)
- `ipyleaflet/python/jupyter_leaflet/package.json`
2. Update the version numbers in the following files
- `python/ipyleaflet/_version.py` (two places)
- `python/jupyter_leaflet/package.json`
- `environment.yml`
3. Make sure the changelog is updated: `CHANGELOG.md`
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`)
```sh
cd ipyleaflet/python/jupyter_leaflet
cd python/jupyter_leaflet
yarn install && yarn run build && yarn publish
cd ..
```
5. Build and publish Python package
```sh
python -m build
twine upload dist/*
python -m build python/jupyter_leaflet
twine upload python/jupyter_leaflet/dist/jupyter_leaflet*
python -m build python/ipyleaflet
twine upload python/ipyleaflet/dist/ipyleaflet*
```
6. Update environment config with new ipyleaflet pypi download link: `docs/jupyterlite_config.json`
7. Commit and push in git
Expand Down
2 changes: 0 additions & 2 deletions docs/build-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,4 @@ dependencies:
- jupyterlite-xeus-python >=0.9.2,<0.10
- pip:
- ../python/jupyter_leaflet
- ../python/ipyleaflet_core
- ../python/ipyleaflet
- ../python/ipyleaflet
2 changes: 0 additions & 2 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ dependencies:
- branca
- pip:
- ../python/jupyter_leaflet
- ../python/ipyleaflet_core
- ../python/ipyleaflet
- ../python/ipyleaflet
95 changes: 94 additions & 1 deletion python/ipyleaflet/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,94 @@
ipyleaflet meta package
# ipyleaflet

[![Documentation](http://readthedocs.org/projects/ipyleaflet/badge/?version=latest)](https://ipyleaflet.readthedocs.io/en/latest/?badge=latest)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter-widgets/ipyleaflet/stable?urlpath=lab%2Ftree%2Fexamples)
[![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)
[![Downloads](https://pepy.tech/badge/ipyleaflet/month)](https://pepy.tech/project/ipyleaflet/month)

A Jupyter / Leaflet bridge enabling interactive maps in the Jupyter notebook.

## Usage

### Selecting a basemap for a leaflet map:

![Basemap Screencast](https://github.com/jupyter-widgets/ipyleaflet/blob/master/python/ipyleaflet/basemap.gif)

### Loading a geojson map:

![GeoJSON Screencast](https://github.com/jupyter-widgets/ipyleaflet/blob/master/python/ipyleaflet/geojson.gif)

### Making use of leafletjs primitives:

![Primitives Screencast](https://github.com/jupyter-widgets/ipyleaflet/blob/master/python/ipyleaflet/primitives.gif)

### Using the splitmap control:

![Splitmap Screencast](https://github.com/jupyter-widgets/ipyleaflet/blob/master/python/ipyleaflet/splitmap.gif)

### Displaying velocity data on the top of a map:

![Velocity Screencast](https://github.com/jupyter-widgets/ipyleaflet/blob/master/python/ipyleaflet/velocity.gif)

### Choropleth layer:

![Choropleth Screencast](https://github.com/jupyter-widgets/ipyleaflet/blob/master/python/ipyleaflet/choropleth.gif)

### Widget control

![Widget Control](https://github.com/jupyter-widgets/ipyleaflet/blob/master/python/ipyleaflet/widget_control.gif)

## Installation

Using conda:

```
conda install -c conda-forge ipyleaflet
```

Using pip:

```
pip install ipyleaflet
```

## Installation from sources

For a development installation (requires yarn, you can install it with `conda install -c conda-forge yarn`):

```
git clone https://github.com/jupyter-widgets/ipyleaflet.git
cd ipyleaflet
(cd python/jupyter_leaflet; pip install -e .)
(cd python/ipyleaflet; pip install -e .)
```

For developing with JupyterLab:

```
jupyter labextension develop --overwrite jupyter_leaflet
```

## Documentation

To get started with using `ipyleaflet`, check out the full documentation

https://ipyleaflet.readthedocs.io/

## License

We use a shared copyright model that enables all contributors to maintain the
copyright on their contributions.

This software is licensed under the MIT license. See the [LICENSE](LICENSE) file for details.

## Related projects

The `ipyleaflet` repository includes the `jupyter-leaflet` npm package, which
is a front-end component, and the `ipyleaflet` python package which is the
backend for the Python Jupyter kernel.

Similarly, the [`xleaflet`](https://github.com/jupyter-xeus/xleaflet/) project
provides a backend to `jupyter-leaflet` for the "xeus-cling" C++ Jupyter
kernel.

![Xleaflet Screencast](xleaflet.gif)
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Distributed under the terms of the Modified BSD License.

EXTENSION_VERSION = "^0.18"
__version__ = "0.18.1"
__version__ = "0.18.1"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
31 changes: 25 additions & 6 deletions python/ipyleaflet/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
[build-system]
requires = [
"hatchling",
"jupyterlab==4.*",
]
build-backend = "hatchling.build"

[project]
name = "ipyleaflet"
version = "0.18.1"
description = "A Jupyter widget for dynamic Leaflet maps"
readme = "../../README.md"
readme = "README.md"
authors = [
{ name = "Project Jupyter", email = "[email protected]" },
]
Expand All @@ -29,12 +27,33 @@ classifiers = [
]
requires-python = ">=3.8"
dependencies = [
"ipyleaflet_core",
"jupyter_leaflet",
"ipywidgets>=7.6.0,<9",
"traittypes>=0.2.1,<3",
"xyzservices>=2021.8.1",
"branca>=0.5.0",
# Is there no automatic way to compute this with hatch??
"jupyter_leaflet>=0.18,<0.19",
]
dynamic = [
"version",
]

[tool.hatch.version]
path = "ipyleaflet/_version.py"
source = "code"

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

[tool.hatch.build.targets.wheel]
packages = ["ipyleaflet_core", "jupyer_leaflet"]
packages = ["ipyleaflet"]

[tool.ruff]
extend-include = ["*.ipynb"]

[tool.ruff.lint]
select = [
# pycodestyle
"E",
]
ignore = ["E501", "E731"]
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
21 changes: 0 additions & 21 deletions python/ipyleaflet_core/LICENSE

This file was deleted.

1 change: 0 additions & 1 deletion python/ipyleaflet_core/README.md

This file was deleted.

Loading

0 comments on commit 37997d7

Please sign in to comment.