Skip to content

Commit 0b726e2

Browse files
Merge branch 'develop' into feat/connect-outbound-campaigns
2 parents 79e06ab + c8da226 commit 0b726e2

92 files changed

Lines changed: 2202 additions & 760 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/ISSUE_TEMPLATE/bug_report.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ body:
4545
description: Please share how we might be able to reproduce this issue
4646
validations:
4747
required: true
48+
- type: dropdown
49+
id: reproduced
50+
attributes:
51+
label: Did you run the reproduction yourself?
52+
description: We welcome reports written with AI assistance; tell us whether the snippet above was executed and the failure observed, or derived from reading the code.
53+
options:
54+
- Yes, I ran it and saw the failure
55+
- No, this comes from reading the code
56+
validations:
57+
required: true
4858
- type: input
4959
id: version
5060
attributes:

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111

1212
> Please share what the user experience looks like before and after this change
1313
14+
### Verification
15+
16+
> How did you verify this change? Tests you ran yourself, and the real AWS service or event you validated against when it applies.
17+
> If you used an AI assistant to write any part of this PR, say so here. That is welcome; what we ask is the verification above, done by you.
18+
1419
<!-------
1520
Before creating the pull request, please make sure you do the following:
1621

‎.github/workflows/pre-release.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
run: cat pyproject.toml
116116

117117
- name: Set up uv
118-
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
118+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
119119
with:
120120
version: "0.12.19"
121121
enable-cache: true
@@ -155,7 +155,7 @@ jobs:
155155
artifact_name: ${{ needs.seal.outputs.artifact_name }}
156156

157157
- name: Set up uv
158-
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
158+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
159159
with:
160160
version: "0.12.19"
161161
enable-cache: true

‎.github/workflows/publish_v3_layer.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
artifact_name: ${{ inputs.source_code_artifact_name }}
120120

121121
- name: Set up uv
122-
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
122+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
123123
with:
124124
version: "0.12.19"
125125
enable-cache: true

‎.github/workflows/quality_check.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
with:
7575
python-version: "3.14"
7676
- name: Set up uv
77-
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
77+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
7878
with:
7979
version: "0.12.19"
8080
enable-cache: true
@@ -112,7 +112,7 @@ jobs:
112112
with:
113113
python-version: ${{ matrix.python-version }}
114114
- name: Set up uv
115-
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
115+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
116116
with:
117117
version: "0.12.19"
118118
enable-cache: true

‎.github/workflows/quality_code_cdk_constructor.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
steps:
5353
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5454
- name: Set up uv
55-
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
55+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
5656
with:
5757
version: "0.12.19"
5858
enable-cache: true

‎.github/workflows/release-v3.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ jobs:
144144
run: cat pyproject.toml
145145

146146
- name: Set up uv
147-
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
147+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
148148
with:
149149
version: "0.12.19"
150150
enable-cache: true
@@ -184,7 +184,7 @@ jobs:
184184
artifact_name: ${{ needs.seal.outputs.artifact_name }}
185185

186186
- name: Set up uv
187-
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
187+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
188188
with:
189189
version: "0.12.19"
190190
enable-cache: true

‎.github/workflows/reusable_deploy_v3_layer_stack.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ jobs:
153153
artifact_name: ${{ inputs.source_code_artifact_name }}
154154

155155
- name: Set up uv
156-
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
156+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
157157
with:
158158
version: "0.12.19"
159159
enable-cache: true

‎.github/workflows/run-e2e-tests.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
- name: "Checkout"
5555
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5656
- name: Set up uv
57-
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
57+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
5858
with:
5959
version: "0.12.19"
6060
enable-cache: true

‎AGENTS.md‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!-- markdownlint-disable MD041 MD043 -->
2+
# Working on Powertools for AWS Lambda (Python)
3+
4+
Short guide for anyone, human or coding agent, changing this repository. It points to the sources of truth instead of repeating them. Read [CONTRIBUTING.md](CONTRIBUTING.md) for the process and [docs/adr](docs/adr/README.md) for the premises behind the rules below.
5+
6+
## Before you start
7+
8+
- Work from an issue that a maintainer triaged. PRs on untriaged issues usually wait or get closed.
9+
- One issue, one PR. Do not bundle unrelated fixes, even small ones.
10+
- Branch from `develop`. Keep the diff limited to what the issue needs; do not reformat or "improve" code you did not have to touch.
11+
12+
## Commands
13+
14+
```bash
15+
make dev # uv sync, pre-commit hooks
16+
make lint # ruff format + ruff check (aws_lambda_powertools, tests, examples)
17+
make mypy # static typing, must pass
18+
uv run pytest tests/unit tests/functional/<utility> # fast loop for one utility
19+
make test # full unit + functional + performance, what CI runs
20+
make pr # everything CI checks, run it before opening the PR
21+
```
22+
23+
Do not run the full suite with `pytest -n auto`; collection differs between workers and it fails for reasons unrelated to your change.
24+
25+
## What a PR needs to pass
26+
27+
- Title follows [conventional commits](.github/semantic.yml): `fix(parameters): ...`, `feat(event_handler): ...`, `docs(...)`. Scope is the utility name.
28+
- Description contains `closes #<issue>` alone on its own line. Trailing text on that line breaks the related-issue check.
29+
- Tests for the change. A bug fix adds a test that fails on `develop` and passes with the fix.
30+
- Functional tests use the public API only, the way a customer would call it. Never test internal methods: do not call or patch private methods, do not assert on private attributes.
31+
- Existing tests are not modified or deleted unless the PR proves the old behaviour was a bug. Say so in the description.
32+
- `ruff`, `mypy` and the test suite green on Python 3.10 to 3.14. CI runs all five.
33+
- Behaviour changes update the docs page and its example under `examples/<utility>/src/`.
34+
35+
## Things we do not do
36+
37+
- Add a runtime dependency. Optional features go behind an extra in `pyproject.toml`; the core stays `jmespath` and `typing-extensions`. See [ADR 0007](docs/adr/0007-lean-dependencies.md).
38+
- Import heavy modules at module level. Cold start matters; import lazily inside the function or utility that needs it. See [ADR 0002](docs/adr/0002-every-millisecond-counts.md).
39+
- Ship `boto3`, `botocore` or their dependencies in the Lambda layer. See [ADR 0004](docs/adr/0004-layer-and-packaging.md).
40+
- Break or change public behaviour in a minor release. If an input we accept today is wrong, warn with `PowertoolsUserWarning` now and raise in the next major. See [ADR 0006](docs/adr/0006-zero-regression-and-compatibility.md).
41+
- Duplicate a code path to add a variant (async, a new event shape). Share the logic and keep the difference to the call site.
42+
- Change `tests/events/*.json` fixtures in a way that hides a bug. Add a new fixture instead.
43+
- Use threads, background work or anything that assumes the process outlives the invocation. See [ADR 0001](docs/adr/0001-lambda-first.md).
44+
45+
## Verifying your change
46+
47+
- Run the tests yourself and read the output. Do not describe runs you did not do.
48+
- If the change touches an AWS service integration (Parameters, Idempotency, Batch, Data Classes shapes, Event Handler payloads), validate it against the real service or a real event and say in the PR how you did it. Mocks prove the logic, not the contract.
49+
- If you used an AI assistant, say so in the PR. We welcome it. What we ask is the verification above, done by you.
50+
51+
## Where things are
52+
53+
| Need | Look at |
54+
| --- | --- |
55+
| Utility code | `aws_lambda_powertools/<utility>/` or `aws_lambda_powertools/utilities/<utility>/` |
56+
| Tests | `tests/unit/<utility>/`, `tests/functional/<utility>/`, `tests/performance/` |
57+
| Sample events | `tests/events/` |
58+
| Docs and examples | `docs/<area>/<utility>.md`, `examples/<utility>/src/` |
59+
| Project premises | `docs/adr/` |
60+
| Layer build | `layer_v3/` |
61+
| Maintainer process | [MAINTAINERS.md](MAINTAINERS.md), [docs/maintainers.md](docs/maintainers.md) |

0 commit comments

Comments
 (0)