Skip to content

Commit 46e29f4

Browse files
author
Michael Brewer
authored
Merge branch 'develop' into docs/1064-tutorial
2 parents 19a4cff + f62d07a commit 46e29f4

12 files changed

+454
-167
lines changed

Diff for: .github/ISSUE_TEMPLATE/bug_report.yml

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ body:
77
attributes:
88
value: |
99
Thank you for submitting a bug report. Please add as much information as possible to help us reproduce, and remove any potential sensitive data.
10+
11+
Please become familiar with [our definition of bug](https://github.com/awslabs/aws-lambda-powertools-python/blob/develop/MAINTAINERS.md#is-that-a-bug).
1012
- type: textarea
1113
id: expected_behaviour
1214
attributes:

Diff for: .github/ISSUE_TEMPLATE/static_typing.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Static typing mismatch report
22
description: Report a static type mismatch caught by a static type checker
33
title: "Static typing: TITLE"
4-
labels: ["static_typing", "triage"]
4+
labels: ["typing", "triage"]
55
body:
66
- type: markdown
77
attributes:

Diff for: .github/auto_assign-issues.yml

-8
This file was deleted.

Diff for: .github/boring-cyborg.yml

+37-20
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,84 @@
11
##### Labeler ##########################################################################################################
22
labelPRBasedOnFilePath:
3-
area/logger:
3+
logger:
44
- aws_lambda_powertools/logging/*
55
- aws_lambda_powertools/logging/**/*
66
- aws_lambda_powertools/package_logger.py
7-
area/tracer:
7+
tracer:
88
- aws_lambda_powertools/tracing/*
99
- aws_lambda_powertools/tracing/**/*
10-
area/metrics:
10+
metrics:
1111
- aws_lambda_powertools/metrics/*
1212
- aws_lambda_powertools/metrics/**/*
13-
area/event_handlers:
13+
event_handlers:
1414
- aws_lambda_powertools/event_handler/*
1515
- aws_lambda_powertools/event_handler/**/*
16-
area/middleware_factory:
16+
middleware_factory:
1717
- aws_lambda_powertools/middleware_factory/*
1818
- aws_lambda_powertools/middleware_factory/**/*
19-
area/parameters:
19+
parameters:
2020
- aws_lambda_powertools/parameters/*
2121
- aws_lambda_powertools/parameters/**/*
22-
area/batch:
22+
batch:
2323
- aws_lambda_powertools/batch/*
2424
- aws_lambda_powertools/batch/**/*
25-
area/validator:
25+
validator:
2626
- aws_lambda_powertools/validation/*
2727
- aws_lambda_powertools/validation/**/*
28-
area/event_sources:
28+
event_sources:
2929
- aws_lambda_powertools/data_classes/*
3030
- aws_lambda_powertools/data_classes/**/*
31-
area/parser:
31+
parser:
3232
- aws_lambda_powertools/parser/*
3333
- aws_lambda_powertools/parser/**/*
34-
area/idempotency:
34+
idempotency:
3535
- aws_lambda_powertools/idempotency/*
3636
- aws_lambda_powertools/idempotency/**/*
37-
area/feature_flags:
37+
feature_flags:
3838
- aws_lambda_powertools/feature_flags/*
3939
- aws_lambda_powertools/feature_flags/**/*
40-
area/jmespath_util:
40+
jmespath_util:
4141
- aws_lambda_powertools/utilities/jmespath_utils/*
42-
area/utilities:
42+
typing:
43+
- aws_lambda_powertools/utilities/typing/*
44+
- mypy.ini
45+
utilities:
4346
- aws_lambda_powertools/utilities/*
4447
- aws_lambda_powertools/utilities/**/*
45-
- aws_lambda_powertools/middleware_factory/*
46-
- aws_lambda_powertools/middleware_factory/**/*
4748

4849
documentation:
4950
- docs/*
5051
- docs/**/*
5152
- mkdocs.yml
5253

54+
github-actions:
55+
- .github/workflows/*
56+
- .github/workflows/**/*
57+
- .github/dependabot.yml
58+
- .github/boring-cyborg.yml
59+
- .github/release-drafter.yml
60+
- .github/semantic.yml
61+
- .github/stale.yml
62+
- .github/mergify.yml
63+
64+
github-templates:
65+
- .github/ISSUE_TEMPLATE/*
66+
- .github/PULL_REQUEST_TEMPLATE.md
67+
- .github/.chglog/*
68+
- .github/.chglog/**/*
69+
5370
internal:
54-
- .github/*
55-
- .github/**/*
56-
- .chglog/*
5771
- .flake8
72+
- .bandit.baseline
5873
- .gitignore
5974
- .pre-commit-config.yaml
75+
- MANIFEST.in
6076
- Makefile
6177
- CONTRIBUTING.md
78+
- MAINTAINERS.md
6279
- CODE_OF_CONDUCT.md
6380
- LICENSE
81+
- THIRD-PARTY-LICENSES
6482
- aws_lambda_powertools_python/shared/*
6583
- aws_lambda_powertools_python/shared/**
6684

@@ -86,7 +104,6 @@ firstPRMergeComment: >
86104
firstIssueWelcomeComment: >
87105
Thanks for opening your first issue here! We'll come back to you as soon as we can.
88106
89-
90107
###### IssueLink Adder #################################################################################################
91108
# Insert Issue (Jira/Github etc) link in PR description based on the Issue ID in PR title.
92109
#insertIssueLinkInPrDescription:

Diff for: .github/release-drafter.yml

+16-20
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
11
change-template: "* $TITLE (#$NUMBER) by @$AUTHOR"
22
categories:
3-
- title: '⚡ Breaking Changes'
3+
- title: "⚡ Breaking Changes"
44
labels:
5-
- 'breaking-change'
6-
- title: '🌟New features and non-breaking changes'
5+
- "breaking-change"
6+
- title: "🌟New features and non-breaking changes"
77
labels:
8-
- 'major'
9-
- 'feature'
10-
- title: '🌟 Minor Changes'
8+
- "feature"
9+
- title: "📜 Documentation updates"
1110
labels:
12-
- 'enhancement'
13-
- title: '📜 Documentation updates'
11+
- "documentation"
12+
- title: "🐛 Bug and hot fixes"
1413
labels:
15-
- 'documentation'
16-
- title: '🐛 Bug and hot fixes'
14+
- "bug"
15+
- "fix"
16+
- title: "🚒 Deprecations"
1717
labels:
18-
- 'bug'
19-
- 'fix'
20-
- title: '🚒 Deprecations'
18+
- "deprecated"
19+
- title: "🔧 Maintenance"
2120
labels:
22-
- 'deprecated'
23-
- title: '🔧 Maintenance'
24-
labels:
25-
- 'internal'
26-
- 'dependencies'
21+
- "internal"
22+
- "dependencies"
2723
exclude-labels:
28-
- 'skip-changelog'
29-
tag-template: 'v$NEXT_PATCH_VERSION'
24+
- "skip-changelog"
25+
tag-template: "v$NEXT_PATCH_VERSION"
3026
template: |
3127
## Summary
3228

Diff for: .github/workflows/post_release.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const STAGED_LABEL = "status/staged-next-release";
1+
const STAGED_LABEL = "pending-release";
22

33
/**
44
* Fetch issues using GitHub REST API

Diff for: .github/workflows/publish.yml

+77-78
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ name: Publish to PyPi
2222
# 8. Builds a fresh version of docs including Changelog updates
2323
# 9. Push latest release source code to master using release title as the commit message
2424
# 10. Builds latest documentation for new release, and update latest alias pointing to the new release tag
25-
# 11. Close and notify all issues labeled "status/staged-next-release" about the release details
25+
# 11. Close and notify all issues labeled "pending-release" about the release details
2626

2727
#
2828
# === Fallback mechanism due to external failures ===
@@ -36,7 +36,6 @@ name: Publish to PyPi
3636
#
3737
# Look for rebuild latest docs workflow
3838

39-
4039
on:
4140
release:
4241
types: [published]
@@ -45,84 +44,84 @@ jobs:
4544
release:
4645
runs-on: ubuntu-latest
4746
steps:
48-
- uses: actions/checkout@v3
49-
with:
50-
fetch-depth: 0
51-
- name: Set up Python
52-
uses: actions/setup-python@v3
53-
with:
54-
python-version: "3.8"
55-
- name: Set release notes tag
56-
run: |
57-
RELEASE_TAG_VERSION=${{ github.event.release.tag_name }}
58-
echo "RELEASE_TAG_VERSION=${RELEASE_TAG_VERSION:1}" >> $GITHUB_ENV
59-
- name: Ensure new version is also set in pyproject and CHANGELOG
60-
run: |
61-
grep --regexp "${RELEASE_TAG_VERSION}" CHANGELOG.md
62-
grep --regexp "version \= \"${RELEASE_TAG_VERSION}\"" pyproject.toml
63-
- name: Install dependencies
64-
run: make dev
65-
- name: Run all tests, linting and baselines
66-
run: make pr
67-
- name: Build python package and wheel
68-
run: poetry build
69-
- name: Upload to PyPi test
70-
run: make release-test
71-
env:
72-
PYPI_USERNAME: __token__
73-
PYPI_TEST_TOKEN: ${{ secrets.PYPI_TEST_TOKEN }}
74-
- name: Upload to PyPi prod
75-
run: make release-prod
76-
env:
77-
PYPI_USERNAME: __token__
78-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
79-
- name: publish lambda layer in SAR by triggering the internal codepipeline
80-
run: |
81-
aws ssm put-parameter --name "powertools-python-release-version" --value $RELEASE_TAG_VERSION --overwrite
82-
aws codepipeline start-pipeline-execution --name ${{ secrets.CODEPIPELINE_NAME }}
83-
env:
84-
# Maintenance: Migrate to new OAuth mechanism
85-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
86-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
87-
AWS_DEFAULT_REGION: eu-west-1
88-
AWS_DEFAULT_OUTPUT: json
89-
- name: Setup doc deploy
90-
run: |
91-
git config --global user.name Docs deploy
92-
git config --global user.email [email protected]
93-
- name: Build docs website and API reference
94-
run: |
95-
make release-docs VERSION=${RELEASE_TAG_VERSION} ALIAS="latest"
96-
poetry run mike set-default --push latest
97-
- name: Release API docs to release version
98-
uses: peaceiris/actions-gh-pages@v3
99-
with:
100-
github_token: ${{ secrets.GITHUB_TOKEN }}
101-
publish_dir: ./api
102-
keep_files: true
103-
destination_dir: ${{ env.RELEASE_TAG_VERSION }}/api
104-
- name: Release API docs to latest
105-
uses: peaceiris/actions-gh-pages@v3
106-
with:
107-
github_token: ${{ secrets.GITHUB_TOKEN }}
108-
publish_dir: ./api
109-
keep_files: true
110-
destination_dir: latest/api
111-
- name: Close issues related to this release
112-
uses: actions/github-script@v6
113-
with:
114-
script: |
115-
const post_release = require('.github/workflows/post_release.js')
116-
await post_release({github, context, core})
47+
- uses: actions/checkout@v3
48+
with:
49+
fetch-depth: 0
50+
- name: Set up Python
51+
uses: actions/setup-python@v3
52+
with:
53+
python-version: "3.8"
54+
- name: Set release notes tag
55+
run: |
56+
RELEASE_TAG_VERSION=${{ github.event.release.tag_name }}
57+
echo "RELEASE_TAG_VERSION=${RELEASE_TAG_VERSION:1}" >> $GITHUB_ENV
58+
- name: Ensure new version is also set in pyproject and CHANGELOG
59+
run: |
60+
grep --regexp "${RELEASE_TAG_VERSION}" CHANGELOG.md
61+
grep --regexp "version \= \"${RELEASE_TAG_VERSION}\"" pyproject.toml
62+
- name: Install dependencies
63+
run: make dev
64+
- name: Run all tests, linting and baselines
65+
run: make pr
66+
- name: Build python package and wheel
67+
run: poetry build
68+
- name: Upload to PyPi test
69+
run: make release-test
70+
env:
71+
PYPI_USERNAME: __token__
72+
PYPI_TEST_TOKEN: ${{ secrets.PYPI_TEST_TOKEN }}
73+
- name: Upload to PyPi prod
74+
run: make release-prod
75+
env:
76+
PYPI_USERNAME: __token__
77+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
78+
- name: publish lambda layer in SAR by triggering the internal codepipeline
79+
run: |
80+
aws ssm put-parameter --name "powertools-python-release-version" --value $RELEASE_TAG_VERSION --overwrite
81+
aws codepipeline start-pipeline-execution --name ${{ secrets.CODEPIPELINE_NAME }}
82+
env:
83+
# Maintenance: Migrate to new OAuth mechanism
84+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
85+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
86+
AWS_DEFAULT_REGION: eu-west-1
87+
AWS_DEFAULT_OUTPUT: json
88+
- name: Setup doc deploy
89+
run: |
90+
git config --global user.name Docs deploy
91+
git config --global user.email [email protected]
92+
- name: Build docs website and API reference
93+
run: |
94+
make release-docs VERSION=${RELEASE_TAG_VERSION} ALIAS="latest"
95+
poetry run mike set-default --push latest
96+
- name: Release API docs to release version
97+
uses: peaceiris/actions-gh-pages@v3
98+
with:
99+
github_token: ${{ secrets.GITHUB_TOKEN }}
100+
publish_dir: ./api
101+
keep_files: true
102+
destination_dir: ${{ env.RELEASE_TAG_VERSION }}/api
103+
- name: Release API docs to latest
104+
uses: peaceiris/actions-gh-pages@v3
105+
with:
106+
github_token: ${{ secrets.GITHUB_TOKEN }}
107+
publish_dir: ./api
108+
keep_files: true
109+
destination_dir: latest/api
110+
- name: Close issues related to this release
111+
uses: actions/github-script@v6
112+
with:
113+
script: |
114+
const post_release = require('.github/workflows/post_release.js')
115+
await post_release({github, context, core})
117116
118117
sync_master:
119118
needs: release
120119
runs-on: ubuntu-latest
121120
steps:
122-
- uses: actions/checkout@v3
123-
- name: Sync master from detached head
124-
# If version matches CHANGELOG and pyproject.toml
125-
# If it passes all checks, successfully releases to test and prod
126-
# Then sync up master with latest source code release
127-
# where commit message will be Release notes title
128-
run: git push origin HEAD:refs/heads/master --force
121+
- uses: actions/checkout@v3
122+
- name: Sync master from detached head
123+
# If version matches CHANGELOG and pyproject.toml
124+
# If it passes all checks, successfully releases to test and prod
125+
# Then sync up master with latest source code release
126+
# where commit message will be Release notes title
127+
run: git push origin HEAD:refs/heads/master --force

Diff for: .github/workflows/release-drafter.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
# branches to consider in the event; optional, defaults to all
66
branches:
77
- develop
8+
workflow_dispatch:
89

910
jobs:
1011
update_release_draft:

0 commit comments

Comments
 (0)