Skip to content

Commit 3336f81

Browse files
authored
Merge branch 'awslabs:develop' into develop
2 parents 560bfb2 + 0334984 commit 3336f81

File tree

86 files changed

+6447
-2970
lines changed

Some content is hidden

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

86 files changed

+6447
-2970
lines changed

.chglog/CHANGELOG.tpl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{ if .Versions -}}
22
<a name="unreleased"></a>
3-
## [Unreleased]
3+
## Unreleased
44

55
{{ if .Unreleased.CommitGroups -}}
66
{{ range .Unreleased.CommitGroups -}}

.chglog/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ options:
1313
- refactor
1414
- docs
1515
- chore
16+
- revert
1617
commit_groups:
1718
title_maps:
1819
feat: Features
@@ -21,6 +22,7 @@ options:
2122
refactor: Code Refactoring
2223
docs: Documentation
2324
chore: Maintenance
25+
revert: Regression
2426
header:
2527
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
2628
pattern_maps:

.devcontainer/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/python-3/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Python version: 3, 3.9, 3.8, 3.7, 3.6
4+
ARG VARIANT="3.9"
5+
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
6+
ENV POETRY_VIRTUALENVS_IN_PROJECT=true
7+
8+
# [Option] Install Node.js
9+
ARG INSTALL_NODE="true"
10+
ARG NODE_VERSION="lts/*"
11+
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
12+
13+
RUN pip3 install -U pip black poetry pre-commit
14+
15+
# [Optional] Uncomment this section to install additional OS packages.
16+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
17+
&& apt-get -y install --no-install-recommends bash-completion

.devcontainer/devcontainer.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
{
3+
"name": "Python 3",
4+
"build": {
5+
"dockerfile": "Dockerfile",
6+
"context": "..",
7+
"args": {
8+
"VARIANT": "3.9",
9+
"INSTALL_NODE": "true",
10+
"NODE_VERSION": "lts/*"
11+
}
12+
},
13+
"settings": {
14+
"git.enableCommitSigning": true,
15+
"editor.formatOnSave": true,
16+
"python.pythonPath": "/usr/local/bin/python",
17+
"python.languageServer": "Pylance",
18+
"python.linting.enabled": true,
19+
"python.linting.pylintEnabled": true,
20+
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
21+
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
22+
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
23+
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
24+
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
25+
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
26+
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
27+
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
28+
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint",
29+
"python.testing.pytestArgs": [
30+
"tests"
31+
],
32+
"python.testing.unittestEnabled": false,
33+
"python.testing.nosetestsEnabled": false,
34+
"python.testing.pytestEnabled": true,
35+
"python.formatting.provider": "black"
36+
},
37+
"extensions": [
38+
"ms-python.python",
39+
"ms-python.vscode-pylance",
40+
"littlefoxteam.vscode-python-test-adapter",
41+
"ms-azuretools.vscode-docker",
42+
"davidanson.vscode-markdownlint",
43+
"bungcip.better-toml"
44+
],
45+
"postCreateCommand": "make dev",
46+
"remoteUser": "vscode"
47+
}

.github/boring-cyborg.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,30 @@ labelPRBasedOnFilePath:
1818
area/event_handlers:
1919
- aws_lambda_powertools/event_handler/*
2020
- aws_lambda_powertools/event_handler/**/*
21+
area/middleware_factory:
22+
- aws_lambda_powertools/middleware_factory/*
23+
- aws_lambda_powertools/middleware_factory/**/*
24+
area/parameters:
25+
- aws_lambda_powertools/parameters/*
26+
- aws_lambda_powertools/parameters/**/*
27+
area/batch:
28+
- aws_lambda_powertools/batch/*
29+
- aws_lambda_powertools/batch/**/*
30+
area/validator:
31+
- aws_lambda_powertools/validation/*
32+
- aws_lambda_powertools/validation/**/*
33+
area/event_sources:
34+
- aws_lambda_powertools/data_classes/*
35+
- aws_lambda_powertools/data_classes/**/*
36+
area/parser:
37+
- aws_lambda_powertools/parser/*
38+
- aws_lambda_powertools/parser/**/*
39+
area/idempotency:
40+
- aws_lambda_powertools/idempotency/*
41+
- aws_lambda_powertools/idempotency/**/*
42+
area/feature_flags:
43+
- aws_lambda_powertools/feature_flags/*
44+
- aws_lambda_powertools/feature_flags/**/*
2145

2246
documentation:
2347
- docs/*

.github/workflows/publish.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,21 @@ name: Publish to PyPi
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
2525

26+
#
27+
# === Fallback mechanism due to external failures ===
28+
#
29+
# 1. Trigger "Publish to PyPi" workflow manually: https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
30+
# 2. Use the version released under Releases e.g. v1.13.0
31+
#
32+
2633
on:
2734
release:
2835
types: [published]
36+
workflow_dispatch:
37+
inputs:
38+
publish_version:
39+
description: 'Version to publish, e.g. v1.13.0'
40+
required: true
2941

3042
jobs:
3143
release:
@@ -40,11 +52,13 @@ jobs:
4052
python-version: "3.8"
4153
- name: Set release notes tag
4254
run: |
43-
export RELEASE_TAG_VERSION=${{ github.event.release.tag_name }}
55+
RELEASE_TAG_VERSION=${{ github.event.release.tag_name }}
56+
# Replace publishing version if the workflow was triggered manually
57+
test -n $RELEASE_TAG_VERSION && RELEASE_TAG_VERSION=${{ github.event.inputs.publish_version }}
4458
echo "RELEASE_TAG_VERSION=${RELEASE_TAG_VERSION:1}" >> $GITHUB_ENV
4559
- name: Ensure new version is also set in pyproject and CHANGELOG
4660
run: |
47-
grep --regexp "\[${RELEASE_TAG_VERSION}\]" CHANGELOG.md
61+
grep --regexp "${RELEASE_TAG_VERSION}" CHANGELOG.md
4862
grep --regexp "version \= \"${RELEASE_TAG_VERSION}\"" pyproject.toml
4963
- name: Install dependencies
5064
run: make dev

.github/workflows/python_build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
max-parallel: 4
1818
matrix:
19-
python-version: [3.6, 3.7, 3.8]
19+
python-version: [3.6, 3.7, 3.8, 3.9]
2020
env:
2121
OS: ${{ matrix.os }}
2222
PYTHON: ${{ matrix.python-version }}
@@ -37,7 +37,7 @@ jobs:
3737
- name: Complexity baseline
3838
run: make complexity-baseline
3939
- name: Upload coverage to Codecov
40-
uses: codecov/codecov-action@v2.0.2
40+
uses: codecov/codecov-action@v2.1.0
4141
with:
4242
file: ./coverage.xml
4343
# flags: unittests

.pylintrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[MESSAGES CONTROL]
2+
disable=
3+
too-many-arguments,
4+
too-many-instance-attributes,
5+
too-few-public-methods,
6+
anomalous-backslash-in-string,
7+
missing-class-docstring,
8+
missing-module-docstring,
9+
missing-function-docstring,
10+
11+
[FORMAT]
12+
max-line-length=120

0 commit comments

Comments
 (0)