Automatically set correct renderer for Plotly charts in VSCode Notebooks
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 18.8k
- Forks
- 2.8k
- Ø Merge
- 16 Std. 26 Min.
- Gemergte PRs (30 T.)
- 21
Beschreibung
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?
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Es werden keine Repository-Dateien oder Tests genannt. Lies zunächst die über plotly.io bereitgestellte Renderer-Konfiguration, insbesondere den Einstiegspunkt pio.renderers.default, und untersuche, wie Notebook-Umgebungen erkannt werden. Als abgeschlossen gilt die Änderung, wenn Benutzer von VSCode Notebook automatisch den aktuell kompatiblen Renderer erhalten, ohne den dokumentierten Workaround hinzufügen zu müssen, und die Erkennungslogik durch Tests abgedeckt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, jupyter-notebook, python
- Bereich
- data-visualization, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100