Skip to content

Commit 78ba5f7

Browse files
Split Python and JavaScript packages (#1168)
* Split directory structure * Too much green * Rename things * Split packages * Update gitignore * Remove lib dir from git * Restore examples * Update install path in workflow * Update main workflow * Use the right directory name * Update working directory for linter CI * Fix linting CI * Update ui-tests workflow * Update python versions and readme paths * Rename python module * Remove unnecessary files * Update build targets * Update meta build targets * Update doc environments * Remove some files * Update paths in documentation * Remove MANIFEST * Update docs environment files * Update doc environemtns again * Add ipyleaflet to the lite deployment --------- Co-authored-by: martinRenou <[email protected]>
1 parent 22506af commit 78ba5f7

File tree

102 files changed

+286
-158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+286
-158
lines changed

.github/workflows/main.yml

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

3939
- name: Check installation files
4040
run: |
4141
test -d $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-leaflet
4242
test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-leaflet/extension.js
4343
test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-leaflet/index.js
44-
test -d $CONDA_PREFIX/share/jupyter/labextensions/jupyter-leaflet
44+
test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-leaflet/index.js
4545
test -f $CONDA_PREFIX/share/jupyter/labextensions/jupyter-leaflet/package.json
4646
4747
- name: Python Linters
@@ -51,7 +51,7 @@ jobs:
5151
run: |
5252
yarn install
5353
yarn run lint:check
54-
working-directory: js
54+
working-directory: python/jupyter_leaflet
5555

5656
- name: Import check
5757
run: python -c 'import ipyleaflet'

.github/workflows/ui-tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: UI Tests
22

33
on: [push, pull_request]
44

5-
65
defaults:
76
run:
87
shell: bash -l {0}
@@ -26,7 +25,7 @@ jobs:
2625
channels: conda-forge
2726

2827
- name: Install ipyleaflet
29-
run: pip install . --no-deps
28+
run: pip install python/jupyter_leaflet python/ipyleaflet_core python/ipyleaflet --no-deps
3029

3130
- name: Install browser
3231
run: |

.gitignore

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,19 @@ build/
55
*.py[cod]
66
node_modules/
77
*package-lock.json
8-
js/.yarn/
8+
python/jupyter_leaflet/.yarn/
99
ui-tests/.yarn/
1010

1111
# Compiled javascript
12-
ipyleaflet/nbextension/
13-
ipyleaflet/labextension/
14-
js/dist/
15-
js/lib/
12+
python/jupyter_leaflet/nbextension/
13+
python/jupyter_leaflet/labextension/
14+
python/jupyter_leaflet/dist/
15+
python/jupyter_leaflet/lib/
1616

1717
# OS X
1818
.DS_Store
1919
.idea/
2020

21-
js/jupyter-leaflet-*.tgz
22-
2321
# Documentation data files
2422
docs/*.csv
2523
docs/*.json

MANIFEST.in

Lines changed: 0 additions & 11 deletions
This file was deleted.

RELEASE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
git clone [email protected]:jupyter-widgets/ipyleaflet.git
66
```
77
2. Update the version numbers in the following files (see https://github.com/jupyter-widgets/ipyleaflet/commit/48f3cb68cd07e6c4ae7b353a17861e4e51ca4471)
8-
- `ipyleaflet/_version.py` (two places)
9-
- `js/package.json`
8+
- `ipyleaflet/ipyleaflet_core/ipyleaflet/_version.py` (two places)
9+
- `ipyleaflet/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 js
14+
cd ipyleaflet/python/jupyter_leaflet
1515
yarn install && yarn run build && yarn publish
1616
cd ..
1717
```
@@ -20,7 +20,7 @@
2020
python -m build
2121
twine upload dist/*
2222
```
23-
6. Update environment environment config with new ipyleaflet pypi download link: `docs/jupyterlite_config.json`
23+
6. Update environment config with new ipyleaflet pypi download link: `docs/jupyterlite_config.json`
2424
7. Commit and push in git
2525
```sh
2626
git commit -am "Release <VERSION>"

docs/build-environment.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dependencies:
88
- jupyterlab~=4.0
99
- jupyter-packaging~=0.12
1010
- jupyter-sphinx
11+
- build
1112
- scipy
1213
- netcdf4
1314
- geopandas
@@ -18,4 +19,7 @@ dependencies:
1819
- jupyterlite-sphinx
1920
- jupyterlite-xeus-python >=0.9.2,<0.10
2021
- pip:
21-
- ..
22+
- ../python/jupyter_leaflet
23+
- ../python/ipyleaflet_core
24+
- ../python/ipyleaflet
25+
- ../python/ipyleaflet

docs/environment.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ dependencies:
99
- xyzservices
1010
- branca
1111
- pip:
12-
- ..
12+
- ../python/jupyter_leaflet
13+
- ../python/ipyleaflet_core
14+
- ../python/ipyleaflet
15+
- ../python/ipyleaflet

docs/installation/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Note for developers:
4848
- the ``-e`` pip option allows one to modify the Python code in-place. Restart the kernel in order to see the changes.
4949
- the ``--symlink`` argument on Linux or OS X allows one to modify the JavaScript code in-place. This feature is not available with Windows.
5050

51-
For automatically building the JavaScript code every time there is a change, run the following command from the ``ipyleaflet/js/`` directory:
51+
For automatically building the JavaScript code every time there is a change, run the following command from the ``ipyleaflet/python/jupyter_leaflet`` directory:
5252

5353
.. code:: bash
5454

js/.prettierignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

jupyter-leaflet.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)