Datastore icon is missing from SVG diagrams (absolute PNG path)
メンテナーはふだん 3 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 20/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
Start with Datastore.dfd() and inspect how it sets Graphviz node attributes for PNG and SVG output. Check the existing DFD rendering examples or tests across output formats; done means datastore nodes render without an external image path and retain the intended label and colormap behavior. An open linked pull request (#382) already addresses this issue.
索引モデルが issue の本文から書いたものです。
説明
Description
In SVG diagrams, the datastore icon is missing as soon as the SVG is opened anywhere other than the machine and checkout that generated it (another computer, a CI artifact, a web page or report). PNG output is fine.
Reproduction
./tm.py --dfd | dot -Tsvg -o dfd.svg
grep '<image' dfd.svg
<image xlink:href="/home/me/src/pytm/pytm/images/datastore_black.png" width="49.6px" height="36px" .../>
Cause
Datastore.dfd() draws the datastore by pointing Graphviz at a PNG with an absolute path (shape = none; image = ".../pytm/images/datastore_<color>.png"). With -Tpng Graphviz draws the pixels into the output; with -Tsvg it only writes a link to that file. Graphviz has no option to embed the image in SVG, and DOT image attributes can't be data: URIs.
Proposed fix
Draw datastores with Graphviz's built-in shape = cylinder, which is what the icon depicts. Graphviz draws it natively, so it renders the same in PNG, SVG, PDF and every other format, and --colormap can colour it like any other element. The PNG icons are no longer needed.
This changes the look slightly: the label moves from beside the icon (xlabel) to inside the cylinder, like other assets.
- 主要言語
- Python
- スター
- 1.2k
- フォーク
- 237
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 9
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OWASP/pytm のほかの issue
-
Dataflow defaults overwrite values the model set explicitly対応中かも @markthomaschurch が 1 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
メンテナーはふだん 3 日以内に返信
-
Calling TM.dfd() a second time returns an empty diagram再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
メンテナーはふだん 3 日以内に返信
-
Long boundary names render a literal "\n" in the DFD再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
メンテナーはふだん 3 日以内に返信
-
`TM.check()` overwrites explicit Dataflow `protocol`, `dstPort` and `controls.isEncrypted` with sink defaults (regression in 1.4.0)対応中かも @Svastikkka が 14 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 75/100
メンテナーはふだん 3 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 3 日以内に返信
似ている issue
-
15-minutes 5-minutes algorithm any-language beginner-friendly c cpp csharp easy go good first issue hacktoberfest help wanted java javascript kotlin python rust swift typescript
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Huerte/algo-solutions-python#254 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 86/100
MichaelYcJo/SpecSeal#1543 ·
-
size/s
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
sipyourdrink-ltd/bernstein#7179 ·
メンテナーはふだん 1 日以内に返信
-
good first issue help wanted python up-for-grabs
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
andrewsiah/agentswarm-data-tasks#309 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信