Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

ankostis
Copy link

@ankostis ankostis commented Sep 29, 2019

  • MERGED with ENH: use pytest instead of numpy for tests #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.

@codecov-io
Copy link

codecov-io commented Sep 29, 2019

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%> (ø) ⬆️
graphkit/network.py 87.03% <71.42%> (+16.83%) ⬆️
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.

@ankostis ankostis force-pushed the doc-plot branch 2 times, most recently from 26cc7a7 to 80e3ba9 Compare September 29, 2019 21:34
@ankostis ankostis changed the title DOC: Provide sample code to plot workflow diagrams in the into (fix #13) FIX(#13, plot): PY2 era BUG when writing plot-diagrams; give sample code in the into Sep 29, 2019
were writing in text-mode in PY3. and failing as encoding error.
@ankostis
Copy link
Author

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

@ankostis ankostis force-pushed the doc-plot branch 8 times, most recently from 5686586 to c5bcb3b Compare September 29, 2019 23:14
ankostis added a commit to ankostis/graphtik that referenced this pull request Oct 2, 2019
intermediate data.

More changes only for newer pruning TCs:
+ refact(test): rename graph-->netop vars for results of compose(),
  to avoid of `graph.net.graph`.
+ Explain failure modes in v1.2.4 & this merged branch (yahoo#19 + yahoo#23).
ankostis added a commit to ankostis/graphtik that referenced this pull request Oct 2, 2019
override intermediate data.

More changes only for newer pruning TCs:
+ refact(test): rename graph-->netop vars for results of compose(),
  to avoid of `graph.net.graph`.
+ Explain failure modes in v1.2.4 & this merged branch (yahoo#19 + yahoo#23).
to use it also on stary DAGs.  Keep delegation.
+ test all chained plot() methods from netop.
+ retorfitted to try all available formats.
+ list of forbidden formats based on my failres
@ankostis ankostis force-pushed the doc-plot branch 2 times, most recently from e8293b3 to a91bc87 Compare October 5, 2019 15:43
@ankostis ankostis force-pushed the doc-plot branch 3 times, most recently from 318e511 to f17fc6d Compare October 5, 2019 16:04
@ankostis ankostis force-pushed the doc-plot branch 3 times, most recently from 35d9a91 to 07251d8 Compare October 5, 2019 16:39
+ doc: rename in sample code: netop --> pipeline.
+ enh(build): add `ipython` in test dependencies.
+ include it in the plot TC.
@ankostis
Copy link
Author

ankostis commented Oct 5, 2019

This is now merge-ready:

@ankostis
Copy link
Author

ankostis commented Oct 5, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants