Automatically set correct renderer for Plotly charts in VSCode Notebooks
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 18.8k
- Forks
- 2.8k
- Merge medio
- 16 h 26 min
- PR fusionados (30 d)
- 21
Descripción
Because https://github.com/microsoft/vscode-notebook-renderers/pull/199 is unmerged, users of Plotly.py using the VSCode notebooks cannot access the latest Plotly.js/Plotly.py features and no discernible error message is provided. This leads to confusion, because users are working with the latest version of Plotly.py and their charts don't work properly.
This has caused issues for adoption of new features like MapLibre and subtitles in charts, and may others. See e.g.:
- https://github.com/plotly/plotly.py/issues/4715
- https://github.com/plotly/plotly.py/issues/4775
- https://github.com/plotly/plotly.py/issues/4701
- https://github.com/plotly/plotly.py/issues/4583
- https://github.com/plotly/plotly.py/issues/4560
- https://github.com/plotly/plotly.py/issues/4475
- https://github.com/plotly/plotly.py/issues/4528
- https://github.com/plotly/plotly.py/issues/4264
- https://github.com/plotly/plotly.py/issues/4173
- https://github.com/plotly/plotly.py/issues/4094
Developers can workaround this by adding to their notebook:
import plotly.io as pio
pio.renderers.default = "notebook_connected"
While this is trivial to change, it's undiscoverable and non-intuitive. If you have the latest version of Plotly.py installed, you should be able to use the latest features in any Python environment!
Regardless of whether https://github.com/microsoft/vscode-notebook-renderers/pull/199 is merged, this dependency means VSCode Notebook users will always lag behind Plotly.py releases as we wait for VSCode to adopt and release their own updates, which means VSCode users would never have day-of updates without a workaround 🙁
Is it possible to detect that we're in a VSCode Notebook environment and automatically set the correct renderer to avoid this dependency on a VSCode update?
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
No se nombran archivos del repositorio ni pruebas. Empieza leyendo la configuración de renderers expuesta a través de plotly.io, especialmente el punto de entrada pio.renderers.default, e investiga cómo se identifican los entornos de notebook. Se considera terminado cuando los usuarios de VSCode Notebook reciben automáticamente el renderer compatible actual sin tener que añadir la solución alternativa documentada, y la cobertura incluye el comportamiento de detección.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, jupyter-notebook, python
- Área
- data-visualization, tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100