-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
138 lines (126 loc) · 4.17 KB
/
Copy pathpyproject.toml
File metadata and controls
138 lines (126 loc) · 4.17 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
[project]
name = "dap-workspace"
version = "0.3.0"
description = "Deterministic Agent Pipeline — root workspace (meta-package, not installed)"
readme = "README.md"
requires-python = ">=3.13"
license = { text = "MIT" }
authors = [
{ name = "Rafał Łagowski" },
{ name = "Daniel Łagowski" },
]
[tool.uv.workspace]
members = [
"apps/cli",
"apps/engine",
"packages/types",
"packages/runtimes",
"packages/prompt-dsl",
"packages/code-review-council",
"packages/database",
]
[tool.uv]
dev-dependencies = [
"ruff>=0.7.0",
"mypy>=1.13.0",
"pytest>=8.3.3",
"pytest-asyncio>=0.24.0",
"pytest-cov>=5.0.0",
"httpx>=0.27.2",
"types-psutil>=6.1.0.20241102",
"types-defusedxml>=0.7.0.20240218",
"pip-audit>=2.9.0",
]
[tool.uv.sources]
"dap-schemas" = { workspace = true }
"dap-runtimes" = { workspace = true }
"dap-engine" = { workspace = true }
"dap-cli" = { workspace = true }
"dap-prompt-dsl" = { workspace = true }
"dap-database" = { workspace = true }
# --- Ruff ---
[tool.ruff]
line-length = 100
target-version = "py313"
src = ["apps", "packages"]
[tool.ruff.lint]
select = [
"E", "F", "W", # pycodestyle / pyflakes
"I", # isort
"B", # bugbear
"UP", # pyupgrade
"RUF", # ruff
"SIM", # simplify
"PL", # pylint subset
]
ignore = [
"PLR0913", # too many arguments
]
[tool.ruff.lint.per-file-ignores]
"**/__init__.py" = ["F401"] # unused imports OK in __init__
"tests/**" = [
"PLR2004", # magic values in tests OK
"PLC0415", # local imports in tests are intentional (per-test isolation)
"RUF002", # EN DASH in docstrings — same house style as code
"RUF003", # EN DASH in comments — same
]
"**/tests/**" = [
"PLR2004", # magic values in tests OK (apps/cli/tests, apps/dashboard/*, etc.)
"PLC0415", # local imports in tests are intentional (per-test isolation)
]
# Pydantic models need runtime access to types — TC* rules don't apply
[tool.ruff.lint.flake8-bugbear]
# FastAPI idiom: Depends/Query/Path/Body w argument defaults
extend-immutable-calls = [
"fastapi.Depends",
"fastapi.Query",
"fastapi.Path",
"fastapi.Body",
"fastapi.Header",
"fastapi.Cookie",
"fastapi.Form",
"fastapi.File",
]
# --- mypy ---
[tool.mypy]
python_version = "3.13"
strict = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
no_implicit_optional = true
check_untyped_defs = true
warn_redundant_casts = true
warn_unused_ignores = true
show_error_codes = true
# Forces every `# type: ignore` to carry a code (e.g. [attr-defined]).
# Without this, silent suppression hides new errors that appear later.
enable_error_code = [
"ignore-without-code",
"truthy-bool",
"unused-awaitable",
]
exclude = ["build/", "dist/", ".venv/"]
# NB: dodaj override dla langgraph.* gdy zintegrujemy go w F5
[[tool.mypy.overrides]]
# jsonpath-ng has no py.typed marker. Used by the http runtime adapter.
module = ["jsonpath_ng.*"]
ignore_missing_imports = true
# --- pytest ---
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests", "apps", "packages"]
python_files = ["test_*.py", "*_test.py"]
# --strict-markers: catches typos in @pytest.mark.foo (only registered markers allowed)
# --import-mode=importlib: recommended for new projects (avoids sys.path hacks)
addopts = "-q --strict-markers --import-mode=importlib"
# Audit X2 + X6 — declare the unit/integration markers we apply to the
# smoke suite via the auto-marker hook in ``tests/smoke/conftest.py``.
# ``--strict-markers`` rejects any unregistered marker; without this
# block ``pytest -m unit`` would fail with "no tests collected" even
# though the conftest tagged them. Keep the list small and meaningful;
# new markers want a one-line reason that justifies the new axis.
markers = [
"unit: Fast tests with no DB, no HTTP, no subprocess. Run as the quick CI gate (< few seconds total).",
"integration: Tests that boot the engine app, hit the DB, or shell out. Run as the slow CI gate (sub-minute total).",
]