diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b04334b..db0499e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install Hatch run: | - python -m pip install hatch==1.15.0 + python -m pip install hatch==1.16.5 - name: static analysis run: hatch fmt --check - name: type checking diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 3ceb9a6..bd35d8b 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -42,7 +42,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install Hatch - run: python -m pip install hatch==1.15.0 + run: python -m pip install hatch==1.16.5 - name: Setup and run Testing SDK working-directory: testing-sdk @@ -102,7 +102,7 @@ jobs: env: AWS_DURABLE_SDK_URL: file://${{ github.workspace }}/language-sdk run: | - pip install hatch==1.15.0 + pip install hatch==1.16.5 python -m pip install -e . - name: Get integration examples diff --git a/.github/workflows/notify_slack.yml b/.github/workflows/notify_slack.yml new file mode 100644 index 0000000..c1b2ebb --- /dev/null +++ b/.github/workflows/notify_slack.yml @@ -0,0 +1,39 @@ +name: Slack Notifications + +on: + issues: + types: [opened, reopened, edited] + pull_request_target: + types: [opened, reopened, synchronize] + +permissions: {} + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - name: Send issue notification to Slack + if: github.event_name == 'issues' + uses: slackapi/slack-github-action@v2.1.1 + with: + webhook: ${{ secrets.SLACK_WEBHOOK_URL_ISSUE }} + webhook-type: incoming-webhook + payload: | + { + "action": "${{ github.event.action }}", + "issue_url": "${{ github.event.issue.html_url }}", + "package_name": "${{ github.repository }}" + } + + - name: Send pull request notification to Slack + if: github.event_name == 'pull_request_target' + uses: slackapi/slack-github-action@v2.1.1 + with: + webhook: ${{ secrets.SLACK_WEBHOOK_URL_PR }} + webhook-type: incoming-webhook + payload: | + { + "action": "${{ github.event.action }}", + "pr_url": "${{ github.event.pull_request.html_url }}", + "package_name": "${{ github.repository }}" + } \ No newline at end of file diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index aca91f6..83c6869 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -27,7 +27,7 @@ jobs: python-version: "3.11" - name: Install Hatch run: | - python -m pip install --upgrade hatch==1.15.0 + python -m pip install --upgrade hatch==1.16.5 - name: Build release distributions run: | # NOTE: put your own distribution build steps here. diff --git a/.github/workflows/sync-package.yml b/.github/workflows/sync-package.yml index 58048ea..9dfc6ff 100644 --- a/.github/workflows/sync-package.yml +++ b/.github/workflows/sync-package.yml @@ -27,7 +27,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install Hatch run: | - python -m pip install --upgrade hatch==1.15.0 + python -m pip install --upgrade hatch==1.16.5 - name: Build distribution run: hatch build - name: configure aws credentials diff --git a/src/aws_durable_execution_sdk_python/context.py b/src/aws_durable_execution_sdk_python/context.py index a1a49a5..50d029f 100644 --- a/src/aws_durable_execution_sdk_python/context.py +++ b/src/aws_durable_execution_sdk_python/context.py @@ -42,7 +42,7 @@ SerDes, deserialize, ) -from aws_durable_execution_sdk_python.state import ExecutionState # noqa: TCH001 +from aws_durable_execution_sdk_python.state import ExecutionState # noqa: TC001 from aws_durable_execution_sdk_python.threading import OrderedCounter from aws_durable_execution_sdk_python.types import Callback as CallbackProtocol from aws_durable_execution_sdk_python.types import ( diff --git a/src/aws_durable_execution_sdk_python/lambda_service.py b/src/aws_durable_execution_sdk_python/lambda_service.py index b11f950..cafda01 100644 --- a/src/aws_durable_execution_sdk_python/lambda_service.py +++ b/src/aws_durable_execution_sdk_python/lambda_service.py @@ -1079,12 +1079,12 @@ def checkpoint( self.client.checkpoint_durable_execution( DurableExecutionArn=durable_execution_arn, CheckpointToken=checkpoint_token, - Updates=cast(Any, [o.to_dict() for o in updates]), + Updates=cast("Any", [o.to_dict() for o in updates]), **optional_params, # type: ignore[arg-type] ) ) - return CheckpointOutput.from_dict(cast(MutableMapping[str, Any], result)) + return CheckpointOutput.from_dict(cast("MutableMapping[str, Any]", result)) except Exception as e: checkpoint_error = CheckpointError.from_exception(e) logger.exception( @@ -1108,7 +1108,7 @@ def get_execution_state( MaxItems=max_items, ) ) - return StateOutput.from_dict(cast(MutableMapping[str, Any], result)) + return StateOutput.from_dict(cast("MutableMapping[str, Any]", result)) except Exception as e: error = GetExecutionStateError.from_exception(e) logger.exception( diff --git a/tests/operation/child_test.py b/tests/operation/child_test.py index ae1bb3a..26f5785 100644 --- a/tests/operation/child_test.py +++ b/tests/operation/child_test.py @@ -502,7 +502,7 @@ def my_summary(result: str) -> str: return "summary" child_config: ChildConfig = ChildConfig[str]( - summary_generator=cast(SummaryGenerator, my_summary) + summary_generator=cast("SummaryGenerator", my_summary) ) actual_result = child_handler( diff --git a/tests/serdes_test.py b/tests/serdes_test.py index d511918..154559c 100644 --- a/tests/serdes_test.py +++ b/tests/serdes_test.py @@ -798,7 +798,7 @@ def test_envelope_type_preservation_after_roundtrip(): result = _roundtrip_envelope(original) # Verify types are preserved - assert type(result["none"]) is type(None) + assert result["none"] is None assert type(result["bool"]) is bool assert type(result["int"]) is int assert type(result["float"]) is float