- Notifications
You must be signed in to change notification settings - Fork89
[Feature]: Support new ASL choice comparators#88
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
AWS CodeBuild CI Report
Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository |
tests/unit/test_choice_rule.py Outdated
| withpytest.raises(ValueError): | ||
| func('$.Variable',True) | ||
| deftest_path_function_value_must_be_consistent(): |
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.
| deftest_path_function_value_must_be_consistent(): | |
| deftest_path_operator_raises_error_when_value_is_not_a_path(): |
tests/unit/test_choice_rule.py Outdated
| withpytest.raises(ValueError): | ||
| func('$.Variable','string') | ||
| deftest_is_function_value_must_be_consistent(): |
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.
| deftest_is_function_value_must_be_consistent(): | |
| deftest_is_operator_raises_error_when_value_is_not_a_bool(): |
| Args: | ||
| variable (str): Path to the variable to compare. | ||
| value (bool): Constant value to compare `variable` against. |
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.
For the type comparisons, maybe the documentation forvalue can be more descriptive:
- IsNull: "Whether the value at
variableis equal to the JSON literalnullor not. - IsPresent: "Whether a field at
variableexists in the input or not. - IsNumeric: "Whether the value at
variableis a string or not. - etc.
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.
fixed in subsequent commit
Uh oh!
There was an error while loading.Please reload this page.
rwwardh 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.
Adam mentioned some naming changes. Once done it should be good to go.
AWS CodeBuild CI Report
Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| Args: | ||
| variable (str): Path to the variable to compare. | ||
| value (bool): Constant value to compare `variable` against. |
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 missed this one earlier. The value forStringMatches is astr. Since this is one of the ambiguous operators, let's add a description of the format in the documentation. Customers shouldn't have to go the ASL spec to figure out how to use this SDK.
| value (bool):Constantvaluetocompare`variable`against. | |
| value (str):Astringpatternthatmaycontainoneormore`*`characterstocomparethevalueat`variable`to.Thecomparisonyieldstrueifthevariablematchesthepattern,where`*`isawildcardthatmatcheszeroormorecharacters. |
Trying to think of good wording about escaping special characters with\. Not sure if there's anything that's handled differently in Python.
AWS CodeBuild CI Report
Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository |
| Args: | ||
| variable (str): Path to the variable to compare. | ||
| value (str): A string pattern that may contain one or more `*` characters to compare the value at `variable` to. | ||
| The `*` character can be escaped using two backslashes. |
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.
Not sure if this docstring will render this correctly if the newlines aren't indented
AWS CodeBuild CI Report
Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository |
Uh oh!
There was an error while loading.Please reload this page.
Adding new choice state comparators that were added to the Amazon States Language specifications.https://states-language.net/
These include:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.