-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
240 lines (229 loc) · 5.35 KB
/
Copy pathpyproject.toml
File metadata and controls
240 lines (229 loc) · 5.35 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
[project]
name = "command-ghostwriter"
version = "0.0.0"
requires-python = ">=3.11,<4.0"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"chardet>=7.6.0,<8",
"jinja2>=3.1.6,<4",
"markupsafe>=3.0.2,<4",
# pydantic's error-doc URL embeds the minor version (errors.pydantic.dev/2.13/), asserted in
# tests/unit/test_document_render.py. When bumping pydantic's minor version, update that fixture
# in lockstep or the render error-message assertions break.
"pydantic>=2.13.4,<2.14",
"python-box>=7.2,<8",
"pyyaml>=6.0.1,<7",
"toml>=0.10.2,<0.11",
]
[dependency-groups]
dev = [
"data-to-xml>=1.0.9,<2",
"gitpython>=3.1.59,<4",
"lizard>=1.24.0,<2",
"mock>=5.2,<6",
"mypy>=2.3.1,<3",
"packaging>=26.3,<27",
"pandas-stubs>=3.0.5.260730,<4",
"pre-commit>=4.6.2,<5",
"psutil>=7,<8",
"pydeps>=3.0.7,<4",
"pygal>=3.1.3,<4",
"pyre-check>=0.10.0,<0.11",
"pytest>=9.1.1,<10",
"pytest-benchmark==5.3.0",
"pytest-clarity>=1.0.1,<2",
"pytest-cov>=7.1.0,<8",
"pytest-item-dict>=1.1.2,<2",
"pytest-mock>=3.14.1,<4",
"pytest-randomly>=4.1.0,<5",
"pytest-rerunfailures>=16.6,<17",
"pytest-timeout>=2.4,<3",
"pytest-xdist>=3.8,<4",
"ruff>=0.16.4,<0.17",
"types-psutil>=7.0.0.20250601,<8",
"types-pyyaml>=6.0.12.20260815,<7",
"types-requests>=2.33.0.20260712,<3",
"types-toml>=0.10.8.20240310,<0.11",
"vulture>=2.14,<3",
"yamllint>=1.37.1,<2",
]
# devcontainer 専用の対話デバッガ。CI では同期しない(uv sync --group local で追加)。
local = [
"pudb>=2025.1,<2026",
]
[tool.ruff]
target-version = "py312"
line-length = 140
indent-width = 4
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
format.indent-style = "space"
format.quote-style = "double"
format.line-ending = "auto"
format.skip-magic-trailing-comma = false
format.docstring-code-line-length = "dynamic"
lint.select = [
"A",
"ANN",
"B",
"E",
"F",
"I",
"N",
"PT",
"PT001",
"RUF",
"S",
"SLF",
"TC",
"TCH",
]
lint.ignore = [
"RUF002",
]
lint.per-file-ignores."scripts/create_pr.py" = [
"S603",
]
lint.per-file-ignores."tests/*" = [
"PT001", # Use @pytest.fixture{expected} over @pytest.fixture{actual}
"PT023", # Use @pytest.mark.{mark_name}{expected_parens} over @pytest.mark.{mark_name}{actual_parens}
"S101", # Use of assert detected
"S307", # Use of assert detected
"S603", # `subprocess` call: check for execution of untrusted input
]
lint.per-file-ignores."tests/workflow/*" = [
"S105", # Possible hardcoded password assigned to: "{}"
]
# Allow fix for all enabled rules (when `--fix`) is provided.
lint.fixable = [
"ALL",
]
lint.unfixable = [
]
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.pytest.ini_options]
testpaths = [
"tests",
]
pythonpath = "."
addopts = [
"-vv",
"--maxfail=10",
"--durations=30",
"--import-mode=importlib",
# ローカルも既定で並列実行 (pytest-randomly が順序非依存を担保)。
# benchmark 計測や pdb デバッグ時は `-n0` で並列を無効化すること。
"-n",
"auto",
"--dist",
"load",
]
markers = [
"unit: mark a test as a unit test.",
"integration: mark a test as an integration test.",
"e2e: mark a test as an end-to-end test",
"benchmark: mark a test for benchmarking",
]
[tool.coverage.run]
parallel = false
omit = [
"tests/e2e/*",
".venv/*",
"node_modules/*",
]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"pass",
"raise ImportError",
]
[tool.coverage.html]
directory = "htmlcov"
[tool.mypy]
check_untyped_defs = true
exclude = [
".venv",
"build",
"dist",
"assets",
"node_modules",
"htmlcov",
]
disallow_any_decorated = false
disallow_any_explicit = false
disallow_any_generics = false
disallow_subclassing_any = false
disallow_untyped_calls = false
disallow_untyped_decorators = false
disallow_incomplete_defs = false
ignore_errors = false
ignore_missing_imports = false
pretty = true
python_version = "3.12"
warn_return_any = false
warn_unused_configs = true
warn_unreachable = true
[tool.uv]
package = false
[tool.command-ghostwriter]
# Pinned uv version for reproducible provisioning. Single source of truth read
# by flake.nix (devShell pinned-uv) and mirrored by the setup-python composite
# action. Deliberately NOT [tool.uv].required-version: that pin makes uv
# self-abort when Dependabot's uv image (0.11.8) runs, blocking uv.lock
# regeneration under the `uv` Dependabot ecosystem. Refs #562.
uv-version = "0.8.17"
[tool.benchmark]
min_time = 0.1
max_time = 2.0
min_rounds = 3
timer = "time.perf_counter"
disable_gc = false
warmup = false
warmup_iterations = 10000
[tool.vulture]
paths = [
"features",
"tests",
"tests/unit",
]
make_whitelist = true
min_confidence = 80
sort_by_size = true
verbose = false