-
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
Fail "a => b & !b" in validation. #4335
Conversation
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 to me!
Tested and confirmed this is now invalid and raises an error:
a & b => c
a => !c
b => !c
@hjoliver the example below is not invalid, because c
is executed only if a
and b
succeed. But is not when only one of a
or b
succeeds, right?
a & b => c
a | b => !c
b | a => !c
Also, this runs OK, with no errors:
a & b => c
!a => c
While this one raises a GraphParseError
:
a & b => c
a:fail => c
Isn't !a
the same as a:fail
?
My Cylc-Fu is a bit rusty, sorry!
Good testing @kinow 👍
No,
This should fail, but the parser doesn't recognize
It might be easy to fix that for simple expressions, but in general equivalence of complex logical expressions is ah, beyond the scope of this PR! (Your version of this above has |
and
Did you get those two the wrong way around? The first one should fail, because a suicide The second one should validate and run, but shutdown with |
Probably not worth the effort given the limited-to-no use for suicide triggers in future. |
Yes! Sorry 🤣 I used your unit test for the examples. And I got confused when trying to say whether the test passed (i.e. an expected exception was raised) or not. PR looks good! And I'll be one of the first to review our new documentation & tutorial to brush up on Cylc graph syntax Thanks @hjoliver ! |
And the coverage report is wrong. I debugged @hjoliver and it is testing the lines of code added in this PR (which codecov added a comment above saying it is not 😠 ). |
This is a small change with no associated Issue. Follow up #4334
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.setup.py
andconda-environment.yml
. (None)