-
Notifications
You must be signed in to change notification settings - Fork 94
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
graph line continuation on boolean #4404
Conversation
c1524ad
to
3162307
Compare
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.
(The one test that's failing should be an easy fix: tests/f/validate/62-null-task-name.t)
(Oops, didn't notice this was still a draft PR, so maybe you handn't finished 😬 ) |
Only because that test broken and I'm holiday |
Removed broken functional test of trailing &, which is now legal. Added unit test for error if last line ends with a permitted continuation.
04e04b9
to
09533ee
Compare
09533ee
to
a36a1ae
Compare
@hjoliver can you pay particular attention to whether my merge with your recent master changes is OK? |
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.
Still not getting consistent treatment of the three continuation items.
# OK:
a => # GraphParseError: Trailing continuation sequence (=>):a=>
# OK, but use consistent terminology)
=> a # GraphParseError: Leading arrow: =>a
# OK:
a & # GraphParseError: Trailing continuation sequence (&):a&
a | # GraphParseError: Trailing continuation sequence (|):a|
# Not OK:
& a # valid
| a # valid
# OK:
=> a => b # GraphParseError: Leading arrow: =>a=>b
# Not OK:
& a => b # GraphParseError: Null task name in graph: &a => b
| a => b # WorkflowConfigError: ERROR: bad trigger
Co-authored-by: Hilary James Oliver <hilary.j.oliver@gmail.com>
Co-authored-by: Hilary James Oliver <hilary.j.oliver@gmail.com>
…n-on-and-or * upstream/master: Update cylc/flow/cfgspec/workflow.py clean up interim obselete message fix flake8-simplify failures caused by recently added checks. (cylc#4420)
I there was 1 remaining case (leading continuation symbol) where the code was checking for |
@@ -49,17 +50,42 @@ def test_parse_graph_fails_null_task_name(graph): | |||
assert "Null task name in graph:" in str(cm.value) | |||
|
|||
|
|||
@pytest.mark.parametrize('seq', ('&', '|', '=>')) |
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.
Factored out of the original test to allow this double parametrization.
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.
Nice.
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 working well now 👍 Just one code simplification suggestion.
@@ -49,17 +50,42 @@ def test_parse_graph_fails_null_task_name(graph): | |||
assert "Null task name in graph:" in str(cm.value) | |||
|
|||
|
|||
@pytest.mark.parametrize('seq', ('&', '|', '=>')) |
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.
Nice.
Co-authored-by: Hilary James Oliver <hilary.j.oliver@gmail.com>
Co-authored-by: Hilary James Oliver <hilary.j.oliver@gmail.com>
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.
Thanks @wxtim all good 🎉
One review will do for this because: "time is of the essense" right now, plust it is somewhat peripheral functionality, and I've tested the hell out of it.
These changes close #4390
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.I have left commits separate to make changes to the test easier to understand. If merging please squash.