-
Notifications
You must be signed in to change notification settings - Fork 93
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
validate: detect cyclic without graphviz #2332
validate: detect cyclic without graphviz #2332
Conversation
Selected profile battery results for
|
d00776c
to
d3dea55
Compare
wow, good work. |
As an aside, I wonder if we could use topological sort with weighting by task |
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.
Looks good, tested as working.
[[[P1Y]]] | ||
graph = ''' | ||
a[-P1Y] => a | ||
a[+P1Y] => a |
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.
Some more ideas for tests.
It would be good to ensure circular dependency identification works between sequences.
[scheduling]
cycling mode = integer
initial cycle point = 1
[[dependencies]]
[[[2/P3]]]
graph = foo => bar => baz
[[[8/P1]]]
graph = baz => foo
It might also be good to test the "pruning" of dependencies prior to reporting a circular dependency. The example I used yesterday was:
[cylc]
[[parameters]]
foo = 1..5
[scheduling]
[[dependencies]]
graph = """
fool<foo-1> fool<foo>
fool<foo=2> => fool<foo=1>
"""
And for bonus marks to ensure there are no false positives:
[scheduling]
cycling mode = integer
initial cycle point = 1
[[dependencies]]
[[[1/P3]]]
graph = foo => bar
[[[2/P3]]]
graph = bar => foo
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.
All of these added.
Use an algorithm similar to a topological sort to detect cyclic dependence. Move remaining graphviz requiring functionality from `cylc.config` to `cylc.graphing`.
Consolidate circular dependence tests in a single test file. On reporting circular dependence errors, pick out remaining unrelated edges from the right hand side.
991f5b3
to
4e9972c
Compare
I have now removed the dependency by |
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.
A mere order of magnitude difference!
Looks good.
Use an algorithm similar to a topological sort to detect cyclic dependence.
cylc validate
should no longer require graphviz.Move remaining graphviz requiring functionality from
cylc.config
tocylc.graphing
.