Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support ConditionNode alignments, closes #14.
35487f9 v0.2.0 issue-14-align-conds
Support
Node.set_param(key, value)
to generate flowchart like this:And as a grammar sugar, support
ConditionNode.no_align_next()
to set a paramalign-next=no
.For convenience, you can also specify this operation when constructing a ConditionNode by:
(Version 0.2.0 and 0.2.1 do not involve anything function of python code to flowchart, but are features regarding writing flowcharts in python.)
ddc4486 v0.2.1 connect_direction setting for human!
I find it's hard to make something like
cond2(yes,right)->io5
when testing thev0.2.0
. So I modified some interfaces to make it better.To set a connection direction, Instead of calling the
Node.set_connect_direction()
, since v0.2.1 you can just pass a second parameter toconnect()
, which seems more human:Outputs:
4577f9b v0.2.2 conds-align for py2flowchart
Improve the flowchart of consecutive If statements converted from python code with the new feature of
v0.2.0
:It works fine in
v0.1.4
with the defaultsimplify
feature:But if we run it with
--no-simplify
:Ugly, right? No more~! This version offers a new
--conds-align
flag to beautify these consecutive If statements.or in python:
Outputs:
5d4d9e0 v0.2.3 fix a bug
v0.2.1
(ddc4486) does something wrong causing the old wayNode.set_connect_direction()
invalid. This version fixed it. So you can use bothand
On a top level.
38b9828 docs updates
Updates README, docs new features above.