Skip to content

Commit

Permalink
Merge pull request #714 from martinRenou/jupyterlab3
Browse files Browse the repository at this point in the history
JupyterLab 3 update
  • Loading branch information
martinRenou authored Jan 4, 2021
2 parents 6637471 + eb1bf2b commit 002feec
Show file tree
Hide file tree
Showing 11 changed files with 18,451 additions and 9,720 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,26 @@ jobs:
mamba-version: "*"
channels: conda-forge

- name: Conda install dependencies
- name: Mamba install dependencies
shell: bash -l {0}
run: mamba install python=${{ matrix.python-version }} pip nodejs ipywidgets jupyter jupyterlab flake8
run: mamba install python=${{ matrix.python-version }} pip nodejs flake8

- name: Install ipyleaflet
- name: Mamba install JupyterLab 3
shell: bash -l {0}
run: pip install .
run: mamba install jupyterlab=3 ipywidgets=7.6

- name: Install JupyterLab extension (Only on Linux for saving time)
if: matrix.os == 'ubuntu-latest'
- name: Install ipyleaflet
shell: bash -l {0}
run: jupyter labextension install js
run: pip install .

- name: Check installation files
shell: bash -l {0}
run: |
test -d $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-leaflet
test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-leaflet/extension.js
test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-leaflet/index.js
test -d $CONDA_PREFIX/share/jupyter/labextensions/jupyter-leaflet
test -f $CONDA_PREFIX/share/jupyter/labextensions/jupyter-leaflet/package.json
- name: Flake8 check
shell: bash -l {0}
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ build/
node_modules/

# Compiled javascript
ipyleaflet/static/
ipyleaflet/nbextension/
ipyleaflet/labextension/
js/dist/

# OS X
.DS_Store
Expand Down
11 changes: 9 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
recursive-include ipyleaflet/static *.*
recursive-include ipyleaflet/nbextension *.*
recursive-include ipyleaflet/labextension *.*

include jupyter-leaflet.json
include js/*tgz
graft js/src
include js/package.json
include js/webpack.config.js

include LICENSE
include setup.py
include pyproject.toml
9 changes: 8 additions & 1 deletion ipyleaflet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@
pass


def _jupyter_labextension_paths():
return [{
'src': 'labextension',
'dest': 'jupyter-leaflet'
}]


def _jupyter_nbextension_paths():
return [{
'section': 'notebook',
'src': 'static',
'src': 'nbextension',
'dest': 'jupyter-leaflet',
'require': 'jupyter-leaflet/extension'
}]
Loading

0 comments on commit 002feec

Please sign in to comment.