Coder Social home page Coder Social logo

jupyter-widgets / jupyterlab-sidecar Goto Github PK

View Code? Open in Web Editor NEW
241.0 15.0 39.0 3.8 MB

A sidecar output widget for JupyterLab

License: BSD 3-Clause "New" or "Revised" License

CSS 6.66% Python 16.49% TypeScript 68.79% JavaScript 8.05%
jupyterlab-extension

jupyterlab-sidecar's Introduction

Sidecar

Build Status codecov

A sidecar output widget for JupyterLab

Installation

pip install sidecar

or

conda install sidecar

If you use JupyterLab <=2:

jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install @jupyter-widgets/jupyterlab-sidecar

Usage

The sidecar widget is used as a context manager, just like ipywidgets' output widget.

from sidecar import Sidecar
from ipywidgets import IntSlider

sc = Sidecar(title='Sidecar Output')
sl = IntSlider(description='Some slider')
with sc:
    display(sl)

When a single output is displayed in a Sidecar, it is allowed to occupy all of the vertical space available. If more content is displayed, the natural height is used instead.

sidecar

Development

# Create a new conda environment
conda create -n jupyterlab-sidecar -c conda-forge jupyterlab ipywidgets nodejs -y

# Activate the conda environment
conda activate jupyterlab-sidecar

# Install package in development mode
pip install -e .

# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite

# Rebuild extension Typescript source after making changes
jlpm run build

You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.

# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm run watch
# Run JupyterLab in another terminal
jupyter lab

With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).

By default, the jlpm run build command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:

jupyter lab build --minimize=False

Uninstall

pip uninstall sidecar

or

conda uninstall sidecar

jupyterlab-sidecar's People

Contributors

consideratio avatar dependabot[bot] avatar dsblank avatar fcollonval avatar ianhi avatar jasongrout avatar jtpio avatar krassowski avatar mariusvniekerk avatar martinrenou avatar mwcraig avatar sylvaincorlay avatar toddrme2178 avatar tylere avatar vidartf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jupyterlab-sidecar's Issues

Support JupyterLab 2

Currently, jupyterlab-sidecar doesn't support jupyterlab 2.0.0 or above.

Though I managed to get it to work on my machine ๐Ÿ˜„ (opening PR soon)

bumping to jupyterlab v4

Hi! My colleague @kushalkolar and I are wondering if you guys plan on bumping to jupyterlab v4 anytime soon?! We would love to include jupyterlab-sidecar as a notebook dependency in our plotting library fastplotlib, but we wanted to see what your future plans for maintenance are first.

Many thanks!

Package for conda-forge

We also need to add the assets to the wheel and conda package to trigger the jupyterlab rebuild.

Question: How to change sidecar width from code

For larger content in the sidecar, I always resize the sidecar manually - every single time. Reason being, I haven't found a way to open sidecar with a predefined width.

Is there a way to open a sidecar with a different width than the default?

Testing if a Sidecar tab is still open

How do I test to see if a sidecar is still open and has not been closed by a user ?

currently I close the side car and reopen it in my code, because if you manually close the side car the open() method does nothing. There does not seem to be any variables I can access to indicate status.

can't install from master

trying to install from master in a jupyter 1 env (with yarn and nodejs)

pip install sidecar==0.4.0
Collecting sidecar==0.4.0
  ERROR: Could not find a version that satisfies the requirement sidecar==0.4.0 (from versions: 0.1.0.dev0, 0.2.0, 0.3.0)
ERROR: No matching distribution found for sidecar==0.4.0

in the repo on master (it seems to want to install 0.3.0 anyways):

Processing /git/jupyterlab-sidecar
Collecting ipywidgets>=7.5.0 (from sidecar==0.3.0)
  Using cached https://files.pythonhosted.org/packages/86/c2/20a3514f87fc063b4853673966e85c091843de659374d6e1dd046319815a/ipywidgets-7.5.0-py2.py3-none-any.whl
Collecting widgetsnbextension~=3.5.0 (from ipywidgets>=7.5.0->sidecar==0.3.0)
  Using cached https://files.pythonhosted.org/packages/04/2b/32408aa2aaf5230450903b148dae888734add9e2fc190a817811546d2f93/widgetsnbextension-3.5.0-py2.py3-none-any.whl
Requirement already satisfied: ipython>=4.0.0; python_version >= "3.3" in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from ipywidgets>=7.5.0->sidecar==0.3.0) (7.6.1)
Requirement already satisfied: ipykernel>=4.5.1 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from ipywidgets>=7.5.0->sidecar==0.3.0) (5.1.1)
Requirement already satisfied: traitlets>=4.3.1 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from ipywidgets>=7.5.0->sidecar==0.3.0) (4.3.2)
Requirement already satisfied: nbformat>=4.2.0 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from ipywidgets>=7.5.0->sidecar==0.3.0) (4.4.0)
Requirement already satisfied: notebook>=4.4.1 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from widgetsnbextension~=3.5.0->ipywidgets>=7.5.0->sidecar==0.3.0) (5.7.8)
Requirement already satisfied: jedi>=0.10 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.5.0->sidecar==0.3.0) (0.14.0)
Requirement already satisfied: pygments in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.5.0->sidecar==0.3.0) (2.4.2)
Requirement already satisfied: decorator in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.5.0->sidecar==0.3.0) (4.4.0)
Requirement already satisfied: setuptools>=18.5 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.5.0->sidecar==0.3.0) (41.0.1)
Requirement already satisfied: pickleshare in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.5.0->sidecar==0.3.0) (0.7.5)
Requirement already satisfied: prompt-toolkit<2.1.0,>=2.0.0 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.5.0->sidecar==0.3.0) (2.0.9)
Requirement already satisfied: pexpect; sys_platform != "win32" in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.5.0->sidecar==0.3.0) (4.7.0)
Requirement already satisfied: appnope; sys_platform == "darwin" in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.5.0->sidecar==0.3.0) (0.1.0)
Requirement already satisfied: backcall in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.5.0->sidecar==0.3.0) (0.1.0)
Requirement already satisfied: jupyter-client in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.5.0->sidecar==0.3.0) (5.2.4)
Requirement already satisfied: tornado>=4.2 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.5.0->sidecar==0.3.0) (6.0.3)
Requirement already satisfied: ipython_genutils in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from traitlets>=4.3.1->ipywidgets>=7.5.0->sidecar==0.3.0) (0.2.0)
Requirement already satisfied: six in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from traitlets>=4.3.1->ipywidgets>=7.5.0->sidecar==0.3.0) (1.12.0)
Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from nbformat>=4.2.0->ipywidgets>=7.5.0->sidecar==0.3.0) (3.0.1)
Requirement already satisfied: jupyter_core in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from nbformat>=4.2.0->ipywidgets>=7.5.0->sidecar==0.3.0) (4.4.0)
Requirement already satisfied: terminado>=0.8.1 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.5.0->sidecar==0.3.0) (0.8.2)
Requirement already satisfied: nbconvert in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.5.0->sidecar==0.3.0) (5.5.0)
Requirement already satisfied: Send2Trash in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.5.0->sidecar==0.3.0) (1.5.0)
Requirement already satisfied: pyzmq>=17 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.5.0->sidecar==0.3.0) (18.0.2)
Requirement already satisfied: prometheus-client in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.5.0->sidecar==0.3.0) (0.7.1)
Requirement already satisfied: jinja2 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.5.0->sidecar==0.3.0) (2.10.1)
Requirement already satisfied: parso>=0.3.0 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from jedi>=0.10->ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.5.0->sidecar==0.3.0) (0.5.0)
Requirement already satisfied: wcwidth in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from prompt-toolkit<2.1.0,>=2.0.0->ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.5.0->sidecar==0.3.0) (0.1.7)
Requirement already satisfied: ptyprocess>=0.5 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from pexpect; sys_platform != "win32"->ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.5.0->sidecar==0.3.0) (0.6.0)
Requirement already satisfied: python-dateutil>=2.1 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from jupyter-client->ipykernel>=4.5.1->ipywidgets>=7.5.0->sidecar==0.3.0) (2.8.0)
Requirement already satisfied: attrs>=17.4.0 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets>=7.5.0->sidecar==0.3.0) (19.1.0)
Requirement already satisfied: pyrsistent>=0.14.0 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets>=7.5.0->sidecar==0.3.0) (0.15.3)
Requirement already satisfied: entrypoints>=0.2.2 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.5.0->sidecar==0.3.0) (0.3)
Requirement already satisfied: defusedxml in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.5.0->sidecar==0.3.0) (0.5.0)
Requirement already satisfied: bleach in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.5.0->sidecar==0.3.0) (3.1.0)
Requirement already satisfied: pandocfilters>=1.4.1 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.5.0->sidecar==0.3.0) (1.4.2)
Requirement already satisfied: testpath in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.5.0->sidecar==0.3.0) (0.4.2)
Requirement already satisfied: mistune>=0.8.1 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.5.0->sidecar==0.3.0) (0.8.4)
Requirement already satisfied: MarkupSafe>=0.23 in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from jinja2->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.5.0->sidecar==0.3.0) (1.1.1)
Requirement already satisfied: webencodings in /Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages (from bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.5.0->sidecar==0.3.0) (0.5.1)
Building wheels for collected packages: sidecar
  Building wheel for sidecar (setup.py) ... error
  ERROR: Complete output from command /Users/doutriaux1/miniconda3/envs/jup_1/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-wheel-4pufzsnn --python-tag cp37:
  ERROR: running bdist_wheel
  running jsdeps
  Installing build dependencies with npm.  This may take a while...
  > yarn install
  yarn install v1.16.0
  warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
  [1/4] Resolving packages...
  [2/4] Fetching packages...
  [3/4] Linking dependencies...
  warning "@jupyter-widgets/jupyterlab-manager > @jupyterlab/notebook > @jupyterlab/ui-components > @blueprintjs/[email protected]" has unmet peer dependency "react-dom@^15.3.0 || 16".
  warning "@jupyter-widgets/jupyterlab-manager > @jupyterlab/notebook > @jupyterlab/ui-components > @blueprintjs/core > [email protected]" has unmet peer dependency "react-dom@>=15.0.0".
  warning " > [email protected]" has incorrect peer dependency "typescript@2".
  [4/4] Building fresh packages...
  warning Error running install script for optional dependency: "/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/fsevents: Command failed.
  Exit code: 1
  Command: node install
  Arguments:
  Directory: /private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/fsevents
  Output:
  node-pre-gyp info it worked if it ends with ok
  node-pre-gyp info using [email protected]
  node-pre-gyp info using [email protected] | darwin | x64
  node-pre-gyp info check checked for \"/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node\" (not found)
  node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz
  node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz
  node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz
  node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
  node-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz
  gyp info it worked if it ends with ok
  gyp info using [email protected]
  gyp info using [email protected] | darwin | x64
  gyp info ok
  gyp info it worked if it ends with ok
  gyp info using [email protected]
  gyp info using [email protected] | darwin | x64
  gyp ERR! configure error
  gyp ERR! stack Error: Command failed: /Users/doutriaux1/miniconda3/envs/jup_1/bin/python -c import sys; print \"%s.%s.%s\" % sys.version_info[:3];
  gyp ERR! stack   File \"<string>\", line 1
  gyp ERR! stack     import sys; print \"%s.%s.%s\" % sys.version_info[:3];
  gyp ERR! stack                                ^
  gyp ERR! stack SyntaxError: invalid syntax
  gyp ERR! stack
  gyp ERR! stack     at ChildProcess.exithandler (child_process.js:299:12)
  gyp ERR! stack     at ChildProcess.emit (events.js:193:13)
  gyp ERR! stack     at maybeClose (internal/child_process.js:999:16)
  gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:403:11)
  gyp ERR! stack     at Socket.emit (events.js:193:13)
  gyp ERR! stack     at Pipe._handle.close (net.js:614:12)
  gyp ERR! System Darwin 18.6.0
  gyp ERR! command \"/Users/doutriaux1/miniconda3/envs/jup_1/bin/node\" \"/Users/doutriaux1/miniconda3/envs/jup_1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"configure\" \"--fallback-to-build\" \"--module=/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64\" \"--napi_version=4\" \"--node_abi_napi=napi\"
  gyp ERR! cwd /private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/fsevents
  gyp ERR! node -v v11.14.0
  gyp ERR! node-gyp -v v3.8.0
  gyp ERR! not ok
  node-pre-gyp ERR! build error
  node-pre-gyp ERR! stack Error: Failed to execute '/Users/doutriaux1/miniconda3/envs/jup_1/bin/node /Users/doutriaux1/miniconda3/envs/jup_1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
  node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
  node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:193:13)
  node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:999:16)
  node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5)
  node-pre-gyp ERR! System Darwin 18.6.0
  node-pre-gyp ERR! command \"/Users/doutriaux1/miniconda3/envs/jup_1/bin/node\" \"/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
  node-pre-gyp ERR! cwd /private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/fsevents
  node-pre-gyp ERR! node -v v11.14.0
  node-pre-gyp ERR! node-pre-gyp -v v0.10.0
  node-pre-gyp ERR! not ok
  Failed to execute '/Users/doutriaux1/miniconda3/envs/jup_1/bin/node /Users/doutriaux1/miniconda3/envs/jup_1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)"
  info This module is OPTIONAL, you can safely ignore this error
  success Saved lockfile.
  $ npm run build:lib
  npm WARN lifecycle The node binary used for scripts is /var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/yarn--1562590956110-0.0010464318903755654/node but npm is using /Users/doutriaux1/miniconda3/envs/jup_1/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
  
  > @jupyter-widgets/[email protected] build:lib /private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit
  > tsc
  
  node_modules/@jupyter-widgets/jupyterlab-manager/lib/renderer.d.ts(8,22): error TS2420: Class 'WidgetRenderer' incorrectly implements interface 'IRenderer'.
    Types of property 'title' are incompatible.
      Type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@jupyter-widgets/base/node_modules/@phosphor/widgets/lib/title").Title<import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@jupyter-widgets/base/node_modules/@phosphor...' is not assignable to type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@phosphor/widgets/lib/title").Title<import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@phosphor/widgets/lib/widget").Widget>'.
        Types of property 'owner' are incompatible.
          Type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@jupyter-widgets/base/node_modules/@phosphor/widgets/lib/widget").Widget' is not assignable to type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@phosphor/widgets/lib/widget").Widget'.
            Types of property 'layout' are incompatible.
              Type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@jupyter-widgets/base/node_modules/@phosphor/widgets/lib/layout").Layout' is not assignable to type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@phosphor/widgets/lib/layout").Layout'.
                Types of property 'removeWidget' are incompatible.
                  Type '(widget: import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@jupyter-widgets/base/node_modules/@phosphor/widgets/lib/widget").Widget) => void' is not assignable to type '(widget: import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@phosphor/widgets/lib/widget").Widget) => void'.
                    Types of parameters 'widget' and 'widget' are incompatible.
                      Type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@phosphor/widgets/lib/widget").Widget' is not assignable to type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@jupyter-widgets/base/node_modules/@phosphor/widgets/lib/widget").Widget'.
                        Types of property 'title' are incompatible.
                          Type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@phosphor/widgets/lib/title").Title<import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@phosphor/widgets/lib/widget").Widget>' is not assignable to type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@jupyter-widgets/base/node_modules/@phosphor/widgets/lib/title").Title<import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@jupyter-widgets/base/node_modules/@phosphor...'.
                            Types have separate declarations of a private property '_label'.
  node_modules/@types/backbone/index.d.ts(101,60): error TS2694: Namespace 'JQuery' has no exported member 'TriggeredEvent'.
  src/plugin.ts(34,14): error TS2322: Type 'Token<IJupyterWidgetRegistry>' is not assignable to type 'Token<any>'.
    Types have separate declarations of a private property '_tokenStructuralPropertyT'.
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! @jupyter-widgets/[email protected] build:lib: `tsc`
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the @jupyter-widgets/[email protected] build:lib script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /Users/doutriaux1/.npm/_logs/2019-07-08T13_02_46_779Z-debug.log
  error Command failed with exit code 1.
  info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/setup.py", line 109, in <module>
      setup(**setup_args)
    File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
      return distutils.core.setup(**attrs)
    File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/setupbase.py", line 469, in run
      [self.run_command(cmd) for cmd in cmds]
    File "/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/setupbase.py", line 469, in <listcomp>
      [self.run_command(cmd) for cmd in cmds]
    File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/setupbase.py", line 265, in run
      c.run()
    File "/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/setupbase.py", line 364, in run
      run(npm_cmd + ['install'], cwd=node_package)
    File "/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/setupbase.py", line 216, in run
      return subprocess.check_call(cmd, **kwargs)
    File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/subprocess.py", line 347, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/Users/doutriaux1/miniconda3/envs/jup_1/bin/yarn', 'install']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for sidecar
  Running setup.py clean for sidecar
Failed to build sidecar
Installing collected packages: widgetsnbextension, ipywidgets, sidecar
  Running setup.py install for sidecar ... error
    ERROR: Complete output from command /Users/doutriaux1/miniconda3/envs/jup_1/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-record-j6o5ftda/install-record.txt --single-version-externally-managed --compile:
    ERROR: running install
    running build
    running build_py
    running jsdeps
    > yarn run build:all
    yarn run v1.16.0
    $ npm run build:lib && npm run build:labextension
    npm WARN lifecycle The node binary used for scripts is /var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/yarn--1562590969186-0.07600993415320612/node but npm is using /Users/doutriaux1/miniconda3/envs/jup_1/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
    
    > @jupyter-widgets/[email protected] build:lib /private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit
    > tsc
    
    node_modules/@jupyter-widgets/jupyterlab-manager/lib/renderer.d.ts(8,22): error TS2420: Class 'WidgetRenderer' incorrectly implements interface 'IRenderer'.
      Types of property 'title' are incompatible.
        Type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@jupyter-widgets/base/node_modules/@phosphor/widgets/lib/title").Title<import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@jupyter-widgets/base/node_modules/@phosphor...' is not assignable to type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@phosphor/widgets/lib/title").Title<import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@phosphor/widgets/lib/widget").Widget>'.
          Types of property 'owner' are incompatible.
            Type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@jupyter-widgets/base/node_modules/@phosphor/widgets/lib/widget").Widget' is not assignable to type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@phosphor/widgets/lib/widget").Widget'.
              Types of property 'layout' are incompatible.
                Type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@jupyter-widgets/base/node_modules/@phosphor/widgets/lib/layout").Layout' is not assignable to type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@phosphor/widgets/lib/layout").Layout'.
                  Types of property 'removeWidget' are incompatible.
                    Type '(widget: import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@jupyter-widgets/base/node_modules/@phosphor/widgets/lib/widget").Widget) => void' is not assignable to type '(widget: import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@phosphor/widgets/lib/widget").Widget) => void'.
                      Types of parameters 'widget' and 'widget' are incompatible.
                        Type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@phosphor/widgets/lib/widget").Widget' is not assignable to type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@jupyter-widgets/base/node_modules/@phosphor/widgets/lib/widget").Widget'.
                          Types of property 'title' are incompatible.
                            Type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@phosphor/widgets/lib/title").Title<import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@phosphor/widgets/lib/widget").Widget>' is not assignable to type 'import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@jupyter-widgets/base/node_modules/@phosphor/widgets/lib/title").Title<import("/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/node_modules/@jupyter-widgets/base/node_modules/@phosphor...'.
                              Types have separate declarations of a private property '_label'.
    node_modules/@types/backbone/index.d.ts(101,60): error TS2694: Namespace 'JQuery' has no exported member 'TriggeredEvent'.
    src/plugin.ts(34,14): error TS2322: Type 'Token<IJupyterWidgetRegistry>' is not assignable to type 'Token<any>'.
      Types have separate declarations of a private property '_tokenStructuralPropertyT'.
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! @jupyter-widgets/[email protected] build:lib: `tsc`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the @jupyter-widgets/[email protected] build:lib script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/doutriaux1/.npm/_logs/2019-07-08T13_02_56_038Z-debug.log
    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/setup.py", line 109, in <module>
        setup(**setup_args)
      File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/setupbase.py", line 469, in run
        [self.run_command(cmd) for cmd in cmds]
      File "/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/setupbase.py", line 469, in <listcomp>
        [self.run_command(cmd) for cmd in cmds]
      File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/setupbase.py", line 265, in run
        c.run()
      File "/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/setupbase.py", line 370, in run
        run(npm_cmd + ['run', build_cmd], cwd=node_package)
      File "/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/setupbase.py", line 216, in run
        return subprocess.check_call(cmd, **kwargs)
      File "/Users/doutriaux1/miniconda3/envs/jup_1/lib/python3.7/subprocess.py", line 347, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/Users/doutriaux1/miniconda3/envs/jup_1/bin/yarn', 'run', 'build:all']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command "/Users/doutriaux1/miniconda3/envs/jup_1/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-record-j6o5ftda/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/nv/3xl0t1xx4yxb6tyd0yqdm238001cpd/T/pip-req-build-z0pjlsit/

CSS layout changed with jupyter 1.0 upgrade

This commit

aab5071

added "display: flex" to the CSS, causing a change in layout when showing multiple elements.
Example:
sc = Sidecar(...)
with sc:
display(widgets.Label("A"))
display(widgets.Label("B"))

Used to show
A
B
Like it would in a normal output cell

Now it shows
A B

Tests are not passing

In the tests there is an

import {
  ExampleModel, ExampleView
} from '../../src/'

But there is no definition of those types in the code base

jupyterlab-sidecar compatibility with jupyter 1.0

It seems that the sidecar extension is going to be broken once JupyterLab 1.0 is released. I noticed the sidecar extension (which my extension uses) is no longer working after I updated my extension for jupyterlab 1.0 release.

How to programmatically close a sidecar (or all sidecars)?

In my development loop, I frequently will need to restart the kernel in jupyter, which unlinks sidecars and leaves an unusable pane that I have to close. Reloading sidecars after a kernel restart gives a new tab instead of re-using the old one. Is there a way to easily close old sidecar tabs other than clicking on the X? I have a bunch of sidecar tabs loaded, and it gets cumbersome to click them all closed every time I restart the kernel.

Apologies that I'm using the issue tracker to ask a question; if this functionality exists, I guess this is a documentation request. If it doesn't, it's a feature request :).

Document how to modify layout/styles

Several issues point out that the current flex style prevents proper control of the content in sidecar, #6, #25.

I have expected Sidecar(title='', layout={'overflow': 'auto'}) to work as Sidecar inherits from Output which accepts layout argument (and passes the arguments to HTML), but for Sidecar those appear to be ignored. How do I control layout in the sidecar?

No display in sidecar when using Tab widget with GridSpecLayout and Ipyleaflet

I created a simple app using Ipywidgets where I used GridSpecLayout to define the layout of my app and then used a tab within the GridSpecLayout to have multiple tabs for the map.

Code with Tab widget

        self.app = GridspecLayout(9, 8, width='auto', height='600px')
        self.app[:, 2:] = Tab()
        self.app[0, :2] = VBox([Label("Vector:"), self._geomSelector])
        self.app[1, :2] = VBox([Label("Forcing GCM:"), self._gcmSelector])
        self.app[2, :2] = VBox([Label("Projection Year:"), self._yearsSelector])
        self.app[3, :2] = VBox([Label("Variable:"), self._variableSelector])
        self.app[4, :2] = VBox([Label("Frequency:"), self._freqSelector])
        self.app[5, :2] = VBox([Label("Time Slice:"), self._timeSelector])
        self.app[6:8, :2] = VBox([Label("Emission Scenario:"), self._emissionSelector])
        raster_im = self.get_overlay()

        self.app[:, 2:].children = [self.map]
        self.app[:, 2:].set_title(0, "State")
        self.map.add_layer(self._geoms[self._geomSelector.value])
        self.map.add_layer(raster_im)

Code without tab widget

        self.app = GridspecLayout(9, 8, width='auto', height='600px')
        self.app[:, 2:] = self.map
        self.app[0, :2] = VBox([Label("Vector:"), self._geomSelector])
        self.app[1, :2] = VBox([Label("Forcing GCM:"), self._gcmSelector])
        self.app[2, :2] = VBox([Label("Projection Year:"), self._yearsSelector])
        self.app[3, :2] = VBox([Label("Variable:"), self._variableSelector])
        self.app[4, :2] = VBox([Label("Frequency:"), self._freqSelector])
        self.app[5, :2] = VBox([Label("Time Slice:"), self._timeSelector])
        self.app[6:8, :2] = VBox([Label("Emission Scenario:"), self._emissionSelector])
        raster_im = self.get_overlay()

        self.map.add_layer(self._geoms[self._geomSelector.value])
        self.map.add_layer(raster_im)

When I used the code without tab widget, I could see the app in the Sidecar, however, when I used the tab widget, I can't see the map in the Sidecar.

Screenshot of app in Sidecar without Tab widget

sidecar_without_tab_widget

Screenshot of app in Sidecar with Tab widget

sidecar_with_tab_widget

Screenshot of app in notebook code cell

app_in_notebook_cell

I am not sure if this is some kind of incompatibility of Sidecar with the tab widget. The following screenshot show the behaviour.

no sidecar appears

I installed jupyterlab via conda
followed instructions in README
no matter what I do no sidecar appear, dissplay renders right bellow the cell
Any idea what is going on?

Typescript compilation errors

This project does not build at the moment. I get the following typescript compilation errors:

node_modules/@jupyter-widgets/base/lib/widget.d.ts:55:5 - error TS2416: Property 'initialize' in type 'WidgetModel' is not assignable to the same property in base type 'Model<any, ModelSetOptions, {}>'.
  Type '(attributes: any, options: { model_id: string; comm?: any; widget_manager: any; }) => void' is not assignable to type '(attributes?: any, options?: ModelConstructorOptions<this>) => void'.
    Types of parameters 'options' and 'options' are incompatible.
      Type 'ModelConstructorOptions<this>' is missing the following properties from type '{ model_id: string; comm?: any; widget_manager: any; }': model_id, widget_manager

55     initialize(attributes: any, options: {
       ~~~~~~~~~~

node_modules/@jupyter-widgets/base/lib/widget.d.ts:199:52 - error TS2344: Type 'WidgetModel' does not satisfy the constraint 'Model<any, ModelSetOptions, {}>'.
  Types of property 'initialize' are incompatible.
    Type '(attributes: any, options: { model_id: string; comm?: any; widget_manager: any; }) => void' is not assignable to type '(attributes?: any, options?: ModelConstructorOptions<Model<any, ModelSetOptions, {}>>) => void'.
      Types of parameters 'options' and 'options' are incompatible.
        Type 'ModelConstructorOptions<Model<any, ModelSetOptions, {}>>' is missing the following properties from type '{ model_id: string; comm?: any; widget_manager: any; }': model_id, widget_manager

199 export declare class WidgetView extends NativeView<WidgetModel> {
                                                       ~~~~~~~~~~~

node_modules/@jupyter-widgets/base/lib/widget.d.ts:203:48 - error TS2344: Type 'WidgetModel' does not satisfy the constraint 'Model<any, ModelSetOptions, {}>'.

203     constructor(options?: Backbone.ViewOptions<WidgetModel> & {
                                                   ~~~~~~~~~~~

node_modules/@jupyter-widgets/base/lib/widget.d.ts:243:102 - error TS2344: Type 'T' does not satisfy the constraint 'Model<any, ModelSetOptions, {}>'.
  Type 'WidgetModel' is not assignable to type 'Model<any, ModelSetOptions, {}>'.
    Types of property 'initialize' are incompatible.
      Type '(attributes: any, options: { model_id: string; comm?: any; widget_manager: any; }) => void' is not assignable to type '(attributes?: any, options?: ModelConstructorOptions<Model<any, ModelSetOptions, {}>>) => void'.
        Types of parameters 'options' and 'options' are incompatible.
          Type 'ModelConstructorOptions<Model<any, ModelSetOptions, {}>>' is not assignable to type '{ model_id: string; comm?: any; widget_manager: any; }'.

243     interface InitializeParameters<T extends WidgetModel = WidgetModel> extends Backbone.ViewOptions<T> {
                                                                                                         ~

node_modules/@jupyter-widgets/jupyterlab-manager/lib/manager.d.ts:41:5 - error TS2416: Property 'callbacks' in type 'WidgetManager' is not assignable to the same property in base type 'ManagerBase<Widget>'.
  Type '(view?: WidgetView) => { iopub: { output: (msg: IIOPubMessage<IOPubMessageType>) => void; }; }' is not assignable to type '(view?: WidgetView) => ICallbacks'.
    Call signature return types '{ iopub: { output: (msg: IIOPubMessage<IOPubMessageType>) => void; }; }' and 'ICallbacks' are incompatible.
      The types of 'iopub' are incompatible between these types.
        Type '{ output: (msg: IIOPubMessage<IOPubMessageType>) => void; }' is not assignable to type '{ [key: string]: (msg: IMessage<MessageType>) => void; }'.
          Property 'output' is incompatible with index signature.
            Type '(msg: IIOPubMessage<IOPubMessageType>) => void' is not assignable to type '(msg: IMessage<MessageType>) => void'.
              Types of parameters 'msg' and 'msg' are incompatible.
                Type 'IMessage<MessageType>' is not assignable to type 'IIOPubMessage<IOPubMessageType>'.
                  Types of property 'channel' are incompatible.
                    Type 'Channel' is not assignable to type '"iopub"'.
                      Type '"shell"' is not assignable to type '"iopub"'.

41     callbacks(view?: WidgetView): {
       ~~~~~~~~~

node_modules/@jupyter-widgets/jupyterlab-manager/lib/manager.d.ts:72:5 - error TS2416: Property 'display_view' in type 'WidgetManager' is not assignable to the same property in base type 'ManagerBase<Widget>'.
  Type '(msg: any, view: View<Model<any, ModelSetOptions, {}>>, options: any) => Promise<Widget>' is not assignable to type '(msg: IMessage<MessageType>, view: DOMWidgetView, options: any) => Promise<Widget>'.
    Types of parameters 'view' and 'view' are incompatible.
      Type 'DOMWidgetView' is not assignable to type 'View<Model<any, ModelSetOptions, {}>>'.
        Types of property 'preinitialize' are incompatible.
          Type '(options?: ViewOptions<WidgetModel>) => void' is not assignable to type '(options?: ViewOptions<Model<any, ModelSetOptions, {}>>) => void'.
            Types of parameters 'options' and 'options' are incompatible.
              Type 'ViewOptions<Model<any, ModelSetOptions, {}>>' is not assignable to type 'ViewOptions<WidgetModel>'.
                Type 'Model<any, ModelSetOptions, {}>' is missing the following properties from type 'WidgetModel': comm_live, send, close, _handle_comm_closed, and 23 more.

72     display_view(msg: any, view: Backbone.View<Backbone.Model>, options: any): Promise<Widget>;
       ~~~~~~~~~~~~

node_modules/@jupyter-widgets/jupyterlab-manager/lib/output.d.ts:24:5 - error TS2416: Property 'widget_manager' in type 'OutputModel' is not assignable to the same property in base type 'OutputModel'.
  Type 'WidgetManager' is not assignable to type 'ManagerBase<any>'.
    Types of property 'display_view' are incompatible.
      Type '(msg: any, view: View<Model<any, ModelSetOptions, {}>>, options: any) => Promise<Widget>' is not assignable to type '(msg: IMessage<MessageType>, view: DOMWidgetView, options: any) => Promise<any>'.
        Types of parameters 'view' and 'view' are incompatible.
          Type 'DOMWidgetView' is not assignable to type 'View<Model<any, ModelSetOptions, {}>>'.

24     widget_manager: WidgetManager;
       ~~~~~~~~~~~~~~

node_modules/@jupyter-widgets/jupyterlab-manager/lib/output.d.ts:53:5 - error TS2416: Property 'model' in type 'OutputView' is not assignable to the same property in base type 'OutputView'.
  Type 'OutputModel' is not assignable to type 'WidgetModel'.
    Types of property 'widget_manager' are incompatible.
      Type 'WidgetManager' is not assignable to type 'ManagerBase<any>'.

53     model: OutputModel;
       ~~~~~

src/plugin.ts:35:3 - error TS2322: Type '(app: JupyterLab, registry: IJupyterWidgetRegistry) => void' is not assignable to type '(app: JupyterFrontEnd<IShell>, ...args: any[]) => void | Promise<void>'.
  Types of parameters 'app' and 'app' are incompatible.
    Type 'JupyterFrontEnd<IShell>' is missing the following properties from type 'JupyterLab': registerPluginErrors, status, info, paths, and 4 more.

35   activate: activateWidgetExtension,
     ~~~~~~~~

  node_modules/@lumino/application/types/index.d.ts:84:5
    84     activate: (app: T, ...args: any[]) => U | Promise<U>;
           ~~~~~~~~
    The expected type comes from property 'activate' which is declared here on type 'JupyterFrontEndPlugin<void>'

src/plugin.ts:64:40 - error TS2345: Argument of type '(v: output.OutputView) => void' is not assignable to parameter of type '(value: WidgetView) => void | PromiseLike<void>'.
  Types of parameters 'v' and 'value' are incompatible.
    Type 'WidgetView' is missing the following properties from type 'OutputView': _createElement, _outputView, pWidget, setLayout, and 8 more.

64             this.model.views[key].then((v: output.OutputView) => {
                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/plugin.ts:79:9 - error TS2322: Type 'typeof SidecarModel' is not assignable to type 'typeof WidgetModel | typeof WidgetView'.
  Type 'typeof SidecarModel' is not assignable to type 'typeof WidgetModel'.
    Construct signature return types 'SidecarModel' and 'WidgetModel' are incompatible.
      The types of 'widget_manager' are incompatible between these types.
        Type 'WidgetManager' is not assignable to type 'ManagerBase<any>'.

79         SidecarModel: SidecarModel,
           ~~~~~~~~~~~~

src/plugin.ts:80:9 - error TS2322: Type 'typeof SidecarView' is not assignable to type 'typeof WidgetModel | typeof WidgetView'.
  Type 'typeof SidecarView' is missing the following properties from type 'typeof WidgetModel': _deserialize_state, serializers

80         SidecarView: SidecarView
           ~~~~~~~~~~~

src/widget.ts:32:57 - error TS2345: Argument of type 'this' is not assignable to parameter of type 'DOMWidgetModel'.
  Type 'SidecarModel' is not assignable to type 'DOMWidgetModel'.
    Types of property 'widget_manager' are incompatible.
      Type 'WidgetManager' is not assignable to type 'ManagerBase<any>'.

32     this.widget_manager.display_model(undefined as any, this, {});
                                                           ~~~~

Found 13 errors.

Installation issue with conda on Windows

I'm running into an issue trying to create a conda environment on windows. I don't get the error if I create a python-only environment and then pip install sidecar==0.5.1...it only comes up if I conda or mamba install.

The error I get is below -- if the solution is to rebuild the conda package let me know and I can do that.

CondaVerificationError: The package for sidecar located at C:\Users\jv8699qa\Miniconda3\pkgs\sidecar-0.5.1-pyhd8ed1ab_0
appears to be corrupted. The path 'share/jupyter/labextensions/@jupyter-widgets/jupyterlab-sidecar/static/vendors-node_modules_css-loader_dist_runtime_api_js-node_modules_css-loader_dist_runtime_cssW-926fd9.949facbe71846c90da88.js.map'
specified in the package manifest cannot be found.

Bring sidecar back after closing it?

Is there a way to bring the sidecar back if the user closes it manually (click on the "X")? Is it a way to detect it's closed? (from js side is ok)

ModuleNotFoundError

Error occurs after installing and importing sidecar:

ModuleNotFoundError Traceback (most recent call last)
in ()
----> 1 from sidecar import Sidecar
2 from ipywidgets import IntSlider

ModuleNotFoundError: No module named 'sidecar'

Sidecar is not displayed the way it should

Hello! For some unknown reason, I can't run Sidecar as a sidecar widget. It only appears as an output in the code. Same problem with lantern extension, I can't run them as sidebar widget, what should I do to solve the problem?
image

Use sidecar as a jupyterlab tab?

This sidecar is great! One thing that would improve it for me would be the ability to pull the side car off as it's own jupyterlab tab so I have more freedom in positioning and resizing it. Jupyterlab has the ability to create a new view of cell output in a new tab (https://youtu.be/Asa_ML45HP8) but there doesn't seem to be a way to do this from python like this widget does. It also doesn't capture the output from the appearing in the original cell like this widget does.

If this is both viable and desirable then maybe it could be available as a context menu option on the tab in the sidebar?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.