Automatically set correct renderer for Plotly charts in VSCode Notebooks
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 18.8k
- Fork
- 2.8k
- Merge trung bình
- 16 giờ 26 phút
- Pull request đã merge (30 ngày)
- 21
Mô tả
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?
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Không có tệp repository hoặc test nào được nêu tên. Trước tiên, hãy đọc cấu hình renderer được cung cấp qua plotly.io, đặc biệt là entry point pio.renderers.default, và tìm hiểu cách các môi trường notebook được nhận diện. Công việc được xem là hoàn tất khi người dùng VSCode Notebook tự động nhận được renderer tương thích hiện tại mà không cần thêm workaround đã được tài liệu hóa, đồng thời có coverage cho hành vi phát hiện.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, jupyter-notebook, python
- Lĩnh vực
- data-visualization, tooling
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100