Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
yoodan93 merged 5 commits intoaws:masterfromyoodan93:master
Oct 2, 2020
Merged

[Feature]: Support new ASL choice comparators#88

yoodan93 merged 5 commits intoaws:masterfromyoodan93:master
Oct 2, 2020

Conversation

@yoodan93
Copy link
Contributor

@yoodan93yoodan93 commentedSep 21, 2020
edited
Loading

Adding new choice state comparators that were added to the Amazon States Language specifications.https://states-language.net/

These include:

  • StringMatches
  • IsNull, IsPresent, IsString, IsNumeric, IsBoolean, IsTimestamp
  • StringEqualsPath, StringLessThanPath, StringGreaterThanPath, StringLessThanEqualsPath, StringGreaterThanEqualsPath, NumericEqualsPath, NumericLessThanPath, NumericGreaterThanPath, NumericLessThanEqualsPath, NumericGreaterThanEqualsPath, BooleanEqualsPath, TimestampEqualsPath, TimestampLessThanPath, TimestampGreaterThanPath, TimestampLessThanEqualsPath, TimestampGreaterThanEqualsPath

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@StepFunctions-Bot
Copy link
Contributor

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository

@StepFunctions-Bot
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: StepFunctionsPythonSDK-integtests
  • Commit ID:16177d7
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository

@StepFunctions-Bot
Copy link
Contributor

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository

@StepFunctions-Bot
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: StepFunctionsPythonSDK-integtests
  • Commit ID:9518733
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository

withpytest.raises(ValueError):
func('$.Variable',True)

deftest_path_function_value_must_be_consistent():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
deftest_path_function_value_must_be_consistent():
deftest_path_operator_raises_error_when_value_is_not_a_path():

withpytest.raises(ValueError):
func('$.Variable','string')

deftest_is_function_value_must_be_consistent():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
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.
Copy link
Contributor

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 atvariable is equal to the JSON literalnull or not.
  • IsPresent: "Whether a field atvariable exists in the input or not.
  • IsNumeric: "Whether the value atvariable is a string or not.
  • etc.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

fixed in subsequent commit

vaib-amz
vaib-amz previously approved these changesSep 24, 2020
rwwardh
rwwardh previously approved these changesSep 24, 2020
Copy link

@rwwardhrwwardh left a 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.

@yoodan93yoodan93 dismissed stale reviews fromrwwardh andvaib-amz via1f7d4e3September 25, 2020 04:00
@StepFunctions-Bot
Copy link
Contributor

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository

@StepFunctions-Bot
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: StepFunctionsPythonSDK-integtests
  • Commit ID:1f7d4e3
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository

@StepFunctions-Bot
Copy link
Contributor

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository

@StepFunctions-Bot
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: StepFunctionsPythonSDK-integtests
  • Commit ID:61fff47
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository

Args:
variable (str): Path to the variable to compare.
value (bool): Constant value to compare `variable` against.
Copy link
Contributor

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.

Suggested change
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.

@StepFunctions-Bot
Copy link
Contributor

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository

@StepFunctions-Bot
Copy link
Contributor

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository

@StepFunctions-Bot
Copy link
Contributor

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository

wong-a
wong-a previously approved these changesSep 29, 2020
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.
Copy link
Contributor

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

@StepFunctions-Bot
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: StepFunctionsPythonSDK-integtests
  • Commit ID:6fd4480
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository

@StepFunctions-Bot
Copy link
Contributor

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository

@StepFunctions-Bot
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: StepFunctionsPythonSDK-integtests
  • Commit ID:b5d55f2
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

3 more reviewers

@wong-awong-awong-a approved these changes

@vaib-amzvaib-amzvaib-amz approved these changes

@rwwardhrwwardhrwwardh left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@yoodan93@StepFunctions-Bot@wong-a@vaib-amz@rwwardh

[8]ページ先頭

©2009-2025 Movatter.jp