-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
164 lines (139 loc) · 4.23 KB
/
pyproject.toml
File metadata and controls
164 lines (139 loc) · 4.23 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
[project]
name = "python-boilerplate"
version = "8.2"
description = "A boilerplate project for Python."
authors = [
{ name = "Johnny Miller", email = "johnnysviva@outlook.com" }
]
license = { text = "Apache-2.0" }
readme = "README.md"
keywords = ["python", "boilerplate"]
requires-python = ">=3.14.3,<3.15"
dependencies = [
"pydantic==2.12.5",
"loguru==0.7.3",
"pyhocon==0.3.61",
"numpy==2.4.4",
"pandas==3.0.2",
"arrow==1.4.0",
"tzlocal==5.3.1",
"peewee==4.0.4",
"jinja2==3.1.6",
"faker==40.12.0",
"python-stdnum==2.2",
"tenacity==9.1.4",
"matplotlib==3.10.8",
"psutil==7.2.2",
"apscheduler==3.11.2",
"humanize==4.15.0",
]
[project.optional-dependencies]
dev = [
"mypy==1.20.0",
"pre-commit==4.5.1",
"pyinstrument==5.1.2",
"pyinstaller==6.19.0",
]
linter = [
"ruff==0.15.9",
]
test = [
"pytest==9.0.2",
"pytest-mock==3.15.1",
"pytest-cov==7.1.0",
"pytest-html==4.2.0",
"pytest-xdist==3.8.0",
"pytest-asyncio==1.3.0",
"pytest-benchmark==5.2.3",
"pytest-monitor==1.6.6",
]
[project.urls]
Homepage = "https://github.com/johnnymillergh/python-boilerplate/"
Repository = "https://github.com/johnnymillergh/python-boilerplate.git"
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.packages.find]
where = ["src"]
[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.ini_options]
testpaths = ["tests"]
cache_dir = "./build/.pytest_cache"
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", "tests"]
target-version = "py313"
respect-gitignore = true
[tool.ruff.lint.flake8-copyright]
author = "Johnny Miller"
[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"