-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
259 lines (236 loc) · 5.68 KB
/
pyproject.toml
File metadata and controls
259 lines (236 loc) · 5.68 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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
[project]
name = "bear"
dynamic = ["version"]
description = "Python template"
license = { text = "MIT" }
requires-python = ">=3.10, <3.13"
authors = [
{ name = "Andrea Guzzo", email = "andrea.guzzo92@gmail.com" },
{ name = "PBG", email = "pythonbiellagroup@gmail.com" },
]
readme = "README.md"
keywords = ["pbg", "python", "template", "bear"]
dependencies = [
"cookiecutter>=2.6.0",
"ecs-logging>=2.2.0",
"loguru>=0.7.3",
"pydantic>=2.11.3",
"pydantic-settings>=2.9.0",
]
# Custom index with private repository
# [[tool.uv.index]]
# name = "pbg"
# url = "your-repository-url"
# explicit = true
# [tool.uv.sources]
# your-package = { workspace = true }
[tool.setuptools.packages.find]
where = ["."]
include = ["app*"]
exclude = ["test*"]
[tool.setuptools.package-data]
"*" = ["*.yaml"]
[tool.setuptools.dynamic]
version = { file = "VERSION" }
[dependency-groups]
dev = [
"commitizen>=3.9.1",
"deptry>=0.20.0",
"detect-secrets>=1.5.0",
"docker>=7.1.0",
"exceptiongroup>=1.2.2",
"fsspec>=2024.6.1",
"ipython>=8.27.0",
"jupyter>=1.1.1",
"memory-profiler>=0.61.0",
"moto>=5.0.13",
"mypy>=1.11.2",
"pre-commit>=3.8.0",
"pytest>=8.3.2",
"pytest-asyncio>=0.24.0",
"pytest-cov>=5.0.0",
"ruff>=0.6.3",
"s3fs>=2024.6.1",
"sqlalchemy-stubs>=0.4",
"tox>=4.18.0",
]
docs = [
"black>=24.8.0",
"mkdocs>=1.5.3",
"mkdocs-autorefs>=0.5.0",
"mkdocs-gen-files<1.0.0,>=0.5.0",
"mkdocs-literate-nav<1.0.0,>=0.6.1",
"mkdocs-macros-plugin>=1.0.5",
"mkdocs-material>=9.5.5",
"mkdocs-minify-plugin>=0.7.2",
"mkdocs-redirects>=1.2.1",
"mkdocs-section-index<1.0.0,>=0.3.9",
"mkdocstrings>=0.24.0",
"mkdocstrings-python>=1.8.0",
]
### PLUGINS ###
[tool.pytest.ini_options]
markers = [
"functions: mark test for the base functionalities",
"core: all about the core",
"duckdb: duckdb functionalities",
"files: file write and read functionalities",
"postgres: postgres functionalities",
"dremio: dremio functionalities",
]
log_cli = true
log_cli_level = "DEBUG"
[tool.coverage.report]
skip_empty = true
[tool.coverage.run]
branch = true
source = ["app"]
[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "v$major.$minor.$patch$prerelease"
version = "0.1.0"
version_files = ["__version__.py", "pyproject.toml:version"]
style = [
[
"qmark",
"fg:#ff9d00 bold",
],
[
"question",
"bold",
],
[
"answer",
"fg:#ff9d00 bold",
],
[
"pointer",
"fg:#ff9d00 bold",
],
[
"highlighted",
"fg:#ff9d00 bold",
],
[
"selected",
"fg:#cc5454",
],
[
"separator",
"fg:#cc5454",
],
[
"instruction",
"",
],
[
"text",
"",
],
[
"disabled",
"fg:#858585 italic",
],
]
#### RUFF
[tool.ruff]
line-length = 120
indent-width = 4
output-format = "concise"
# Assume Python 3.10.
target-version = "py312"
# A list of file patterns to include when linting.
include = ["**/pyproject.toml", "*.py", "*.pyi"]
# extend-include = ["*.ipynb"]
# Always autofix, but never try to fix `F401` (unused imports).
fix = true
# Exclude a variety of commonly ignored directories (you can have some problems)
exclude = [
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
".venv",
"*ipynb_checkpoints",
"*.ipynb",
"test/*",
"__init__.py",
]
[tool.ruff.lint]
fixable = ["ALL"]
unfixable = ["F401"]
# Rules: https://beta.ruff.rs/docs/rules/
# Enable Pyflakes `E` and `F` codes by default.
select = [
#default
"E", # pycodestyle error
"F", #flake8 error
#extra
"A", # bultin shadowing
"B", # flake8 bugbear
"BLE", # aboid bare excepts
"C4", # simplify comprehensions
"D", # docstyle
"DTZ", # datetime errors
"FBT", # avoid boolean trap
"G", # logging format
"I", # flake8-isort import
"N", # pep8 naming
"RET", # return statements values
"S", # bandit
"YTT", # wrong usage of sys.info
"B", # flake8-bugbear
]
ignore = [
"B008", # do not perform function calls in argument defaults
"BLE001", #Do not catch blind exception: {name}
"C901", # too complex
"D107", # Missing docstring in __init__
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"D417", # Missing argument description in the docstring for {definition}: {name}
"E501", # Line too long ({width} > {limit} characters)
"E501", # line too long, handled by black
"D100",
"FBT001", # boolean trap
"FBT002", # boolean trap
"G004", # logging statement using fstring formatting
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
# select = ["E4", "E7", "E9", "F"]
# exclude = ["*.ipynb"]
# ignore = []
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
docstring-code-line-length = 20
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
known-third-party = ["fastapi", "pydantic", "starlette"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["D104", "F401", "I002"]
"test*.py" = ["S101", "T201"]