-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
168 lines (133 loc) · 4.19 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
[tool.poetry]
package-mode = false
name = "python-boilerplate"
version = "8.0"
description = "A boilerplate project for Python."
authors = ["Johnny Miller <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
homepage = "https://github.com/johnnymillergh/python-boilerplate/"
repository = "https://github.com/johnnymillergh/python-boilerplate.git"
keywords = ["python", "boilerplate"]
packages = [
{ include = "python_boilerplate", from = "src" }
]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.dependencies]
python = ">=3.13.1,<3.14"
pydantic = "==2.10.4"
loguru = "==0.7.3"
pyhocon = "==0.3.61"
numpy = "==2.2.1"
pandas = "==2.2.3"
arrow = "==1.3.0"
tzlocal = "==5.2"
peewee = "==3.17.8"
jinja2 = "==3.1.5"
faker = "==33.3.0"
python-stdnum = "==1.20"
tenacity = "==9.0.0"
matplotlib = "==3.10.0"
psutil = "==6.1.1"
apscheduler = "==3.11.0"
humanize = "==4.11.0"
[tool.poetry.group.dev.dependencies]
mypy = "==1.14.1"
pre-commit = "==4.0.1"
pyinstrument = "==5.0.0"
pyinstaller = "==6.11.1"
[tool.poetry.group.linter.dependencies]
ruff = "==0.8.6"
[tool.poetry.group.test]
optional = true
[tool.poetry.group.test.dependencies]
pytest = "==8.3.4"
pytest-mock = "==3.14.0"
pytest-cov = "==6.0.0"
pytest-html = "==4.1.1"
pytest-xdist = "==3.6.1"
pytest-asyncio = "==0.25.1"
pytest-benchmark = "==5.1.0"
pytest-monitor = "==1.6.6"
[tool.mypy]
files = ["src", "tests"]
cache_dir = "./build/.mypy_cache"
ignore_missing_imports = true
# https://docs.pydantic.dev/latest/mypy_plugin/#configuring-the-plugin
plugins = ["pydantic.mypy"]
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
# for strict mypy: (this is the tricky one :-))
disallow_untyped_defs = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[tool.pytest]
testpaths = ["tests", ]
cache_dir = "./build/.pytest_cache"
[tool.pytest.ini_options]
pythonpath = [
"src"
]
[tool.ruff]
lint.select = ["ALL"]
lint.ignore = [
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in `*arg`
"BLE001", # Do not catch blind exception: `Exception`
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D106", # Missing docstring in public nested class
"D203", # One blank line before class docstring
"D205", # 1 blank line required between summary line and description
"D212", # Multi-line summary first line
"D401", # First line of docstring should be in imperative mood
"DTZ005", # `datetime.datetime.now()` called without a `tz` argument
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"PLR2004", # Magic value used in comparison, consider replacing `3` with a constant variable
"PLW0603", # Using the global statement to update `times_for_debounce` is discouraged
"PLR0913", # Too many arguments
"COM812", # Trailing comma missing
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"TC003", # Move standard library import `concurrent.futures.Future` into a type-checking block
"TRY003", # Avoid specifying long messages outside the exception class
"TRY201", # Use `raise` without specifying exception name
]
line-length = 120
show-fixes = true
src = ["src", ]
target-version = "py39"
[tool.ruff.lint.flake8-copyright]
author = "Lari Liuhamo"
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
multiline-quotes = "double"
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.per-file-ignores]
# https://beta.ruff.rs/docs/rules/
"__init__.py" = ["F401", "F403", "F405", ]
"tests/*" = [
"ANN",
"ARG",
"INP001",
"S101",
]
[tool.ruff.lint.pylint]
max-args = 15
max-branches = 20
max-returns = 10
max-statements = 80
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"