Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ __pycache__/
.attach_*

dist/

.vscode/
.kiro/
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ This will drop you into the Python debugger on the failed test.
### Writing tests
Place test files in the `tests/` directory, using file names that end with `_test`.

Mimic the package structure in the src/aws_durable_functions_sdk_python directory.
Mimic the package structure in the src/aws_durable_execution_sdk_python directory.
Name your module so that src/mypackage/mymodule.py has a dedicated unit test file
tests/mypackage/mymodule_test.py

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ def function_under_test(event: Any, context: DurableContext) -> list[str]:
### Your test code

```python
from aws_durable_functions_sdk_python.execution import InvocationStatus
from aws_durable_functions_sdk_python_testing.runner import (
from aws_durable_execution_sdk_python.execution import InvocationStatus
from aws_durable_execution_sdk_python_testing.runner import (
ContextOperation,
DurableFunctionTestResult,
DurableFunctionTestRunner,
Expand Down
30 changes: 15 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "aws-durable-functions-sdk-python-testing"
name = "aws-durable-execution-sdk-python-testing"
dynamic = ["version"]
description = 'This the Python SDK for AWS Lambda Durable Functions.'
description = 'This the Python SDK for AWS Lambda Durable Execution.'
readme = "README.md"
requires-python = ">=3.13"
license = "Apache-2.0"
Expand All @@ -22,25 +22,25 @@ classifiers = [
]
dependencies = [
"boto3>=1.40.30",
"aws_durable_functions_sdk_python @ git+ssh://git@github.com/aws/aws-durable-functions-sdk-python.git"
"aws_durable_execution_sdk_python @ git+ssh://git@github.com/aws/aws-durable-execution-sdk-python.git"
]

[project.urls]
Documentation = "https://github.com/aws/aws-durable-functions-sdk-python-testing#readme"
Issues = "https://github.com/aws/aws-durable-functions-sdk-python-testing/issues"
Source = "https://github.com/aws/aws-durable-functions-sdk-python-testing"
Documentation = "https://github.com/aws/aws-durable-execution-sdk-python-testing#readme"
Issues = "https://github.com/aws/aws-durable-execution-sdk-python-testing/issues"
Source = "https://github.com/aws/aws-durable-execution-sdk-python-testing"

[tool.hatch.build.targets.sdist]
packages = ["src/aws_durable_functions_sdk_python_testing"]
packages = ["src/aws_durable_execution_sdk_python_testing"]

[tool.hatch.build.targets.wheel]
packages = ["src/aws_durable_functions_sdk_python_testing"]
packages = ["src/aws_durable_execution_sdk_python_testing"]

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.version]
path = "src/aws_durable_functions_sdk_python_testing/__about__.py"
path = "src/aws_durable_execution_sdk_python_testing/__about__.py"

# [tool.hatch.envs.default]
# dependencies=["pytest"]
Expand All @@ -56,27 +56,27 @@ dependencies = [
]

[tool.hatch.envs.test.scripts]
cov="pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src/aws_durable_functions_sdk_python_testing --cov=tests --cov-fail-under=99"
cov="pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src/aws_durable_execution_sdk_python_testing --cov=tests --cov-fail-under=99"

[tool.hatch.envs.types]
extra-dependencies = [
"mypy>=1.0.0",
"pytest"
]
[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args:src/aws_durable_functions_sdk_python_testing tests}"
check = "mypy --install-types --non-interactive {args:src/aws_durable_execution_sdk_python_testing tests}"

[tool.coverage.run]
source_pkgs = ["aws_durable_functions_sdk_python_testing", "tests"]
source_pkgs = ["aws_durable_execution_sdk_python_testing", "tests"]
branch = true
parallel = true
omit = [
"src/aws_durable_functions_sdk_python_testing/__about__.py",
"src/aws_durable_execution_sdk_python_testing/__about__.py",
]

[tool.coverage.paths]
aws_durable_functions_sdk_python_testing = ["src/aws_durable_functions_sdk_python_testing", "*/aws-durable-functions-sdk-python-testing/src/aws_durable_functions_sdk_python_testing"]
tests = ["tests", "*/aws-durable-functions-sdk-python-testing/tests"]
aws_durable_execution_sdk_python_testing = ["src/aws_durable_execution_sdk_python_testing", "*/aws-durable-execution-sdk-python-testing/src/aws_durable_execution_sdk_python_testing"]
tests = ["tests", "*/aws-durable-execution-sdk-python-testing/tests"]

[tool.coverage.report]
exclude_lines = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@

from typing import TYPE_CHECKING

from aws_durable_functions_sdk_python.lambda_service import (
from aws_durable_execution_sdk_python.lambda_service import (
CheckpointOutput,
CheckpointUpdatedExecutionState,
OperationUpdate,
StateOutput,
)

from aws_durable_functions_sdk_python_testing.checkpoint.transformer import (
from aws_durable_execution_sdk_python_testing.checkpoint.transformer import (
OperationTransformer,
)
from aws_durable_functions_sdk_python_testing.checkpoint.validators.checkpoint import (
from aws_durable_execution_sdk_python_testing.checkpoint.validators.checkpoint import (
CheckpointValidator,
)
from aws_durable_functions_sdk_python_testing.exceptions import InvalidParameterError
from aws_durable_functions_sdk_python_testing.observer import ExecutionNotifier
from aws_durable_functions_sdk_python_testing.token import CheckpointToken
from aws_durable_execution_sdk_python_testing.exceptions import InvalidParameterError
from aws_durable_execution_sdk_python_testing.observer import ExecutionNotifier
from aws_durable_execution_sdk_python_testing.token import CheckpointToken

if TYPE_CHECKING:
from aws_durable_functions_sdk_python_testing.execution import Execution
from aws_durable_functions_sdk_python_testing.scheduler import Scheduler
from aws_durable_functions_sdk_python_testing.store import ExecutionStore
from aws_durable_execution_sdk_python_testing.execution import Execution
from aws_durable_execution_sdk_python_testing.scheduler import Scheduler
from aws_durable_execution_sdk_python_testing.store import ExecutionStore


class CheckpointProcessor:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from datetime import timedelta
from typing import TYPE_CHECKING

from aws_durable_functions_sdk_python.lambda_service import (
from aws_durable_execution_sdk_python.lambda_service import (
CallbackDetails,
ContextDetails,
ExecutionDetails,
Expand All @@ -20,7 +20,7 @@
)

if TYPE_CHECKING:
from aws_durable_functions_sdk_python_testing.observer import ExecutionNotifier
from aws_durable_execution_sdk_python_testing.observer import ExecutionNotifier


class OperationProcessor:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@

from typing import TYPE_CHECKING

from aws_durable_functions_sdk_python.lambda_service import (
from aws_durable_execution_sdk_python.lambda_service import (
Operation,
OperationAction,
OperationStatus,
OperationUpdate,
)

from aws_durable_functions_sdk_python_testing.checkpoint.processors.base import (
from aws_durable_execution_sdk_python_testing.checkpoint.processors.base import (
OperationProcessor,
)

if TYPE_CHECKING:
from aws_durable_functions_sdk_python_testing.observer import ExecutionNotifier
from aws_durable_execution_sdk_python_testing.observer import ExecutionNotifier


class CallbackProcessor(OperationProcessor):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@

from typing import TYPE_CHECKING

from aws_durable_functions_sdk_python.lambda_service import (
from aws_durable_execution_sdk_python.lambda_service import (
Operation,
OperationAction,
OperationStatus,
OperationUpdate,
)

from aws_durable_functions_sdk_python_testing.checkpoint.processors.base import (
from aws_durable_execution_sdk_python_testing.checkpoint.processors.base import (
OperationProcessor,
)

if TYPE_CHECKING:
from aws_durable_functions_sdk_python_testing.observer import ExecutionNotifier
from aws_durable_execution_sdk_python_testing.observer import ExecutionNotifier


class ContextProcessor(OperationProcessor):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@

from typing import TYPE_CHECKING

from aws_durable_functions_sdk_python.lambda_service import (
from aws_durable_execution_sdk_python.lambda_service import (
ErrorObject,
Operation,
OperationAction,
OperationUpdate,
)

from aws_durable_functions_sdk_python_testing.checkpoint.processors.base import (
from aws_durable_execution_sdk_python_testing.checkpoint.processors.base import (
OperationProcessor,
)

if TYPE_CHECKING:
from aws_durable_functions_sdk_python_testing.observer import ExecutionNotifier
from aws_durable_execution_sdk_python_testing.observer import ExecutionNotifier


class ExecutionProcessor(OperationProcessor):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
from datetime import UTC, datetime, timedelta
from typing import TYPE_CHECKING

from aws_durable_functions_sdk_python.lambda_service import (
from aws_durable_execution_sdk_python.lambda_service import (
Operation,
OperationAction,
OperationStatus,
OperationUpdate,
StepDetails,
)

from aws_durable_functions_sdk_python_testing.checkpoint.processors.base import (
from aws_durable_execution_sdk_python_testing.checkpoint.processors.base import (
OperationProcessor,
)
from aws_durable_functions_sdk_python_testing.exceptions import InvalidParameterError
from aws_durable_execution_sdk_python_testing.exceptions import InvalidParameterError

if TYPE_CHECKING:
from aws_durable_functions_sdk_python_testing.observer import ExecutionNotifier
from aws_durable_execution_sdk_python_testing.observer import ExecutionNotifier


class StepProcessor(OperationProcessor):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
from datetime import UTC, datetime, timedelta
from typing import TYPE_CHECKING

from aws_durable_functions_sdk_python.lambda_service import (
from aws_durable_execution_sdk_python.lambda_service import (
Operation,
OperationAction,
OperationStatus,
OperationUpdate,
WaitDetails,
)

from aws_durable_functions_sdk_python_testing.checkpoint.processors.base import (
from aws_durable_execution_sdk_python_testing.checkpoint.processors.base import (
OperationProcessor,
)

if TYPE_CHECKING:
from aws_durable_functions_sdk_python_testing.observer import ExecutionNotifier
from aws_durable_execution_sdk_python_testing.observer import ExecutionNotifier


class WaitProcessor(OperationProcessor):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@

from typing import TYPE_CHECKING

from aws_durable_functions_sdk_python.lambda_service import (
from aws_durable_execution_sdk_python.lambda_service import (
Operation,
OperationType,
OperationUpdate,
)

from aws_durable_functions_sdk_python_testing.checkpoint.processors.callback import (
from aws_durable_execution_sdk_python_testing.checkpoint.processors.callback import (
CallbackProcessor,
)
from aws_durable_functions_sdk_python_testing.checkpoint.processors.context import (
from aws_durable_execution_sdk_python_testing.checkpoint.processors.context import (
ContextProcessor,
)
from aws_durable_functions_sdk_python_testing.checkpoint.processors.execution import (
from aws_durable_execution_sdk_python_testing.checkpoint.processors.execution import (
ExecutionProcessor,
)
from aws_durable_functions_sdk_python_testing.checkpoint.processors.step import (
from aws_durable_execution_sdk_python_testing.checkpoint.processors.step import (
StepProcessor,
)
from aws_durable_functions_sdk_python_testing.checkpoint.processors.wait import (
from aws_durable_execution_sdk_python_testing.checkpoint.processors.wait import (
WaitProcessor,
)
from aws_durable_functions_sdk_python_testing.exceptions import InvalidParameterError
from aws_durable_execution_sdk_python_testing.exceptions import InvalidParameterError

if TYPE_CHECKING:
from collections.abc import MutableMapping

from aws_durable_functions_sdk_python_testing.checkpoint.processors.base import (
from aws_durable_execution_sdk_python_testing.checkpoint.processors.base import (
OperationProcessor,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,38 @@
import json
from typing import TYPE_CHECKING

from aws_durable_functions_sdk_python.lambda_service import (
from aws_durable_execution_sdk_python.lambda_service import (
OperationType,
OperationUpdate,
)

from aws_durable_functions_sdk_python_testing.checkpoint.validators.operations.callback import (
from aws_durable_execution_sdk_python_testing.checkpoint.validators.operations.callback import (
CallbackOperationValidator,
)
from aws_durable_functions_sdk_python_testing.checkpoint.validators.operations.context import (
from aws_durable_execution_sdk_python_testing.checkpoint.validators.operations.context import (
ContextOperationValidator,
)
from aws_durable_functions_sdk_python_testing.checkpoint.validators.operations.execution import (
from aws_durable_execution_sdk_python_testing.checkpoint.validators.operations.execution import (
ExecutionOperationValidator,
)
from aws_durable_functions_sdk_python_testing.checkpoint.validators.operations.invoke import (
from aws_durable_execution_sdk_python_testing.checkpoint.validators.operations.invoke import (
InvokeOperationValidator,
)
from aws_durable_functions_sdk_python_testing.checkpoint.validators.operations.step import (
from aws_durable_execution_sdk_python_testing.checkpoint.validators.operations.step import (
StepOperationValidator,
)
from aws_durable_functions_sdk_python_testing.checkpoint.validators.operations.wait import (
from aws_durable_execution_sdk_python_testing.checkpoint.validators.operations.wait import (
WaitOperationValidator,
)
from aws_durable_functions_sdk_python_testing.checkpoint.validators.transitions import (
from aws_durable_execution_sdk_python_testing.checkpoint.validators.transitions import (
ValidActionsByOperationTypeValidator,
)
from aws_durable_functions_sdk_python_testing.exceptions import InvalidParameterError
from aws_durable_execution_sdk_python_testing.exceptions import InvalidParameterError

if TYPE_CHECKING:
from collections.abc import MutableMapping

from aws_durable_functions_sdk_python_testing.execution import Execution
from aws_durable_execution_sdk_python_testing.execution import Execution

MAX_ERROR_PAYLOAD_SIZE_BYTES = 32768

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

from __future__ import annotations

from aws_durable_functions_sdk_python.lambda_service import (
from aws_durable_execution_sdk_python.lambda_service import (
Operation,
OperationAction,
OperationStatus,
OperationUpdate,
)

from aws_durable_functions_sdk_python_testing.exceptions import InvalidParameterError
from aws_durable_execution_sdk_python_testing.exceptions import InvalidParameterError

VALID_ACTIONS_FOR_CALLBACK = frozenset(
[
Expand Down
Loading
Loading