-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
330 lines (305 loc) · 7.93 KB
/
pyproject.toml
File metadata and controls
330 lines (305 loc) · 7.93 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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
[project]
name = "datethyme"
version = "0.4.2"
description = "A savory approach to date and time, built on Pydantic and datetime, with an emphasis on input validation and date/time arithmetic."
authors = [{name = "Isaac Riley", email = "yelircaasi@proton.me"}]
readme = "README.md"
requires-python = ">=3.11,<3.15"
dependencies = [
"pydantic >= 2.11 ",
"deal > 4.24 ",
"multipledispatch >= 1 ",
"loguru >= 0.7.3",
]
[project.scripts]
datethyme = "datethyme.__main__:main"
[build-system]
requires = ["uv_build>=0.7.5,<0.8.0"]
build-backend = "uv_build"
#requires = ["hatchling"]
#build-backend = "hatchling.build"
[tool.uv.build-backend]
module-name = "datethyme"
[dependency-groups]
test = [
"pytest >= 8.3 ",
"hypothesis > 6 ",
# "tox > 4.23 ",
"pytest-cov >= 6.0 ",
"coverage > 7.6 ",
"pytest-mock >= 3.14 ",
"pytest-testmon > 2.1 ",
"pytest-cov >= 6.0 ",
"pytest-loguru >= 0.4 ",
"pytest-profiling > 1.8 ",
"coverage > 7.6 ",
"hypothesis > 6 ",
"tox > 4.23 ",
]
docs = [
"mkdocs >= 1.6 ",
"mkdocstrings >= 0.27 ",
"mkdocstrings-python >= 1.13 ",
"mkdocs-material < 9.5 ",
"pygments >= 2.19 ",
"ruff >= 0.9 ",
]
dev = [
"structlint >= 0.2.1 ",
"ipython >= 8.31 ",
"deply >= 0.5 ",
"grimp >= 3.5 ",
"snakefood3 >= 0.0.7 ",
"pyflame >= 0.3 ",
"scalene >= 1.5.49",
"semver >= 3.0 ",
"z3c.checkversions >= 3.0 ",
]
cli-utils = [
"bandit >= 1.8 ",
"cyclonedx-bom >= 5.1 ",
"google-yamlfmt >= 0.16 ",
"lefthook >= 1.10 ",
"mdformat >= 0.7 ",
"mdformat_mkdocs >= 4.3.0 ",
"pydeps >= 1.12 ",
"ruff >= 0.9 ",
"rust-just >= 1.38 ",
"scalene >= 1.5.49 ",
"semver >= 3.0 ",
"tomli >= 2.0 ",
"ty >= 0.0.0",
"vulture >= 2.14 ",
"yamllint >= 1.37 ",
]
[tool.bandit]
targets = ["src/datethyme", "codeqa/scripts/"]
exclude_dirs = []
skips = []
[tool.commitizen]
name = "cz_conventional_commits"
version_scheme = "semver"
version_provider = "uv"
update_changelog_on_bump = true
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"],
]
[tool.coverage.run]
branch = true
omit = ["src/datethyme/__main__.py"]
data_file = ".cache/coverage"
source = ["datethyme"]
[tool.coverage.report]
show_missing = true
skip_covered = false
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
]
fail_under = 0
[tool.coverage.html]
directory = "codeqa/coverage/html"
[tool.mypy]
ignore_missing_imports = true
disable_error_code = [
"prop-decorator",
"no-redef",
]
strict = false
exclude = "(.venv/.*|.cache.*|scratch.*)"
[tool.pydeps]
max_bacon = 2
no_show = true
verbose = 0
pylib = false
exclude = [
"os",
"re",
"sys",
"collections",
"__future__",
]
[tool.pytest.ini_options]
cache_dir = ".cache/pytest_cache"
testpaths = ["tests", "codeqa/scripts/"]
addopts = "--ignore=_data"
markers = [
"pure: no IO or side effects (refers to the test itself)",
"read: requires a read operation",
"write: requires a write operation",
]
[tool.ruff]
include = ["pyproject.toml", "*.py"]
exclude = [".venv/", "*.pyi", "scratch/"]
cache-dir = ".cache/ruff_cache"
target-version = "py312"
line-length = 100
indent-width = 4
[tool.ruff.format]
exclude = [".venv/", "*.pyi"]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint]
exclude = [".venv/", "*.pyi", "scratch/*"]
select = [
"E",
"F",
"W",
"C90",
"I",
"N",
# "D",
"UP",
"YTT",
# "ANN",
"ASYNC",
# "S",
# "BLE",
# "FBT",
# "B",
# "A",
# "COM",
# "CPY",
# "C4",
# "DTZ",
# "T10",
# "DJ",
# "EM",
# "EXE",
# "FA",
# "ISC",
# "ICN",
# "LOG",
# "G",
# "INP",
# "PIE",
# "T20",
# "PYI",
# "PT",
# "Q",
# "RSE",
# "RET",
# "SLF",
# "SLOT",
# "SIM",
# "TID",
# "TC",
# "INT",
# "ARG",
# "PTH",
# "TD",
# "FIX",
# "ERA",
# "PD",
# "PGH",
"PLC",
"PLE",
"PLR",
"PLW",
"TRY",
"FLY",
"NPY",
# "FAST",
# "AIR",
# "PERF",
"FURB",
#=> "DOC",
"RUF",
]
ignore = [
"N812", # lowercase-imported-as-non-lowercase
"F811", # Redefinitions of unused names
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D205", # 1 blank line required between summary line and description
"PLR0124", # "Name compared with itself"
"N802", # "Checks for functions names that do not follow the snake_case naming convention."
"N803", # "Checks for argument names that do not follow the snake_case convention."
"N806", # Checks for the use of non-lowercase variable names in functions.
"N815", # Checks for class variable names that follow the mixedCase convention.
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
"PLR0913", # Checks for function definitions that include too many arguments (default 5).
"RET504", # Checks for variable assignments that immediately precede a return of the assigned variable.
"RUF001", # Checks for ambiguous Unicode characters in strings.
"TRY002", # Checks for code that raises Exception or BaseException directly.
"TRY003", # Checks for long exception messages that are not defined in the exception class itself.
"TRY201", # Checks for needless exception names in raise statements.
"TRY300", # Checks for return statements in try blocks.
"TRY301", # Checks for raise statements within try blocks. The only raises caught are those that throw exceptions caught by the try statement itself.
]
[tool.ruff.lint.flake8-annotations]
mypy-init-return = true
suppress-none-returning = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.structlint]
root_dir = "."
module_name = "datethyme"
module_root_dir = "src/datethyme"
[tool.structlint.docs]
md_dir = "docs/md"
allow_additional = "(?!)"
ignore = "(?!)"
order_ignore = "(?!)"
file_per_directory = "(?!)"
file_per_class = "(?!)"
replace_double_underscore = false
[tool.structlint.imports]
internal_allowed_everywhere = []
external_allowed_everywhere = []
grimp_cache = ".grimp_cache"
[tool.structlint.imports.internal.allowed]
datamodels = []
utils = []
types = ["datamodels"]
[tool.structlint.imports.internal.disallowed]
conversion = ["datamodels"]
[tool.structlint.methods.builtins_order]
init = 0.0
abstract_property = 1.0
property = 2.0
abstract_private_property = 3.0
private_property = 4.0
abstract_dunder = 5.0
dunder = 6.0
abstract_classmethod = 7.0
classmethod = 8.0
abstract = 9.0
final = 11.0
abstract_static = 12.0
static = 13.0
abstract_private = 14.0
private = 15.0
mangled = 16.0
[tool.structlint.tests]
unit_dir = "tests/unit"
use_filename_suffix = true
allow_additional = "_tmp"
ignore = "(?!)"
order_ignore = "(?!)"
file_per_directory = "(?!)"
file_per_class = "(?!)"
function_per_class = "(?!)"
replace_double_underscore = false
[tool.vulture]
exclude = []
ignore_decorators = ["@app.route", "@require_*"]
ignore_names = ["visit_*", "do_*"]
make_whitelist = false
min_confidence = 60
paths = ["codeqa/scripts/", "src/"]
sort_by_size = true
verbose = false