forked from localstack/localstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
234 lines (217 loc) · 7.93 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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# LocalStack project configuration
[build-system]
requires = ['setuptools', 'wheel', 'plux>=1.7']
build-backend = "setuptools.build_meta"
[project]
name = "localstack-core"
authors = [
{ name = "LocalStack Contributors", email = "[email protected]" }
]
description = "The core library and runtime of LocalStack"
requires-python = ">=3.8"
dependencies = [
"build",
"click>=7.1",
"cachetools>=5.0",
"cryptography",
"dill==0.3.6",
"dnslib>=0.9.10",
"dnspython>=1.16.0",
"plux>=1.7",
"psutil>=5.4.8",
"python-dotenv>=0.19.1",
"pyyaml>=5.1",
"rich>=12.3.0",
"requests>=2.20.0",
"semver>=2.10",
"stevedore>=3.4.0",
"tailer>=0.4.1",
]
dynamic = ["version"]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: Apache Software License",
"Topic :: Internet",
"Topic :: Software Development :: Testing",
"Topic :: System :: Emulators",
]
[project.urls]
Homepage = "https://localstack.cloud"
Documentation = "https://docs.localstack.cloud"
Repository = "https://github.com/localstack/localstack.git"
Issues = "https://github.com/localstack/localstack/issues"
[project.optional-dependencies]
# minimal required to actually run localstack on the host for services natively implemented in python
base-runtime = [
# pinned / updated by ASF update action
"boto3==1.34.84",
# pinned / updated by ASF update action
"botocore==1.34.84",
"awscrt>=0.13.14",
"cbor2>=5.2.0",
"dnspython>=1.16.0",
# TODO tag incompatibility introduced in 7.0.0 with https://github.com/docker/docker-py/pull/3191
"docker>=6.1.1,<7.0.0",
"jsonpatch>=1.24",
"hypercorn>=0.14.4",
"localstack-twisted>=23.0",
"pyopenssl>=23.0.0",
"readerwriterlock>=1.0.7",
"requests-aws4auth>=1.0",
# explicitly set urllib3 to force its usage / ensure compatibility
"urllib3>=2.0.7",
"Werkzeug>=3.0.0",
"xmltodict>=0.13.0",
"rolo>=0.4",
# TODO: remove those 2 dependencies
"flask>=3.0.0",
"Quart>=0.19.2",
]
# required to actually run localstack on the host
runtime = [
"localstack-core[base-runtime]",
# pinned / updated by ASF update action
"awscli==1.32.84",
"airspeed-ext>=0.6.3",
"amazon_kclpy>=2.0.6,!=2.1.0",
# antlr4-python3-runtime: exact pin because antlr4 runtime is tightly coupled to the generated parser code
"antlr4-python3-runtime==4.13.1",
"apispec>=5.1.1",
"aws-sam-translator>=1.15.1",
"crontab>=0.22.6",
"cryptography>=41.0.5",
"json5>=0.9.11",
"jsonpath-ng>=1.6.1",
"jsonpath-rw>=1.4.0",
"moto-ext[all]==5.0.4.post1",
"opensearch-py>=2.4.1",
"pymongo>=4.2.0",
"pyopenssl>=23.0.0",
]
# for running tests and coverage analysis
test = [
# runtime dependencies are required for running the tests
"localstack-core[runtime]",
"coverage[toml]>=5.5",
"deepdiff>=6.4.1",
"httpx[http2]>=0.25",
"pluggy>=1.3.0",
"pytest>=7.4.2",
"pytest-split>=0.8.0",
"pytest-httpserver>=1.0.1",
"pytest-rerunfailures>=12.0",
"pytest-tinybird>=0.2.0",
"aws-cdk-lib>=2.88.0",
"websocket-client>=1.7.0",
"localstack-snapshot>=0.1.1",
]
# for developing localstack
dev = [
# test dependencies are required for developing localstack
"localstack-core[test]",
"coveralls>=3.3.1",
"Cython",
"networkx>=2.8.4",
"pandoc",
"pre-commit>=3.5.0",
"pypandoc",
"ruff>=0.3.3",
"rstr>=3.2.0",
]
# not strictly necessary for development, but provides type hint support for a better developer experience
typehint = [
# typehint is an optional extension of the dev dependencies
"localstack-core[dev]",
# pinned / updated by ASF update action
"boto3-stubs[acm,acm-pca,amplify,apigateway,apigatewayv2,appconfig,appconfigdata,application-autoscaling,appsync,athena,autoscaling,backup,batch,ce,cloudcontrol,cloudformation,cloudfront,cloudtrail,cloudwatch,codecommit,cognito-identity,cognito-idp,dms,docdb,dynamodb,dynamodbstreams,ec2,ecr,ecs,efs,eks,elasticache,elasticbeanstalk,elbv2,emr,emr-serverless,es,events,firehose,fis,glacier,glue,iam,identitystore,iot,iot-data,iotanalytics,iotwireless,kafka,kinesis,kinesisanalytics,kinesisanalyticsv2,kms,lakeformation,lambda,logs,managedblockchain,mediaconvert,mediastore,mq,mwaa,neptune,opensearch,organizations,pi,pipes,qldb,qldb-session,rds,rds-data,redshift,redshift-data,resource-groups,resourcegroupstaggingapi,route53,route53resolver,s3,s3control,sagemaker,sagemaker-runtime,secretsmanager,serverlessrepo,servicediscovery,ses,sesv2,sns,sqs,ssm,sso-admin,stepfunctions,sts,timestream-query,timestream-write,transcribe,wafv2,xray]==1.34.84",
]
[tool.setuptools]
include-package-data = false
# TODO using this is discouraged by setuptools, `project.scripts` should be used instead
# However, `project.scripts` does not support non-python scripts.
script-files = [
"bin/localstack",
"bin/localstack.bat",
"bin/localstack-supervisor",
]
[tool.setuptools.dynamic]
readme = { file = ["README.md"], content-type = "text/markdown"}
version = { file = "VERSION" }
[tool.setuptools.packages.find]
include = ["localstack*"]
exclude = ["tests*"]
[tool.setuptools.package-data]
"*" = [
"*.md",
"Makefile",
"VERSION"
]
"localstack" = [
"aws/**/*.json",
"services/**/*.html",
"services/**/resource_providers/*.schema.json",
"utils/kinesis/java/cloud/localstack/*.*",
]
[tool.ruff]
# Always generate Python 3.8-compatible code.
target-version = "py38"
line-length = 100
exclude = [
".venv*",
"venv*",
"dist",
"build",
"target",
"*.egg-info",
".filesystem",
".git",
"localstack/services/stepfunctions/asl/antlr/runtime"
]
[tool.ruff.lint]
ignore = [
"B007", # TODO Loop control variable x not used within loop body
"B017", # TODO `pytest.raises(Exception)` should be considered evil
"B019", # TODO Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks
"B022", # TODO No arguments passed to `contextlib.suppress`. No exceptions will be suppressed and therefore this context manager is redundant
"B023", # TODO Function definition does not bind loop variable `server`
"B024", # TODO x is an abstract base class, but it has no abstract methods
"B027", # TODO `Server.do_shutdown` is an empty method in an abstract base class, but has no abstract decorator
"B904", # TODO Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
"C408", # TODO Unnecessary `list` call (rewrite as a literal)
"C416", # TODO Unnecessary `set` comprehension
"C901", # TODO function is too complex
"E402", # TODO Module level import not at top of file
"E501", # E501 Line too long - handled by black, see https://docs.astral.sh/ruff/faq/#is-ruff-compatible-with-black
"E721", # TODO Do not compare types, use `isinstance()`
"T201", # TODO `print` found
"T203", # TODO `pprint` found
]
select = ["B", "C", "E", "F", "I", "W", "T", "B9"]
[tool.coverage.run]
relative_files = true
source = [
"localstack/"
]
omit = [
"localstack/aws/api/*",
"localstack/extensions/api/*",
"localstack/services/stepfunctions/asl/antlr/runtime/*"
]
dynamic_context = "test_function"
[tool.coverage.report]
exclude_lines = [
"if __name__ == .__main__.:",
"raise NotImplemented.",
"return NotImplemented",
"def __repr__",
]
[tool.pytest.ini_options]
log_cli = true
log_level = "DEBUG"
log_cli_format = "%(asctime)s.%(msecs)03d %(levelname)5s --- [%(threadName)12s] %(name)-26s : %(message)s"
log_cli_date_format = "%Y-%m-%dT%H:%M:%S"
[tool.pip-tools]
# adding localstack-core itself here because it is referenced in the pyproject.toml for stacking the extras
# pip, setuptools, and distribute are pip-tools defaults which need to be set again here
unsafe-package = ["localstack-core", "pip", "setuptools", "distribute"] # packages that should not be pinned