-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
250 lines (209 loc) · 7.37 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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# -----------------------------------------------------------------------------
## Build System Configurations
# https://setuptools.pypa.io/en/latest/setuptools.html#building-and-distributing-packages-with-setuptools
# -----------------------------------------------------------------------------
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "aibs-informatics-aws-lambda"
authors = [{ name = "AIBS Informatics Group", email = "[email protected]"}]
maintainers = [{ name = "AIBS Informatics Group", email = "[email protected]"}]
description = "Utility library for building validated and typed AWS Lambda functions"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.9"
dynamic = [
"version",
]
dependencies = [
"aibs-informatics-aws-utils~=0.0.4",
"aibs-informatics-core~=0.0.8",
"aws-lambda-powertools ~= 2.35",
"pydantic >= 2.0.3, < 3",
"aws-lambda-typing",
]
[project.optional-dependencies]
dev = [
"aibs-informatics-test-resources[all]~=0.0.4",
"boto3-stubs[athena,batch,ecs,essential,sns,stepfunctions]",
"moto[lambda,stepfunctions,sts] ~= 4.0",
]
docker = [
"awslambdaric",
]
release = [
"build",
"bump-my-version",
"wheel",
]
[project.scripts]
handle-lambda-request = "aibs_informatics_aws_lambda.main:handle_cli"
[tool.setuptools.dynamic]
version = {attr = "aibs_informatics_aws_lambda._version.__version__"}
[tool.setuptools.package-data]
"*" = ['py.typed']
[tool.setuptools.packages.find]
where = ["src"]
[project.urls]
Documentation = "https://.github.io/aibs-informatics-aws-lambda/"
Homepage = "https://github.com/AllenInstitute/aibs-informatics-aws-lambda/"
Issues = "https://github.com/AllenInstitute/aibs-informatics-aws-lambda/issues"
Repository = "https://github.com/AllenInstitute/aibs-informatics-aws-lambda/"
# -----------------------------------------------------------------------------
## Pyright Configurations
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md
# -----------------------------------------------------------------------------
[tool.pyright]
reportGeneralTypeIssues = false
typeCheckingMode = "basic"
# -----------------------------------------------------------------------------
## Coverage Configurations
# https://coverage.readthedocs.io/en/7.0.4/config.html#
# -----------------------------------------------------------------------------
[tool.coverage]
# Note: we use pytest-cov to generate coverage reports
# when running tests. but these coverage configs
# are read when doing so.
[tool.coverage.run]
branch = true
command_line = "coverage -m pytest"
data_file = "build/.coverage"
source = [
"src/"
]
[tool.coverage.report]
omit = [
"test/*"
]
exclude_lines = [
'pragma: no cover',
'raise NotImplementedError',
'if TYPE_CHECKING:',
'if typing.TYPE_CHECKING:',
'@overload',
'@typing.overload',
'\(Protocol\):$',
'typing.assert_never',
'assert_never',
]
skip_empty = true
[tool.coverage.html]
directory = "build/documentation/coverage"
[tool.coverage.xml]
output = "build/documentation/coverage.xml"
# -----------------------------------------------------------------------------
## pytest Configurations
# https://docs.pytest.org/en/7.2.x/reference/customize.html
# -----------------------------------------------------------------------------
[tool.pytest.ini_options]
minversion = "6.0"
addopts = [
"-ra",
"--verbose",
"--ignore=build/private",
# Coverage options should be managed in the .coveragerc file.
# The below configurations simply enable coverage and reporting.
"--cov",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
"--cov-fail-under=0",
"--color=yes",
]
testpaths = [
"test",
]
cache_dir = "build/.pytest_cache"
# -----------------------------------------------------------------------------
## MyPy Configurations
# https://mypy.readthedocs.io/en/stable/config_file.html#example-pyproject-toml
# -----------------------------------------------------------------------------
[tool.mypy]
exclude = '''(?x)(
assets/
| build/
| build_tools
| setup.py$
| test/
)'''
cache_dir = "build/.mypy_cache"
# Using no incremental to avoid known issue with mypy and some packages:
# https://github.com/python/mypy/issues/9852
incremental = true
# Import Discovery
# https://mypy.readthedocs.io/en/stable/config_file.html#import-discovery
ignore_missing_imports = true
follow_imports = "silent"
no_site_packages = true
# Untyped definitions and calls
# https://mypy.readthedocs.io/en/stable/config_file.html#untyped-definitions-and-calls
# TODO: enable and fix errors
check_untyped_defs = false
# Miscellaneous strictness flags
# https://mypy.readthedocs.io/en/latest/config_file.html#miscellaneous-strictness-flags
allow_redefinition = true
# Configuring Error Messages
# https://mypy.readthedocs.io/en/stable/config_file.html#configuring-error-messages
show_error_codes = true
color_output = true
pretty = true
show_absolute_path = false
# Reporting Generation
# https://mypy.readthedocs.io/en/stable/config_file.html#report-generation
# [DEBUG] UNCOMMENT FOR DEBUG PURPOSES ONLY! Type coverage impacts test
# html_report = build/documentation/mypy/
# xml_report = build/documentation/mypy/
# cobertura_xml_report = build/documentation/mypy/
# None and Optional handling
# https://mypy.readthedocs.io/en/latest/config_file.html#none-and-optional-handling
strict_optional = false
# Miscellaneous
# https://mypy.readthedocs.io/en/latest/config_file.html#miscellaneous
# [DEBUG] If you need to better understand type error, increase verbosity
verbosity = 0
[[tool.mypy.overrides]]
module = [
"src.*",
"test.*"
]
ignore_errors = false
# -----------------------------------------------------------------------------
## Black Configurations
# https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#what-on-earth-is-a-pyproject-toml-file
# -----------------------------------------------------------------------------
[tool.black]
line-length = 99
include = '\.pyi?$'
# -----------------------------------------------------------------------------
## isort Configurations
# https://pycqa.github.io/isort/docs/configuration/config_files.html
# -----------------------------------------------------------------------------
[tool.isort]
# required for compatibility with black:
line_length = 99
profile = "black"
src_paths = ["src", "test"]
# -----------------------------------------------------------------------------
## bumpversion Configurations
# https://callowayproject.github.io/bump-my-version/
# -----------------------------------------------------------------------------
[tool.bumpversion]
allow_dirty = false
commit = true
commit_args = ""
current_version = "0.0.7"
ignore_missing_version = false
message = "Bump version: {current_version} → {new_version}"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
regex = false
replace = "{new_version}"
search = "{current_version}"
serialize = ["{major}.{minor}.{patch}"]
sign_tags = false
tag = true
tag_message = "Bump version: {current_version} → {new_version}"
tag_name = "v{new_version}"
[[tool.bumpversion.files]]
filename = "src/aibs_informatics_aws_lambda/_version.py"
search = "__version__ = \"{current_version}\""
replace = "__version__ = \"{new_version}\""