Skip to content

Commit 83f4c48

Browse files
committed
fix: fix formatting + deploy-examples
1 parent 1e2fba9 commit 83f4c48

4 files changed

Lines changed: 38 additions & 10 deletions

File tree

.github/workflows/deploy-examples.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ jobs:
101101
echo "QUALIFIED_FUNCTION_NAME=$QUALIFIED_FUNCTION_NAME" >> $GITHUB_OUTPUT
102102
103103
- name: Run Integration Tests - ${{ matrix.example.name }}
104-
working-directory: ./packages/aws-durable-execution-sdk-python
105104
env:
106105
AWS_REGION: ${{ env.AWS_REGION }}
107106
LAMBDA_ENDPOINT: "https://lambda.us-west-2.amazonaws.com"
@@ -118,7 +117,7 @@ jobs:
118117
TEST_NAME="test_$(echo "${{ matrix.example.name }}" | tr '[:upper:]' '[:lower:]' | tr ' ' '_')"
119118
echo "Test name: ${TEST_NAME}"
120119
121-
# Run integration tests
120+
# Run integration tests from repo root
122121
hatch run test:examples-integration
123122
124123
# Wait for function to be ready

packages/aws-durable-execution-sdk-python/tests/operation/map_test.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,11 @@ def test_map_handler_serializes_batch_result():
10001000
child_checkpoint.is_replay_children.return_value = False
10011001

10021002
def get_checkpoint(op_id):
1003-
return child_checkpoint if op_id.startswith("child-") else parent_checkpoint
1003+
return (
1004+
child_checkpoint
1005+
if op_id.startswith("child-")
1006+
else parent_checkpoint
1007+
)
10041008

10051009
mock_state = Mock()
10061010
mock_state.durable_execution_arn = "arn:test"
@@ -1054,7 +1058,11 @@ def test_map_default_serdes_serializes_batch_result():
10541058
child_checkpoint.is_replay_children.return_value = False
10551059

10561060
def get_checkpoint(op_id):
1057-
return child_checkpoint if op_id.startswith("child-") else parent_checkpoint
1061+
return (
1062+
child_checkpoint
1063+
if op_id.startswith("child-")
1064+
else parent_checkpoint
1065+
)
10581066

10591067
mock_state = Mock()
10601068
mock_state.durable_execution_arn = "arn:test"
@@ -1096,7 +1104,9 @@ def test_map_custom_serdes_serializes_batch_result():
10961104
custom_serdes = CustomStrSerDes()
10971105

10981106
try:
1099-
with patch("aws_durable_execution_sdk_python.serdes.serialize") as mock_serialize:
1107+
with patch(
1108+
"aws_durable_execution_sdk_python.serdes.serialize"
1109+
) as mock_serialize:
11001110
mock_serialize.return_value = '"serialized"'
11011111
importlib.reload(child)
11021112

@@ -1113,7 +1123,11 @@ def test_map_custom_serdes_serializes_batch_result():
11131123
child_checkpoint.is_replay_children.return_value = False
11141124

11151125
def get_checkpoint(op_id):
1116-
return child_checkpoint if op_id.startswith("child-") else parent_checkpoint
1126+
return (
1127+
child_checkpoint
1128+
if op_id.startswith("child-")
1129+
else parent_checkpoint
1130+
)
11171131

11181132
mock_state = Mock()
11191133
mock_state.durable_execution_arn = "arn:test"

packages/aws-durable-execution-sdk-python/tests/operation/parallel_test.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,11 @@ def test_parallel_handler_serializes_batch_result():
976976
child_checkpoint.is_replay_children.return_value = False
977977

978978
def get_checkpoint(op_id):
979-
return child_checkpoint if op_id.startswith("child-") else parent_checkpoint
979+
return (
980+
child_checkpoint
981+
if op_id.startswith("child-")
982+
else parent_checkpoint
983+
)
980984

981985
mock_state = Mock()
982986
mock_state.durable_execution_arn = "arn:test"
@@ -1030,7 +1034,11 @@ def test_parallel_default_serdes_serializes_batch_result():
10301034
child_checkpoint.is_replay_children.return_value = False
10311035

10321036
def get_checkpoint(op_id):
1033-
return child_checkpoint if op_id.startswith("child-") else parent_checkpoint
1037+
return (
1038+
child_checkpoint
1039+
if op_id.startswith("child-")
1040+
else parent_checkpoint
1041+
)
10341042

10351043
mock_state = Mock()
10361044
mock_state.durable_execution_arn = "arn:test"
@@ -1072,7 +1080,9 @@ def test_parallel_custom_serdes_serializes_batch_result():
10721080
custom_serdes = CustomStrSerDes()
10731081

10741082
try:
1075-
with patch("aws_durable_execution_sdk_python.serdes.serialize") as mock_serialize:
1083+
with patch(
1084+
"aws_durable_execution_sdk_python.serdes.serialize"
1085+
) as mock_serialize:
10761086
mock_serialize.return_value = '"serialized"'
10771087
importlib.reload(child)
10781088

@@ -1089,7 +1099,11 @@ def test_parallel_custom_serdes_serializes_batch_result():
10891099
child_checkpoint.is_replay_children.return_value = False
10901100

10911101
def get_checkpoint(op_id):
1092-
return child_checkpoint if op_id.startswith("child-") else parent_checkpoint
1102+
return (
1103+
child_checkpoint
1104+
if op_id.startswith("child-")
1105+
else parent_checkpoint
1106+
)
10931107

10941108
mock_state = Mock()
10951109
mock_state.durable_execution_arn = "arn:test"

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ dependencies = [
1919
[tool.hatch.envs.test.scripts]
2020
all = "pytest {args}"
2121
cov = "pytest --cov-report=term-missing --cov {args}"
22+
examples-integration = "pytest --runner-mode=cloud -m example packages/examples/test/ -v {args}"
2223

2324
[tool.pytest.ini_options]
2425
addopts = "--import-mode=importlib"

0 commit comments

Comments
 (0)