Datastore icon is missing from SVG diagrams (absolute PNG path)
Maintainer thường phản hồi trong vòng 3 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- data-visualization
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 1.2k
- Fork
- 237
- Merge trung bình
- 4 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc 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.
Issue khác của OWASP/pytm
-
Dataflow defaults overwrite values the model set explicitlyCó thể đã có người làm @markthomaschurch đã nhận 1 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Calling TM.dfd() a second time returns an empty diagramCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Long boundary names render a literal "\n" in the DFDCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 3 ngày
-
`TM.check()` overwrites explicit Dataflow `protocol`, `dstPort` and `controls.isEncrypted` with sink defaults (regression in 1.4.0)Có thể đã có người làm @Svastikkka đã nhận 14 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 75/100
OWASP/pytm#373 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 3 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
btclib-org/btclib-wallet#872 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Scheduled returns scan all accepted minion keys causing extreme loadCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
saltstack/salt#70789 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
btclib-org/btclib#3093 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
patrickballard/wheelgap#269 ·
-
priority: low python
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
LearningCircuit/local-deep-research#8635 ·
Maintainer thường phản hồi trong vòng 1 ngày