-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
215 lines (186 loc) · 4.7 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
[build-system]
requires = ["pdm-backend", ]
build-backend = "pdm.backend"
[project]
name = "accustom"
description = "Accustom is a library for responding to Custom Resources in AWS CloudFormation using the decorator pattern."
authors = [
{ name = "Taylor Bertie", email = "bertiet@amazon.com" },
]
dependencies = [
"boto3~=1.26",
"botocore~=1.29",
"requests~=2.28",
"typing-extensions~=4.5",
]
requires-python = ">=3.9"
readme = "README.md"
keywords = [
"cloudformation",
"lambda",
"custom",
"resource",
"decorator",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Topic :: Software Development :: Libraries :: Application Frameworks",
]
dynamic = ["version"]
[tool.commitizen]
name = "cz_conventional_commits"
version = "1.4.0"
tag_format = "$version"
[project.license]
text = "Apache-2.0"
[project.urls]
Homepage = "https://github.com/awslabs/cloudformation-accustom"
[tool.pdm.build]
includes = ["src"]
package-dir = "src"
[tool.pdm.version]
source = "scm"
[tool.pdm.dev-dependencies]
test = [
"pytest~=7.3",
"awscli~=1.27",
]
lint = [
"black~=23.3",
"Flake8-pyproject~=1.2",
"flake8~=6.0",
"isort~=5.12",
"pre-commit~=3.2",
"mypy~=1.2",
"boto3-stubs[cloudformation]~=1.28",
"aws-lambda-typing~=2.17",
"types-requests~=2.28",
"pyyaml~=5.4",
]
[tool.pdm.scripts.flake8]
cmd = "flake8"
help = "Run the flake8 the code"
site_packages = true
[tool.pdm.scripts.isort]
cmd = "isort ."
help = "Run isort against the code"
site_packages = true
[tool.pdm.scripts.black]
cmd = "black ."
help = "Run black against the code"
site_packages = true
[tool.pdm.scripts.mypy]
cmd = "mypy ."
help = "Run mypy against the code"
site_packages = true
[tool.pdm.scripts._require_base]
cmd = "pdm export --format requirements --without-hashes"
help = "Base command for outputting requirements"
[tool.pdm.scripts.require]
composite = [
"_require_base --output requirements.txt --prod",
"_require_base --output requirements_test.txt --dev --group build",
"_require_base --output requirements_lint.txt --dev --group lint"
]
help = "Generates requirements.txt and requirements_lint.txt for reference/manual install"
[tool.pdm.scripts.int_make]
cmd = "make --directory tests/int"
help = "Executes an arbitary make command againsts the integration tests"
[tool.pdm.scripts.lint]
cmd = "pre-commit run --all-files"
help = "Check code style against linters using pre-commit"
site_packages = true
[tool.pdm.scripts.post_lock]
composite = [
"require",
]
help = "post_lock Hook: Generate requirements.txt and requirement_build.txt for reference/manual install"
[tool.pdm.scripts.int_test]
cmd = "pytest"
help = "Run all tests including intergration tests"
site_packages = true
[tool.pdm.scripts.pre_int_test]
composite = [
"require",
"pdm install --dev --group test",
"int_make unexecute",
"int_make execute",
]
help = "pre_test hook: Installs the packages and prepares enviroments needed to perform integration testing"
[tool.pdm.scripts.post_int_test]
composite = [
"int_make clean",
]
help = "post_test hook: Cleans up enviroments needed to perform integration testing"
[tool.pdm.scripts.test]
cmd = "pytest --ignore='tests/int'"
help = "Run only unit testing"
site_packages = true
[tool.pdm.scripts.pre_test]
composite = [
"require",
"pdm install --dev --group test",
]
help = "pre_test hook: Installs the packages needed to perform unit testing"
[tool.pdm.scripts.pre_lint]
composite = [
"pdm install --dev --group lint",
]
help = "pre_lint hook: Installs the paackages needed to perform linting"
[tool.pdm.scripts.pre_publish]
composite = [
"lint",
"test",
]
help = "pre_publish hook: Ensure that linting and testing is performed before publishing"
[tool.pdm.scripts.format]
composite = [
"isort",
"black",
]
help = "Format the code using Black and iSort"
[tool.pytest.ini_options]
addopts = "--ignore=__pypackages__"
[tool.flake8]
ignore = [
"E123",
"E203",
"W503",
]
exclude = [
"__pypackages__",
".venv",
]
max_line_length = 120
per-file-ignores = [
"__init__.py:F401, F403",
]
[tool.isort]
profile = "black"
line_length = 120
multi_line_output = 3
include_trailing_comma = true
src_paths = [
"src",
"test",
]
[tool.black]
line-length = 120
[tool.mypy]
python_version = "3.9"
platform = "manylinux2014_x86_64"
explicit_package_bases = true
check_untyped_defs = true
warn_unused_configs = true
show_error_codes = true
color_output = true
pretty = true
mypy_path = "src"
exclude = [
"^__pypackages__/",
"^.venv/",
]