plotly / plotly/plotly.py

Automatically set correct renderer for Plotly charts in VSCode Notebooks

オープン
#4,827 コメント 1 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug P2
主要言語
Python
スター
18.8k
フォーク
2.8k
平均マージ
16時間 26分
マージ済み PR(30日)
21

説明

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.:

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?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

リポジトリのファイルやテストは指定されていません。まず、plotly.io を通じて公開されている renderer の設定、特にエントリーポイント pio.renderers.default を読み、notebook 環境がどのように識別されるかを調査してください。VSCode Notebook のユーザーが、ドキュメント化された workaround を追加しなくても、現在互換性のある renderer を自動的に受け取れるようになり、検出動作がカバレッジで確認されていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, jupyter-notebook, python
領域
data-visualization, tooling
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。