tonybaloney / wily

A Python application for tracking, reporting on timing and complexity in Python code
Apache License 2.0
1.2k stars 58 forks source link

WIP: Allow saving graphs as images #193

Open devdanzin opened 1 year ago

devdanzin commented 1 year ago

Add the ability to save the output of wily graph as an image. It requires installing Kaleido.

This is WIP, would need a new test and adding a new dependency to pyproject.toml, which I'm willing to do if the PR is to be accepted. Also the help string could be better.

Supported formats: png, jpg, webp, svg and pdf.

This addresses part of #92.

codecov-commenter commented 1 year ago

Codecov Report

Merging #193 (c9cee83) into master (d501d01) will decrease coverage by 0.38%. The diff coverage is 44.44%.

@@            Coverage Diff             @@
##           master     #193      +/-   ##
==========================================
- Coverage   95.42%   95.05%   -0.38%     
==========================================
  Files          24       24              
  Lines        1269     1275       +6     
  Branches      287      290       +3     
==========================================
+ Hits         1211     1212       +1     
- Misses         33       37       +4     
- Partials       25       26       +1     
Files Changed Coverage Δ
src/wily/commands/graph.py 92.06% <28.57%> (-7.94%) :arrow_down:
src/wily/__main__.py 95.72% <100.00%> (+0.02%) :arrow_up: