Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
144 lines (129 loc) · 3.5 KB
/
Copy pathpyproject.toml
File metadata and controls
144 lines (129 loc) · 3.5 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
[project]
name = "hash"
version = "0.1.0"
description = "HASH Monorepo"
readme = "README.md"
requires-python = ">=3.14.10,<3.15"
dependencies = []
authors = [
{ name = "HASH" },
]
[build-system]
requires = ["uv_build>=0.12.16,<0.13.0"]
build-backend = "uv_build"
[dependency-groups]
dev = [
"deptry>=0.25.1,<0.26", # external dependency declarations; Tach checks internal boundaries
"pytest>=9.1.1,<10",
"ruff>=0.16.8,<0.17",
"tach>=0.35,<0.36",
"ty<0.0.85,>=0.0.84",
]
[tool.uv]
preview = true
required-version = ">=0.13.6"
add-bounds = "major" # require cargo-style bounded ranges (>=1.2.3, <2.0.0)
exclude-newer = "7 days" # mirrors npm release age
package = false
constraint-dependencies = [
"deptry<0.26,>=0.25.1",
"optuna<6.0.0,>=5.0.0",
"pytest<10,>=9.1.1",
"pytest-asyncio<2,>=1.4",
"ruff<0.17,>=0.16.8",
"tach<0.36,>=0.35",
"ty<0.0.85,>=0.0.84",
"uv-build<0.13.0,>=0.12.16",
]
[tool.uv.workspace]
members = [
"libs/@local/petrinaut-optimizer-core/python",
]
[tool.pytest.ini_options]
addopts = "-q --import-mode=importlib"
testpaths = [
"libs/@local/petrinaut-optimizer-core/python/tests",
]
pythonpath = [
"libs/@local/petrinaut-optimizer-core/python/src",
]
[tool.ruff]
line-length = 100
preview = true
target-version = "py314"
src = [
"libs/@local/petrinaut-optimizer-core/python/src",
]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
# Conflicts with the formatter.
"W191",
"E111",
"E114",
"E117",
"E501",
"D203",
"D206",
"D300",
"Q000",
"Q001",
"Q002",
"Q003",
"Q004",
"COM812",
"COM819",
"ISC001",
# This repository has no copyright-header convention.
"CPY001",
# Put summaries on the first line, without a blank before class docstrings.
"D203",
"D213",
# Self-explanatory APIs need no docstring that restates the signature.
"D101",
"D102",
"D103",
"D104",
"D105",
"D107",
"DOC201",
"DOC402",
"DOC501",
# Keep informative exception messages at their call sites.
"EM101",
"EM102",
"TRY003",
# Limit positional arguments rather than keyword arguments.
"PLR0913",
# Python 3.14 evaluates annotations lazily.
"TC001",
"TC002",
"TC003",
]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"__future__.annotations".msg = "Python 3.14 evaluates annotations lazily (PEP 649). The future import changes annotation semantics and can break tooling such as Pydantic."
"typing.Any".msg = "Use object for pass-through values, a TypeVar for generic code, or pydantic's JsonValue for opaque JSON."
[tool.ruff.lint.per-file-ignores]
"**/tests/**" = ["S101", "PLR2004", "SLF001", "PLC2701", "D100", "S603", "INP001"]
"**/cli/**" = ["PLC0415", "T201"]
"**/cli.py" = ["PLC0415", "T201"]
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.ruff.lint.pylint]
max-positional-args = 3
[tool.turbo]
name = "hash-python"
[tool.ty.environment]
python = "./.venv"
[tool.ty.rules]
blanket-ignore-comment = "error"
missing-override-decorator = "error"
missing-type-argument = "error"
unused-ignore-comment = "error"
division-by-zero = "error"
possibly-missing-attribute = "error"
possibly-missing-import = "error"
possibly-unresolved-reference = "error"
unsupported-dynamic-base = "error"
[tool.ty.terminal]
error-on-warning = true