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

[BUG] VS code notebook view doesn't work with any of the non-inline show options #3251

Open
eteq opened this issue Oct 23, 2024 · 2 comments
Labels
bug Something isn't working needs-triage Issue opened via template and needs triaging

Comments

@eteq
Copy link
Contributor

eteq commented Oct 23, 2024

Jdaviz component

Other (explain in Description below)

Description

I was testing jdaviz in the vs code jupyter notebook viewer (see #3250), and while it works in .show('inline'), there seems to be no way to use the other .show(...) options. This makes most of my jdaviz workflows impossible in vs code, which is a bit sad because the VS Code notebook viewer is otherwise a nice way to interface with notebooks.

(It's sorta debatable if this is a bug of a feature request since maybe this requires some additional implementation, but I'll let whoever triages it decide if I mis-categorized it!)

How to Reproduce

  1. Create or open a jupyter notebook in VS code
  2. run .show('anythingotherthaninline')

Expected behavior

The sidecar options should produce new tabs or whatever in vs code.

Browser

No response

Jupyter

Selected Jupyter core packages...
IPython : 8.28.0
ipykernel : 6.29.5
ipywidgets : 8.1.5
jupyter_client : 8.6.3
jupyter_core : 5.7.2
jupyter_server : 2.14.2
jupyterlab : 4.2.5
nbclient : 0.10.0
nbconvert : 7.16.4
nbformat : 5.10.4
notebook : 7.2.2
qtconsole : not installed
traitlets : 5.14.3

Software versions

import sys; print("Python", sys.version)
Python 3.12.7 | packaged by conda-forge | (main, Oct 4 2024, 16:05:46) [GCC 13.3.0]
import numpy; print("Numpy", numpy.version)
Numpy 2.1.2
import astropy; print("astropy", astropy.version)
astropy 6.1.4
import matplotlib; print("matplotlib", matplotlib.version)
matplotlib 3.9.2
import scipy; print("scipy", scipy.version)
scipy 1.14.1
import skimage; print("scikit-image", skimage.version)
scikit-image 0.24.0
import asdf; print("asdf", asdf.version)
asdf 3.5.0
import stdatamodels; print("stdatamodels", stdatamodels.version)
stdatamodels 1.10.1
import gwcs; print("gwcs", gwcs.version)
gwcs 0.21.0
import regions; print("regions", regions.version)
regions 0.10
import specutils; print("specutils", specutils.version)
specutils 1.18.0
import specreduce; print("specreduce", specreduce.version)
specreduce 1.4.1
import photutils; print("photutils", photutils.version)
photutils 2.0.1
import astroquery; print("astroquery", astroquery.version)
astroquery 0.4.7
import yaml; print("pyyaml", yaml.version)
pyyaml 6.0.2
import asteval; print("asteval", asteval.version)
asteval 1.0.5
import idna; print("idna", idna.version)
idna 3.10
import traitlets; print("traitlets", traitlets.version)
traitlets 5.14.3
import bqplot; print("bqplot", bqplot.version)
bqplot 0.12.43
import bqplot_image_gl; print("bqplot-image-gl", bqplot_image_gl.version)
bqplot-image-gl 1.5.0
import glue; print("glue-core", glue.version)
glue-core 1.21.1
import glue_jupyter; print("glue-jupyter", glue_jupyter.version)
glue-jupyter 0.23.0
import glue_astronomy; print("glue-astronomy", glue_astronomy.version)
glue-astronomy 0.10.0
import echo; print("echo", echo.version)
echo 0.9.0
import ipyvue; print("ipyvue", ipyvue.version)
ipyvue 1.11.1
import ipyvuetify; print("ipyvuetify", ipyvuetify.version)
ipyvuetify 1.10.0
import ipysplitpanes; print("ipysplitpanes", ipysplitpanes.version)
ipysplitpanes 0.2.0
import ipygoldenlayout; print("ipygoldenlayout", ipygoldenlayout.version)
ipygoldenlayout 0.4.0
import ipypopout; print("ipypopout", ipypopout.version)
ipypopout 2.0.0
import jinja2; print("Jinja2", jinja2.version)
Jinja2 3.1.4
import solara; print("solara", solara.version)
solara 1.40.0
import vispy; print("vispy", vispy.version)
vispy 0.14.3
import sidecar; print("sidecar", sidecar.version)
sidecar 0.7.0
import jdaviz; print("Jdaviz", jdaviz.version)
Jdaviz 4.0.0

@eteq eteq added bug Something isn't working needs-triage Issue opened via template and needs triaging labels Oct 23, 2024
@kecnry
Copy link
Member

kecnry commented Nov 5, 2024

I'm not sure that the jupyter notebook extension in VS code supports these, but perhaps we could/should either detect this and fallback to in-line or raise an error? We do seem to detect that popout is not available and do not show the popout buttons in the UI

@eteq
Copy link
Contributor Author

eteq commented Nov 11, 2024

I think an error or at least a warning would be good, yes, since right now it just silently does nothing. Hopefully should be easy to accomplish relatively quickly.

That said, I think it might be worth either 1) trying to get the "popout" mode working (since that would mostly satisfy my use case) or 2) look into how much work it would be to support VS Code tabs. VS Code does "look like" jupyter lab in that it's a tabbed document view, so I think the concepts translate well. Of course that doesn't mean the underlying tech does, so it's a matter of how hard it is to decide whether it's worth changing this into a feature request then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Issue opened via template and needs triaging
Projects
None yet
Development

No branches or pull requests

2 participants