-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
198 lines (180 loc) · 5.69 KB
/
Copy pathpyproject.toml
File metadata and controls
198 lines (180 loc) · 5.69 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
[project]
name = "harness-python-react"
version = "0.2.11"
description = "Production-quality LLM-driven coding harness — Python (FastAPI) backend, Vite + React + TypeScript frontend."
readme = "README.md"
requires-python = ">=3.14"
license = "MIT"
license-files = ["LICENSE"]
authors = [
{ name = "Constantinos Koutsakis", email = "constantinos.koutsakis@gmail.com" },
]
keywords = [
"template",
"harness",
"llm-coding",
"claude-code",
"fastapi",
"react",
"vite",
"typescript",
"opentelemetry",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development",
]
dependencies = [
"fastapi>=0.115.0",
"uvicorn[standard]>=0.34.0",
"pydantic>=2.11.0",
"pydantic-settings>=2.9.0",
"httpx>=0.28.1",
"opentelemetry-api>=1.33.0",
"opentelemetry-sdk>=1.33.0",
"opentelemetry-exporter-otlp-proto-grpc>=1.33.0",
"opentelemetry-instrumentation-fastapi>=0.62b0",
"opentelemetry-instrumentation-httpx>=0.54b0",
"opentelemetry-instrumentation-logging>=0.54b0",
]
[project.optional-dependencies]
dev = [
"pytest>=8.3.0",
"pytest-asyncio>=0.25.0",
"pytest-timeout>=2.3.0",
"pytest-cov>=7.1.0",
"mypy>=1.15.0",
"ruff>=0.11.0",
"import-linter>=2.0.0",
"pre-commit>=4.0.0",
"commitizen>=4.0.0",
"pyyaml>=6.0.3",
]
[project.urls]
Homepage = "https://github.com/constk/harness-python-react"
Repository = "https://github.com/constk/harness-python-react"
Issues = "https://github.com/constk/harness-python-react/issues"
[tool.uv]
package = false
[tool.ruff]
target-version = "py314"
line-length = 88
exclude = [".claude/worktrees"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"S", # flake8-bandit (security checks — SQL injection, hardcoded crypto, etc.)
"RUF", # ruff-specific rules
# PLR0915 (too-many-statements) + PLR0912 (too-many-branches) enforce the
# function-complexity half of CLAUDE.md *Code standards*. Limits pinned
# explicitly in [tool.ruff.lint.pylint] below to defend against an
# upstream ruff default change silently widening the cap. The file-half
# of the rule is enforced by .github/scripts/check_file_length.py
# (300-line cap, no exemption mechanism).
"PLR0915",
"PLR0912",
]
[tool.ruff.lint.per-file-ignores]
"src/models/**" = ["TCH003"] # Pydantic needs runtime imports for type annotations
"eval/**" = ["TCH001", "S101"] # parametrize imports; pytest asserts are idiomatic
"tests/**" = ["S101"] # pytest asserts are idiomatic (rewritten for rich errors)
".claude/hooks/**" = ["S603", "S607"] # hook scripts intentionally run git/uv/npx from PATH
[tool.ruff.lint.pylint]
# Pinned explicitly — ruff's defaults can drift between versions. Matches
# CLAUDE.md "no function over ~50 lines".
max-statements = 50
max-branches = 12
[tool.ruff.lint.isort]
known-first-party = ["src"]
[tool.mypy]
python_version = "3.14"
strict = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = [
"opentelemetry.*",
]
ignore_missing_imports = true
[tool.importlinter]
# See docs/BOUNDARIES.md for the rationale and the full dependency graph.
root_package = "src"
[[tool.importlinter.contracts]]
name = "src layers flow one-way (api/eval -> agent -> tools -> data -> observability -> models)"
type = "layers"
layers = [
"src.api | src.eval",
"src.agent",
"src.tools",
"src.data",
"src.observability",
"src.models",
]
[[tool.importlinter.contracts]]
name = "src.models depends on nothing in src/"
type = "forbidden"
source_modules = ["src.models"]
forbidden_modules = [
"src.agent",
"src.api",
"src.data",
"src.eval",
"src.observability",
"src.tools",
]
[tool.commitizen]
# Restricts the tool to the 7 prefixes DEVELOPMENT.md documents as allowed.
# Commitizen's default ships the full conventional-commits spec (12+ types
# including perf:, style:, build:, ci:, revert:) — narrower project policy
# prevents tool-vs-doc drift.
#
# `release:` is project-specific and used only on develop -> main release PRs.
name = "cz_customize"
[tool.commitizen.customize]
schema = "<type>(<scope>): <subject>"
schema_pattern = '^(feat|fix|docs|test|refactor|chore|release)(\([\w\-]+\))?!?:\s++(?![A-Z][a-z]).+'
bump_pattern = '^(feat|fix|refactor)'
bump_map = {feat = "MINOR", fix = "PATCH", refactor = "PATCH", chore = "PATCH", docs = "PATCH", test = "PATCH"}
example = "feat: add an example feature"
info = "See docs/DEVELOPMENT.md#commit-messages for the allowed prefixes."
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
asyncio_mode = "auto"
timeout = 30
markers = [
"eval: evaluation harness tests (require LLM API key)",
"integration: tests that touch real external systems (slower than unit; split into own CI job)",
]
[tool.coverage.run]
source = ["src"]
# src/eval/ is the agent-quality harness; exercised by eval/ via the nightly
# workflow, not by tests/ unit tests. Counting it here would inflate misses.
omit = ["src/eval/*"]
[tool.coverage.report]
fail_under = 75
show_missing = true
skip_covered = false
exclude_also = [
"if TYPE_CHECKING:",
"raise NotImplementedError",
'if __name__ == "__main__":',
]