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

Refactor: remove ipyleaflet-core and have only ipyleaflet and jupyter-leaflet packages #1189

Merged
merged 8 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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/*
python -m build python/ipyleaflet
twine upload python/ipyleaflet/dist/*
```
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
119 changes: 118 additions & 1 deletion python/ipyleaflet/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,118 @@
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](basemap.gif)

### Loading a geojson map:

![GeoJSON Screencast](geojson.gif)

### Making use of leafletjs primitives:

![Primitives Screencast](primitives.gif)

### Using the splitmap control:

![Splitmap Screencast](splitmap.gif)

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

![Velocity Screencast](velocity.gif)

### Choropleth layer:

![Choropleth Screencast](choropleth.gif)

### Widget control

![Widget Control](widget_control.gif)

## Installation

Using conda:

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

Using pip:

```
pip install ipyleaflet
```

If you are using the classic Jupyter Notebook < 5.3 you need to run this extra command:

```
jupyter nbextension enable --py --sys-prefix ipyleaflet
```

If you are using JupyterLab <=2, you will need to install the JupyterLab extension:

```
jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-leaflet
```

## 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 .)
```

If you are using the classic Jupyter Notebook you need to install the nbextension:

```
jupyter nbextension install --py --symlink --sys-prefix --overwrite ipyleaflet
jupyter nbextension enable --py --sys-prefix ipyleaflet
```

Note for developers:

- the ``-e`` pip option allows one to modify the Python code in-place. Restart the kernel in order to see the changes.
- the ``--symlink`` argument on Linux or OS X allows one to modify the JavaScript code in-place. This feature is not available with Windows.

For developing with JupyterLab:

```
jupyter labextension develop --overwrite ipyleaflet
```

## 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
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
25 changes: 21 additions & 4 deletions python/ipyleaflet/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ build-backend = "hatchling.build"

[project]
name = "ipyleaflet"
version = "0.18.1"
description = "A Jupyter widget for dynamic Leaflet maps"
readme = "../../README.md"
authors = [
Expand All @@ -29,12 +28,30 @@ 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.19,<0.20"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would love to resolve that at some point. But let's not make it a blocker for the PR.

]

[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
Loading