-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
172 lines (138 loc) · 3.98 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "smyth"
dynamic = ["version"]
description = "Smyth is a versatile tool designed to enhance your AWS Lambda development experience. It is a pure Python tool that allows for easy customization and state persistence, making your Lambda development more efficient and developer-friendly."
readme = "README.md"
requires-python = ">=3.10"
license = { file = "LICENSE.txt" }
keywords = []
authors = [{ name = "Mirumee", email = "hello@mirumee.com" }]
classifiers = [
"Environment :: Console",
"Intended Audience :: Developers",
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
"Topic :: Software Development",
]
dependencies = [
"starlette",
"uvicorn",
"aws-lambda-powertools",
"toml",
"pydantic",
"rich",
"click",
"asgiref",
"typer",
"setproctitle",
]
[project.urls]
Documentation = "https://mirumee.github.io/smyth/"
Issues = "https://github.com/mirumee/smyth/issues"
Source = "https://github.com/mirumee/smyth"
[project.optional-dependencies]
dev = ["ipdb"]
types = ["mypy>=1.0.0", "pytest", "types-toml", "pytest-asyncio"]
docs = ["mkdocs-material", "termynal"]
[tool.hatch.version]
path = "src/smyth/__about__.py"
[tool.hatch.build.targets.wheel]
packages = ["src/smyth"]
# Environment configuration
## Default environment
[tool.hatch.envs.default]
features = ["dev", "types", "docs"]
[tool.hatch.envs.default.scripts]
check = [
"hatch fmt",
"hatch test -a",
"hatch test --cover",
"hatch run types:check",
]
## Types environment
[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args:src/smyth}"
[tool.mypy]
check_untyped_defs = true
[[tool.mypy.overrides]]
module = "setproctitle.*"
ignore_missing_imports = true
## Test environment
[tool.hatch.envs.hatch-test]
dependencies = [
"asynctest",
"ipdb",
"anyio",
"pytest-mock",
"pytest-memray",
"pytest-print",
"pytest-cov",
"coverage[toml]",
"httpx",
# uvloop 0.20.0 is broken on Python 3.13
# https://github.com/MagicStack/uvloop/issues/622
# waiting for 0.21.0 release
"uvloop==0.21.0b1",
]
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.10", "3.11", "3.12", "3.13"]
## Docs environment
[tool.hatch.envs.docs.scripts]
build = "mkdocs build --clean --strict"
serve = "mkdocs serve --dev-addr localhost:8000"
deploy = "mkdocs gh-deploy --force"
# Tool configuration
## Pytest configuration
[tool.pytest.ini_options]
## Coverage configuration
[tool.coverage.run]
source_pkgs = ["smyth"]
branch = true
parallel = true
[tool.coverage.paths]
smyth = ["src/smyth"]
[tool.coverage.report]
exclude_also = [
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
omit = ["*/__about__.py", "*/__main__.py", "*/cli/__init__.py"]
fail_under = 80
## Ruff configuration
[tool.ruff]
line-length = 88
target-version = "py310"
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 80
[tool.ruff.lint]
select = ["E", "F", "G", "I", "N", "Q", "UP", "C90", "T20", "TID"]
unfixable = ["UP007"] # typer does not handle PEP604 annotations
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.isort]
known-first-party = ["smyth"]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false