-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
208 lines (193 loc) · 5.35 KB
/
pyproject.toml
File metadata and controls
208 lines (193 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
[project]
name = "imbue"
version = "0.1.0"
description = "Monorepo for Imbue projects"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"pytest-xdist>=3.8.0",
"ty>=0.0.24",
"click>=8.0.0",
]
[tool.uv.sources]
imbue-common = { workspace = true }
[tool.uv.workspace]
members = ["libs/*", "apps/*"]
[dependency-groups]
dev = [
"pre-commit>=4.2.0",
"ruff~=0.12.8",
"pytest>=9.0",
"pytest-cov>=7.0.0",
"pytest-timeout>=2.3.0",
"pytest-split>=0.9.0",
# really just for debugging slow tests
"pytest-profiling",
"line-profiler",
"import-linter>=2.0",
"semver>=3.0",
"tomlkit>=0.12.0",
"imbue-common[dev]",
]
# Shared pytest settings (markers, filterwarnings, coverage report config)
# are centralized in:
# libs/imbue_common/imbue/imbue_common/conftest_hooks.py
# The settings below remain here because they are read from pyproject.toml
# before any hooks run: addopts, coverage.run, inline-snapshot, timeout_func_only.
[tool.pytest.ini_options]
# Only timeout the test function itself, not fixtures. This is required because
# --timeout-method=signal sends SIGALRM which kills the entire xdist worker process
# if it fires during fixture setup/teardown (especially the session-scoped cleanup).
timeout_func_only = true
# Use xunit1 format to enable record_xml_attribute fixture for consistent classnames
junit_family = "xunit1"
pythonpath = [
"apps/*",
"libs/*",
]
testpaths = [
"test_meta_ratchets.py",
"apps/*",
"libs/*",
"scripts",
]
addopts = [
"-n 4",
"--dist=worksteal",
"--cov=imbue.mngr",
"--cov=imbue.imbue_common",
"--cov=imbue.resource_guards",
"--cov=imbue.mngr_claude",
"--cov=imbue.mngr_opencode",
"--cov=imbue.mngr_pi_coding",
"--cov=imbue.mngr_pair",
"--cov=imbue.mngr_schedule",
"--cov=imbue.mngr_ttyd",
"--cov=imbue.mngr_tutor",
"--cov=imbue.mngr_llm",
"--cov=imbue.mngr_mind",
"--cov=imbue.mngr_claude_mind",
"--cov=imbue.mngr_elena_code",
"--cov=imbue.mngr_kanpan",
"--cov=imbue.mngr_recursive",
"--cov=imbue.mngr_notifications",
"--cov=imbue.mngr_mind_chat",
"--cov=imbue.mngr_test_coder",
"--cov=imbue.mngr_file",
"--cov=imbue.mngr_tmr",
"--cov=imbue.skitwright",
"--cov=imbue.minds",
"--cov=imbue.slack_exporter",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
"--cov-fail-under=80",
"--durations=20",
"--timeout=10",
"--timeout-method=signal",
"--max-worker-restart=0",
"-m not acceptance and not release",
"--slow-tests-to-file",
"--coverage-to-file",
]
[tool.ruff]
line-length = 119
exclude = [
"**/__snapshots__/**",
"scripts/style_guide.py",
"frpc_test",
]
[tool.ruff.lint]
select = [
"E",
"F",
"B",
# "T",
# "SIM",
]
ignore = ["E501"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.ruff.lint.isort]
force-single-line = true
case-sensitive = true
order-by-type = false
known-first-party = [
"imbue",
"imbue_common",
"mngr",
"sculptor_desktop",
]
[tool.inline-snapshot]
default-flags=["report"]
default-flags-tui=["report"]
default-flags-ide=["report"]
format-command="uv run ruff format --force-exclude --config pyproject.toml --stdin-filename {filename}"
[tool.ty.src]
exclude = ["scripts/style_guide.py", "scripts/generate_verify_skills.py", "contrib/"]
[tool.ty.environment]
extra-paths = ["scripts"]
[tool.coverage.run]
source = ["imbue"]
parallel = true
concurrency = ["multiprocessing", "thread"]
omit = [
"*_test.py",
"test_*.py",
"*/tests/*",
"*/conftest.py",
# Test utility modules contain helpers only used by tests
"*/utils/testing.py",
"*/utils/plugin_testing.py",
"libs/imbue_common/imbue/imbue_common/ratchet_testing/ratchets.py",
# Modal provider plugin requires network access for testing
"libs/mngr_modal/imbue/mngr_modal/*",
# Docker provider requires a Docker daemon for testing
"libs/mngr/imbue/mngr/providers/docker/instance.py",
"libs/mngr/imbue/mngr/providers/docker/volume.py",
"libs/mngr/imbue/mngr/providers/docker/testing.py",
# Mind deploy modules run on Modal and require infrastructure to test
"apps/minds/imbue/minds/deploy/cron_runner.py",
"apps/minds/imbue/minds/deploy/remote_runner.py",
"apps/minds/imbue/minds/deploy/verification.py",
# Schedule plugin cron runner and verification run on Modal and require infrastructure to test
"libs/mngr_schedule/imbue/mngr_schedule/implementations/modal/cron_runner.py",
"libs/mngr_schedule/imbue/mngr_schedule/implementations/modal/verification.py",
# don't bother with anything in scripts
"scripts/*",
]
[tool.importlinter]
root_package = "imbue"
[[tool.importlinter.contracts]]
name = "mngr layers contract"
type = "layers"
layers = [
"imbue.mngr.main",
"imbue.mngr.cli",
"imbue.mngr.api",
"imbue.mngr.agents",
"imbue.mngr.providers",
"imbue.mngr.hosts",
"imbue.mngr.plugins",
"imbue.mngr.interfaces",
"imbue.mngr.config",
"imbue.mngr.utils",
"imbue.mngr.errors",
"imbue.mngr.primitives",
"imbue.mngr.resources",
]
[[tool.importlinter.contracts]]
name = "minds layers contract"
type = "layers"
layers = [
"imbue.minds.desktop_client",
"imbue.minds.cli",
"imbue.minds.forwarding_server",
"imbue.minds.core",
"imbue.minds.interfaces",
"imbue.minds.config",
"imbue.minds.errors",
"imbue.minds.utils",
"imbue.minds.primitives",
]