-
Notifications
You must be signed in to change notification settings - Fork 42
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
Dagvis #303
base: develop
Are you sure you want to change the base?
Dagvis #303
Conversation
setup.py
Outdated
@@ -44,7 +44,9 @@ def load_readme(): | |||
"coloredlogs", | |||
"chainmap ; python_version<'3'", | |||
], | |||
extras_require={}, | |||
extras_require={"networkx": ["networkx"], |
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.
If I'm understanding, this is extra_key
that maps to a list of [extra_requirement1, ...]
. Would it make sense to make this something like:
extras_require={"vis": ["networkx", "matplotlib", "pygrapyviz"],
}
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.
That's a good idea. Also be good if i fix it so pygraphviz is spelled correctly.
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.
It might be good to document in the installation information how to install the vis
aspects too.
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 was trying to test this and ended up having to install the requirements manually. Might be worth adding them to the requirements.txt file as pip doesn't seem to allow optional specification when installing from a repository locally.
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.
Yeah, and graphviz has to be manual no matter what for now, which is kind of annoying; definitely needs some docs for that.
So, I'd thought the extras provisions in the setup.py would have taken care of that, preventing the need for multiple requirements files.. That's disappointing to hear it doesn't work out that way..
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.
What I meant was that during testing, since I had to install it via pip install .
it didn't allow me to use the optional flags. I couldn't figure out how to get it to work, and noticed they weren't in the requirements.txt
-- so those should be there for developers to use. Otherwise, I think it's just compiling a wheel and add that path using -f
to test is the optionals work I think?
@@ -334,6 +336,11 @@ def setup_argparser(): | |||
run.add_argument("--dry", action="store_true", default=False, | |||
help="Generate the directory structure and scripts for a " | |||
"study but do not launch it. [Default: %(default)s]") | |||
run.add_argument("--draw", type=str, action="append", default=[], |
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.
Are there any thoughts on enabling this feature to be used without having to submit a Maestro run?
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.
that already works
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.
ok, i need to clarify: it works with dry run, so it doesn't run anything, but it does do all the workspace creation and currently saves the dag_vis outputs into that workspace. will look into a -no-workspace option
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.
Where would the --no-workspace
option be added. It wouldn't make sense to have that be standalone. It'd have to be explicitly paired with --dry
and/or --draw
?
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.
So, that's a good question. While that thought/idea hadn't been really fleshed out at the time, I think it'd have to be tied to --draw. Does it really make any sense to have it tied to --dry? That would seem to defeat the purpose of dry runs.
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.
Oh -- good call. I went too far with the logic on that one. I think there is a way to pair CLI paramters, but I'm not sure how that displays in help.
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.
Another suggestion for the command line option in particular -- look at the choices=[]
optional field for add_argument
. That lets you enforce specific choices for command line flags.
Hmm, the autosizing doesn't work so well on that one with those interior nodes. For the dot format, if you have pygraphviz/graphviz installed you can use |
Yeah, the layout algorithm doesn't currently take node text size into account. That's sort of a pain point currently, but i've got a few ideas for dealing with that that I'm working on. I think graphviz can deal with that better, and is something i still need to port from my old prototype |
Add visualization option for the workflow's dag, including multiple output formats (matplotlib, dot file, graphml) and two layout options (spring layout and dot hierarchical).