plotly / plotly/plotly.py

generate deterministic IDs for SVG elements to facilitate diff

未關閉
#1,968 8 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

feature P3
主要語言
Python
星號
18.8k
分支
2.8k
平均合併
16 小時 26 分鐘
30 天內合併 PR
21

描述

When saving figure as SVG using write_image, Plotly Express generates random unique IDs for elements. As a result, git diff thinks re-generated figures have changed even when they haven't (see screenshot). If the IDs were generated in some deterministic way depending solely on figure contents, so that they only changed when the figure itself had visually changed, git would be a lot happier.
Screen Shot 2019-12-04 at 11 14 33 AM

see #3393

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 SVG 輸出的 write_image 入口點開始,並查看 issue #3393 中的相關討論。確定目前如何產生元素 ID,並定義一種完全基於圖形內容的確定性方案;當重新產生未變更的圖形時能夠產生穩定的 SVG ID,且 git diff 只反映視覺變更時,即視為完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
data-visualization
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
停滯
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。