Skip to content

Commit

Permalink
JupyterLab 3 build
Browse files Browse the repository at this point in the history
Signed-off-by: martinRenou <martin.renou@gmail.com>
  • Loading branch information
martinRenou committed Oct 13, 2020
1 parent 0d928b6 commit 083631e
Show file tree
Hide file tree
Showing 9 changed files with 2,063 additions and 49 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ build/
node_modules/

# Generated Javascript
ipympl/static/
ipympl/staticlab/
ipympl/nbextension/
ipympl/labextension/
ipympl/*.tgz
js/*.tgz

Expand Down
43 changes: 22 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,27 @@ cache:
directories:
- $HOME/.npm
before_install:
- wget https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz
- mkdir geckodriver
- tar -xzf geckodriver-v0.11.1-linux64.tar.gz -C geckodriver
- export PATH=$PATH:$PWD/geckodriver
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start || true
- wget https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz
- mkdir geckodriver
- tar -xzf geckodriver-v0.11.1-linux64.tar.gz -C geckodriver
- export PATH=$PATH:$PWD/geckodriver
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start || true
install:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda install -c conda-forge nodejs=13 notebook matplotlib ipywidgets jupyterlab
- pip install -v .
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda install -c conda-forge nodejs=13 notebook matplotlib ipywidgets jupyterlab
- pip install -v .
script:
- jupyter nbextension install --py --symlink --sys-prefix ipympl
- jupyter nbextension enable --py --sys-prefix ipympl
- jupyter labextension list 2>&1 | grep -q jupyter-matplotlib
- jupyter labextension install @jupyter-widgets/jupyterlab-manager
- jupyter labextension link js
- python -m jupyterlab.browser_check --NotebookApp.ip=127.0.0.1
- test -d $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-matplotlib
- test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-matplotlib/extension.js
- test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-matplotlib/index.js
- test -d $CONDA_PREFIX/share/jupyter/labextensions/jupyter-matplotlib
- test -f $CONDA_PREFIX/share/jupyter/labextensions/jupyter-matplotlib/package.json
- jupyter labextension list 2>&1 | grep -q jupyter-matplotlib
- python -m jupyterlab.browser_check --NotebookApp.ip=127.0.0.1
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
recursive-include ipympl/static *.*
recursive-include ipympl/nbextension *.*
recursive-include ipympl/labextension *.*

include js/*.tgz
include js/package.json
Expand Down
9 changes: 8 additions & 1 deletion ipympl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@
npm_pkg_name = 'jupyter-matplotlib'


def _jupyter_labextension_paths():
return [{
'src': 'labextension',
'dest': npm_pkg_name
}]


def _jupyter_nbextension_paths():
return [{
'section': 'notebook',
'src': 'static',
'src': 'nbextension',
'dest': npm_pkg_name,
'require': npm_pkg_name + '/extension'
}]
Expand Down
Loading

0 comments on commit 083631e

Please sign in to comment.