-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
229 lines (204 loc) · 5.4 KB
/
pyproject.toml
File metadata and controls
229 lines (204 loc) · 5.4 KB
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
[project]
name = "lex-helper"
dynamic = ["version"]
description = "A helper library for building Amazon Lex chatbots"
authors = [
{name = "Amazon Web Services"}
]
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"pydantic>2.0.0,<3.0.0",
"PyYAML>=6.0,<7.0",
"boto3>=1.26.0",
"botocore>=1.29.0"
]
license = {text = "Apache-2.0"}
keywords = [
"amazon-lex",
"chatbot",
"aws",
"conversational-ai",
"nlp",
"voice-assistant",
"lambda",
"serverless"
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Communications :: Chat",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
[project.urls]
Homepage = "https://github.com/aws/lex-helper"
Documentation = "https://github.com/aws/lex-helper#readme"
Issues = "https://github.com/aws/lex-helper/issues"
Repository = "https://github.com/aws/lex-helper"
Changelog = "https://github.com/aws/lex-helper/blob/main/CHANGELOG.md"
"Bug Reports" = "https://github.com/aws/lex-helper/issues"
"Source Code" = "https://github.com/aws/lex-helper"
[project.optional-dependencies]
bedrock = [
"aws-lambda-powertools>=3.19.0",
]
dev = [
"pytest>=7.0.0",
"ruff>=0.12.11",
"pytest-cov>=6.2.1",
"pre-commit>=3.0.0",
"fuzzywuzzy>=0.18.0",
"aws-lambda-powertools>=3.19.0",
"python-levenshtein>=0.27.1",
"packaging>=21.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "lex_helper/__init__.py"
[tool.hatch.build.targets.wheel]
exclude = [
"mkdocs.yml",
"tests/",
"examples/",
"docs/",
"tools/",
".github/",
".gitignore",
".pre-commit-config.yaml",
".prettierrc.yaml",
"uv.lock",
"CONTRIBUTING.md",
"SECURITY.md",
"CODE_OF_CONDUCT.md",
"SUPPORT.md",
]
[tool.hatch.build.targets.sdist]
exclude = [
"Makefile",
"scripts/",
"tests/",
"examples/",
"docs/",
".github/",
".gitignore",
".pre-commit-config.yaml",
".prettierrc.yaml",
"uv.lock",
"CONTRIBUTING.md",
"SECURITY.md",
"CODE_OF_CONDUCT.md",
"SUPPORT.md",
]
[tool.ruff]
target-version = "py312"
line-length = 125
[tool.ruff.lint]
# Select rule categories - mapping from flake8 configuration
select = [
"E", # pycodestyle errors
"F", # pyflakes
"W", # pycodestyle warnings
"I", # isort
"N", # pep8-naming
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"C90" # mccabe complexity
]
# Ignore rules - mapping from flake8 ignore list
ignore = [
"E203", # whitespace before ':'
"E266", # too many leading '#' for block comment
"E501", # line too long (handled by formatter)
"E701", # multiple statements on one line (colon)
"B905", # zip() without an explicit strict= parameter
"E722", # do not use bare 'except'
"E402", # module level import not at top of file
"E731", # do not assign a lambda expression, use a def
"F811", # redefinition of unused name
"N815", # mixed-case variable in class scope (intentional for Lex API compatibility)
"W293", # blank line contains whitespace (in examples)
"C901", # complex structure (acceptable in examples)
]
[tool.ruff.lint.mccabe]
# Set max complexity to match flake8 configuration
max-complexity = 18
[tool.ruff.format]
# Use double quotes for strings
quote-style = "double"
# Use spaces around operators
indent-style = "space"
# Respect magic trailing commas
skip-magic-trailing-comma = false
# Automatically detect line ending
line-ending = "auto"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
norecursedirs = [
"examples/sample_airline_bot/cdk.out",
"examples/sample_airline_bot/node_modules",
"examples/sample_airline_bot/lambdas/fulfillment_function/tests",
"node_modules",
".git",
".venv",
"venv",
"build",
"dist",
"*.egg-info"
]
addopts = [
"--tb=short",
"--strict-markers",
"--disable-warnings"
]
[tool.pyright]
include = [
"./lex_helper",
]
defineConstant = { DEBUG = true }
typeCheckingMode = "strict"
reportMissingImports = true
reportMissingTypeStubs = false
reportUnknownParameterType = true
reportUnknownArgumentType = false
reportUnknownMemberType = false
reportUnusedImport = false
reportUnusedClass = true
reportUnusedFunction = true
reportUnusedVariable = true
reportConstantRedefinition = true
reportDeprecated = true
reportUnnecessaryContains = true
reportUnnecessaryComparison = true
reportMatchNotExhaustive = true
reportCallInDefaultInitializer = true
[dependency-groups]
dev = [
"mkdocs-material>=9.6.20",
]
docs = [
"mkdocs>=1.6.0",
"mkdocs-material>=9.6.20",
"mkdocstrings[python]>=0.26.0",
"mkdocs-gen-files>=0.5.0",
"mkdocs-literate-nav>=0.6.0",
"mkdocs-section-index>=0.3.0",
"griffe>=1.0.0",
# Quality assurance dependencies
"beautifulsoup4>=4.12.0",
"requests>=2.31.0",
"pyenchant>=3.2.0",
]