graphkit icon indicating copy to clipboard operation
graphkit copied to clipboard

FIX(#13, plot): PY2 era BUG when writing plot-diagrams; give sample code in the into

Open ankostis opened this issue 5 years ago • 4 comments

  • MERGED with #28 to parametrize tests.
  • FIX(plot): bring plot writing into files up-to-date from PY2 (were not opening in binary mode).
  • FIX(plot): do not open file if file-ext unsupported
  • FEAT: support render in Jupyter notebooks.
  • ENH: Overlay on the graph these elements: -execution-steps & order
    • inputs
    • outputs
    • solution values
    • "optional" needs:
  • TEST(plot): add TC for plot writing; needed to retrofit travis to support graphvis & matplotb.
  • REFACT: moved plot code & TCs into own files - split Graphviz building from IO functions.
  • enh(build): Test also pip extras now.
  • doc: Just a minor but useful addition in the intro tutorial about plotting.

t

Legend

Nodes:

  • circle: function
  • oval: subgraph function
  • inversed-house: given input
  • house: asked output
  • polygon: given both as input & asked as output (what?)
  • square: intermediate data, neither given nor asked.
  • red frame: delete-instruction, to free up memory.
  • filled: data node has a value in solution, shown in tooltip.
  • thick frame: function/data node visited.

Arrows

  • solid black arrows: dependencies (target need source, sources provide target)
  • dashed black arrows: optional needs
  • green-dotted arrows: execution steps labeled in succession

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

ankostis avatar Sep 29 '19 21:09 ankostis

Codecov Report

Merging #19 into master will increase coverage by 11.81%. The diff coverage is 96.47%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #19       +/-   ##
===========================================
+ Coverage   77.87%   89.69%   +11.81%     
===========================================
  Files           5        6        +1     
  Lines         348      388       +40     
===========================================
+ Hits          271      348       +77     
+ Misses         77       40       -37
Impacted Files Coverage Δ
graphkit/base.py 79.36% <100%> (ø) :arrow_up:
graphkit/network.py 87.03% <71.42%> (+16.83%) :arrow_up:
graphkit/plot.py 98.68% <98.68%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e70718b...4aca013. Read the comment docs.

codecov-io avatar Sep 29 '19 21:09 codecov-io

Rebased on top of ank/fix-networkx_in_py2(#16) to make Travis pass.

ankostis avatar Sep 29 '19 21:09 ankostis

This is now merge-ready:

  • Adde Jupyter support
  • Revamped & parametrized TCs with pytest (#28).
  • Moved plot code out of network module.

ankostis avatar Oct 05 '19 18:10 ankostis

Forced to drop PY3.4 due to pytest not working...i know, this is one step close to become graphkit2.

ankostis avatar Oct 05 '19 18:10 ankostis