-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
221 lines (201 loc) · 7.88 KB
/
pyproject.toml
File metadata and controls
221 lines (201 loc) · 7.88 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
[project]
name = "kpops"
version = "10.8.0"
description = "KPOps is a tool to deploy Kafka pipelines to Kubernetes"
authors = [
{ name = "bakdata", email = "opensource@bakdata.com" },
]
readme = "README.md"
keywords = ["kafka", "kubernetes", "stream-processing", "pipelines"]
classifiers = [
"Environment :: Console",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development",
"Intended Audience :: Developers",
"Typing :: Typed",
"License :: OSI Approved :: MIT License",
]
requires-python = ">=3.11"
dependencies = [
"anyio>=4.3.0",
"cachetools>=5.2.0",
"croniter>=3.0.3",
"dictdiffer>=0.9.0",
"httpx>=0.24.1",
"lightkube>=0.15.3",
"networkx>=3.1",
"pydantic>=2.10.6",
"pydantic-settings>=2.0.3",
"pyhumps>=3.7.3",
"python-schema-registry-client>=2.4.1",
"pyyaml>=6.0",
"rich>=12.4.4",
"typer>=0.12.5",
]
[project.scripts]
kpops = "kpops.cli.main:app"
[dependency-groups]
dev = [
"lefthook>=1.10.4",
"polyfactory>=2.13.0",
"basedpyright>=1.31.5",
"pytablewriter[from]>=1.0.0",
"pytest>=8.3.2",
"pytest-asyncio>=0.23.8",
"pytest-httpx>=0.30.0",
"pytest-mock>=3.14.0",
"pytest-rerunfailures>=14.0",
"pytest-snapshot>=0.9.0",
"pytest-timeout>=2.3.1",
"ruff>=0.9.9",
]
docs = [
"mike>=1.1.2",
"mkdocs>=1.4.2",
"mkdocs-exclude-search>=0.6.5",
"mkdocs-glightbox>=0.3.1",
"mkdocs-macros-plugin>=1.0.5",
"mkdocs-material>=9.0.0",
"mkdocstrings[python]>=0.25.1",
"mdx-truly-sane-lists>=1.3",
]
[tool.uv]
package = true
trusted-publishing = "always"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["kpops"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
[tool.basedpyright]
include = ["kpops", "tests", "hooks"]
allowedUntypedLibraries = ["pytablewriter"]
failOnWarnings = false # CLI usage
reportImportCycles = true
reportUnknownParameterType = "warning"
reportUnknownArgumentType = "warning"
reportUnknownLambdaType = "warning"
reportUnknownVariableType = "warning"
reportUnknownMemberType = "warning"
reportIncompatibleVariableOverride = "warning"
reportIncompatibleMethodOverride = "warning"
reportUnusedParameter = "hint"
reportDeprecated = "hint"
reportAny = false
reportExplicitAny = false
reportImplicitStringConcatenation = false
reportUnusedCallResult = false
# false positive for Pydantic https://github.com/DetachHead/basedpyright/issues/868
reportUnsafeMultipleInheritance = false
# we can't do much about it if a library doesn't provide types
reportMissingTypeStubs = false
# TODO: apply only to 3rd party libs such as lightkube
strictParameterNoneValue = false
# TODO: apply only to tests https://github.com/DetachHead/basedpyright/issues/668
reportPrivateUsage = false
[tool.ruff]
output-format = "grouped"
show-fixes = true
target-version = "py311"
extend-exclude = ["tests/*snapshots/*"]
[tool.ruff.lint]
ignore = [
# Rules in conflict with `ruff-format` -- START
"W191", # Checks for indentation that uses tabs. Spaces are preferred.
# "E111", # Checks for indentation with a non-multiple of 4 spaces, add when out of nursery
# "E114", # Checks for indentation of comments with a non-multiple of 4 spaces, add when out of nursery
# "E117", # Checks for over-indented code, add when out of nursery
"E501", # Line too long
"D206", # Checks for docstrings that are indented with tabs.
"D300", # Checks for docstrings that use '''triple single quotes''' instead of """triple double quotes""".
"Q000", # Checks for inline strings that use single quotes.
"Q001", # Checks for multiline strings that use single quotes
"Q002", # Checks for docstrings that use single quotes.
"Q003", # Checks for strings that include escaped quotes.
"COM812", # Checks for the absence of trailing commas.
"COM819", # Checks for the presence of prohibited trailing commas.
"ISC001", # Checks for implicitly concatenated strings on a single line.
"ISC002", # Checks for implicitly concatenated strings that span multiple lines.
# Rules in conflict with `ruff-format` -- END
"D1", # Missing docstring for {} -- Inconvenient to enforce
# The following "D" rules do not correspond to our coding style. We use the pep257 convention, but
# "D212" should not be ignored. In ruff (0.0.291) we cannot select a rule that is excluded by specifying
# a convention, hence our only option is to manually replicate it.
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"D214", # Section is over-indented ("{name}")
"D215", # Section underline is over-indented ("{name}")
"D404", # First word of the docstring should not be "This"
"D405", # Section name should be properly capitalized ("{name}")
"D406", # Section name should end with a newline ("{name}")
"D407", # Missing dashed underline after section ("{name}")
"D408", # Section underline should be in the line following the section's name ("{name}")
"D409", # Section underline should match the length of its name ("{name}")
"D410", # Missing blank line after section ("{name}")
"D411", # Missing blank line before section ("{name}")
"D413", # Missing blank line after last section ("{name}")
"D415", # First line should end with a period, question mark, or exclamation point
"D416", # Section name should end with a colon ("{name}")
"D417", # Missing argument description in the docstring for {definition}: {name}
"B009", # Do not call getattr with a constant attribute value. -- Not always applicable
"B010", # Do not call setattr with a constant attribute value. -- Not always applicable
"RUF012", # type class attrs with `ClassVar` -- Too strict/trigger-happy
"UP007", # Use X | Y for type annotations -- `typer` doesn't support it
"PIE804", # Unnecessary `dict` kwargs -- Inconvenient to enforce
"RET505", # Unnecessary {branch} after return statement -- Lots of false positives
"RET506", # Unnecessary {branch} after raise statement -- Lots of false positives
"RET507", # Unnecessary {branch} after continue statement -- Lots of false positives
"RET508", # Unnecessary {branch} after break statement -- Lots of false positives
"PLR09", # upper bound on number of arguments, functions, etc. -- Inconvenient to enforce
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable -- Inconvenient to enforce
"PLW2901", # `for` loop variable `{var}` overwritten by assignment target -- Inconvenient to enforce
"TRY002", # Create your own exception -- Inconvenient to enforce
"TRY003", # Avoid specifying long messages outside the exception class -- Inconvenient to enforce
]
select = [
"F", # Pyflakes
"E", # pycodestyle Errors
"W", # pycodestyle Warnings
"C90", # mccabe
"I", # isort
"D", # pydocstyle
"UP", # pyupgrade
"B", # flake8-bugbear
"INP", # flake8-no-pep420
"RUF", # Ruff-specific rules
"YTT", # flake8-2020
"ASYNC", # flake8-async
"BLE", # flake8-blind-except
"COM", # flake8-commas
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"EM", # flake8-errmsg
"FA", # flake8-future-annotations
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLOT", # flake8-slots
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
"PGH", # pygrep-hooks
"PL", # Pylint
"TRY", # tryceratops
# "FURB", # refurb, add when out of nursery
# "LOG", # flake8-logging, add when out of nursery
]
task-tags = ["TODO", "HACK", "FIXME", "XXX"]
[tool.ruff.lint.extend-per-file-ignores]
"tests/*/__init__.py" = ["F401"]
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = ["typer.Argument"]
[tool.ruff.lint.flake8-type-checking]
runtime-evaluated-base-classes = ["pydantic.BaseModel"]