forked from aws-powertools/powertools-lambda-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
218 lines (197 loc) · 6.31 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
[tool.poetry]
name = "aws_lambda_powertools"
version = "2.37.0"
description = "Powertools for AWS Lambda (Python) is a developer toolkit to implement Serverless best practices and increase developer velocity."
authors = ["Amazon Web Services"]
include = ["aws_lambda_powertools/py.typed", "THIRD-PARTY-LICENSES"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT No Attribution License (MIT-0)",
"Natural Language :: English",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
repository = "https://github.com/aws-powertools/powertools-lambda-python"
documentation = "https://docs.powertools.aws.dev/lambda/python/"
readme = "README.md"
keywords = [
"aws_lambda_powertools",
"aws",
"tracing",
"logging",
"lambda",
"powertools",
"feature_flags",
"idempotency",
"middleware",
]
# MIT-0 is not recognized as an existing license from poetry.
# By using `MIT` as a license value, a `License :: OSI Approved :: MIT License` classifier is added to the classifiers list.
license = "MIT"
[tool.poetry.urls]
"Issue tracker" = "https://github.com/aws-powertools/powertools-lambda-python/issues"
"Releases" = "https://github.com/aws-powertools/powertools-lambda-python/releases"
[tool.poetry.dependencies]
python = ">=3.8,<4.0.0"
aws-xray-sdk = { version = "^2.8.0", optional = true }
fastjsonschema = { version = "^2.14.5", optional = true }
pydantic = { version = "^1.8.2", optional = true }
boto3 = { version = "^1.26.164", optional = true }
redis = { version = ">=4.4,<6.0", optional = true }
typing-extensions = "^4.11.0"
datadog-lambda = { version = ">=4.77,<6.0", optional = true }
aws-encryption-sdk = { version = "^3.1.1", optional = true }
jsonpath-ng = { version = "^1.6.0", optional = true }
[tool.poetry.dev-dependencies]
coverage = { extras = ["toml"], version = "^7.5" }
pytest = "^8.2.0"
black = "^24.4"
boto3 = "^1.26.164"
isort = "^5.13.2"
pytest-cov = "^5.0.0"
pytest-mock = "^3.14.0"
pdoc3 = "^0.10.0"
pytest-asyncio = "^0.23.6"
bandit = "^1.7.8"
radon = "^6.0.1"
xenon = "^0.9.1"
mkdocs-git-revision-date-plugin = "^0.3.2"
mike = "^2.1.1"
pytest-xdist = "^3.6.1"
aws-cdk-lib = "^2.141.0"
"aws-cdk.aws-apigatewayv2-alpha" = "^2.38.1-alpha.0"
"aws-cdk.aws-apigatewayv2-integrations-alpha" = "^2.38.1-alpha.0"
"aws-cdk.aws-apigatewayv2-authorizers-alpha" = "^2.38.1-alpha.0"
"aws-cdk.aws-lambda-python-alpha" = "^2.141.0a0"
"cdklabs.generative-ai-cdk-constructs" = "^0.1.144"
pytest-benchmark = "^4.0.0"
mypy-boto3-appconfig = "^1.34.58"
mypy-boto3-cloudformation = "^1.34.84"
mypy-boto3-cloudwatch = "^1.34.83"
mypy-boto3-dynamodb = "^1.34.97"
mypy-boto3-lambda = "^1.34.77"
mypy-boto3-logs = "^1.34.66"
mypy-boto3-secretsmanager = "^1.34.72"
mypy-boto3-ssm = "^1.34.91"
mypy-boto3-s3 = "^1.34.91"
mypy-boto3-xray = "^1.34.0"
types-requests = "^2.31.0"
typing-extensions = "^4.6.2"
mkdocs-material = "^9.5.21"
filelock = "^3.14.0"
checksumdir = "^1.2.0"
mypy-boto3-appconfigdata = "^1.34.24"
ijson = "^3.2.2"
typed-ast = { version = "^1.5.5", python = "< 3.8" }
hvac = "^2.2.0"
aws-requests-auth = "^0.4.3"
datadog-lambda = "^5.94.0"
[tool.poetry.extras]
parser = ["pydantic"]
validation = ["fastjsonschema"]
tracer = ["aws-xray-sdk"]
redis = ["redis"]
all = [
"pydantic",
"aws-xray-sdk",
"fastjsonschema",
]
# allow customers to run code locally without emulators (SAM CLI, etc.)
aws-sdk = ["boto3"]
datadog = ["datadog-lambda"]
datamasking = ["aws-encryption-sdk", "jsonpath-ng"]
[tool.poetry.group.dev.dependencies]
cfn-lint = "0.87.2"
mypy = "^1.1.1"
types-python-dateutil = "^2.8.19.6"
httpx = ">=0.23.3,<0.28.0"
sentry-sdk = ">=1.22.2,<3.0.0"
ruff = ">=0.0.272,<0.4.5"
retry2 = "^0.9.5"
pytest-socket = ">=0.6,<0.8"
types-redis = "^4.6.0.7"
testcontainers = { extras = ["redis"], version = "^3.7.1" }
multiprocess = "^0.70.16"
[tool.coverage.run]
source = ["aws_lambda_powertools"]
omit = [
"tests/*",
"aws_lambda_powertools/exceptions/*",
"aws_lambda_powertools/utilities/parser/types.py",
"aws_lambda_powertools/utilities/jmespath_utils/envelopes.py",
"aws_lambda_powertools/metrics/metric.py" # barrel import (export-only)
]
branch = true
[tool.coverage.html]
directory = "test_report"
title = "Powertools for AWS Lambda (Python) Test Coverage"
[tool.coverage.report]
fail_under = 90
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain about missing debug-only code:
"def __repr__",
"if self.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
# Ignore runtime type checking
"if TYPE_CHECKING:",
# Ignore type function overload
"@overload",
]
[tool.isort]
profile = "black" # resolves conflict with black
skip = "example"
[tool.black]
line-length = 120
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| aws_lambda_powertools/event_handler/openapi/compat.py
)/
| example
)
'''
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -vv"
testpaths = "./tests"
markers = [
"perf: marks perf tests to be deselected (deselect with '-m \"not perf\"')",
]
# MAINTENANCE: Remove these lines when drop support to Pydantic v1
filterwarnings = [
"ignore:.*The `parse_obj` method is deprecated*:DeprecationWarning",
"ignore:.*The `parse_raw` method is deprecated*:DeprecationWarning",
"ignore:.*load_str_bytes is deprecated*:DeprecationWarning",
"ignore:.*The `dict` method is deprecated; use `model_dump` instead*:DeprecationWarning",
"ignore:.*Pydantic V1 style `@validator` validators are deprecated*:DeprecationWarning",
]
[build-system]
requires = ["poetry-core>=1.3.2"]
build-backend = "poetry.core.masonry.api"
# poetry-core (PR #318) stopped generating setup.py by default, this enables it again.
[tool.poetry.build]
generate-setup-file = true
[tool.poetry_bumpversion.file."aws_lambda_powertools/shared/version.py"]
search = 'VERSION = "{current_version}"'
replace = 'VERSION = "{new_version}"'