-
Notifications
You must be signed in to change notification settings - Fork 57
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
Zephyr layout coords fix #236
Zephyr layout coords fix #236
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #236 +/- ##
==========================================
- Coverage 75.96% 75.05% -0.91%
==========================================
Files 31 31
Lines 2184 2213 +29
==========================================
+ Hits 1659 1661 +2
- Misses 525 552 +27 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
@randomir - can you assign myself and @AndyZzzZzzZzz as reviewers? |
@randomir Is this ready to be merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand it would be standard if numpy was imported at the top rather than within the layout function. Double check with @randomir
range != [0,1] in layout as described. The update corrects this problem, unit tests are good.
It is not clear to me why scale=1 must imply [0,1], when I use pos in combination with draw_networkx (for example) plots look equally good before and after this pull request (to my eye, superficially). Is there a specific example of when this causes unexpected behaviour? Happy to assume there is one and approve the request though.
You're correct that the plots don't look different before and after this PR. However the document says scale=1 gives values in [0,1], and this is a feature that was relied on in the layout algorithm (in |
@randomir |
Co-authored-by: Jack Raymond <10591246+jackraymond@users.noreply.github.com> Co-authored-by: Andy Zhang <129815299+AndyZzzZzzZzz@users.noreply.github.com>
A bug in
zephyr_layout
in the filedwave-networkx/drawing/zephyr_layout.py
is fixed so that ifscale
= scale, all positions fit within [0, scale] on the x-axis and [-scale, 0] on the y-axis.A couple of tests are added to
tests/test_zephyr_layout.py
that would fail before fixing the bug. These test the range of x value and y-value produced byzephyr_layout
for the default scale=1 and scale=10.Similarly, for
pegasus_layout
andtest_pegasus_layout.py
.Closes #239.