-
Notifications
You must be signed in to change notification settings - Fork 129
Feature/reverse arrows #18
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
Conversation
thebjorn
left a comment
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.
Thank you very much for the PR. I've made a couple of suggestions. If you can fix those then I'll merge it immediately.
pydeps/cli.py
Outdated
| p.add_argument('--show-deps', action='store_true', help="show output of dependency analysis") | ||
| p.add_argument('--show-raw-deps', action='store_true', help="show output of dependency analysis before removing skips") | ||
| p.add_argument('--show-dot', action='store_true', help="show output of dot conversion") | ||
| p.add_argument('--reverse', action='store_true', help="draw arrows in direction of dependency") |
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.
| p.add_argument('--reverse', action='store_true', help="draw arrows in direction of dependency") | |
| p.add_argument('--reverse', action='store_true', help="draw arrows to (instead of from) imported modules") |
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 changed it and added to the readme
pydeps/render_context.py
Outdated
| self.name = kw.get('name', 'G') | ||
| self.fillcolor = kw.get('fillcolor', '#ffffff') | ||
| self.fontcolor = kw.get('fontcolor', '#000000') | ||
| self.rankdir = kw.get('rankdir', 'TB' if not self.reverse else 'BT') |
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 appreciate that you're trying to kkep the non-reverse case the default, but this reads better if you reverse the logic
| self.rankdir = kw.get('rankdir', 'TB' if not self.reverse else 'BT') | |
| self.rankdir = kw.get('rankdir', 'BT' if self.reverse else 'TB') |
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 also changed this, in addition there is now also a test for it.
|
Thanks for the PR. It's now released on PyPI as version 1.7.0. |
Reverse arrow directions as discussed in #8