-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
279 lines (246 loc) · 8.23 KB
/
pyproject.toml
File metadata and controls
279 lines (246 loc) · 8.23 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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
[tool.poetry]
name = "qontinui"
version = "0.1.1"
description = "Model-based GUI automation with AI-enhanced perception"
authors = ["Joshua Spinak <[email protected]>"]
license = "AGPL-3.0-or-later"
readme = "README.md"
homepage = "https://github.com/qontinui/qontinui"
repository = "https://github.com/qontinui/qontinui"
documentation = "https://qontinui.github.io"
keywords = ["gui", "automation", "ai", "testing", "rpa"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Libraries :: Python Modules",
]
packages = [{include = "qontinui", from = "src"}]
# Ship the shared WSM prompt artifact in sdist/wheel; Python resolves
# it at runtime via importlib.resources via its package path.
include = [
{ path = "src/qontinui/verification/wsm_prompt.toml", format = ["sdist", "wheel"] },
]
[tool.poetry.dependencies]
python = ">=3.12,<3.14.1 || >3.14.1,<3.15"
pynput = "^1.7"
pyautogui = "^0.9.54"
opencv-python-headless = "^4.13"
transformers = "^5.0"
# torch / torchvision pulled from the PyTorch cu128 wheel index so we get
# Blackwell (sm_120) CUDA kernels on RTX 5090. The default PyPI torch
# wheels are built against older CUDA and fall back to CPU on Blackwell.
torch = {version = "^2.2", source = "pytorch-cu128"}
torchvision = {version = ">=0.26", source = "pytorch-cu128"}
# SAM3: Install manually with: pip install git+https://github.com/facebookresearch/sam3.git
# (Poetry cannot handle git dependencies without proper packaging)
accelerate = "^1.0"
timm = ">=1.0.22" # Required by SAM3
supervision = "^0.27"
tokenizers = "^0.22"
ultralytics = "^8.0"
easyocr = "^1.7"
transitions = "^0.9"
lark = "^1.1"
scikit-learn = "^1.3"
Multi-Template-Matching = ">=2.0.0"
networkx = "^3.2"
faiss-cpu = "^1.7"
numpy = "^2.0,<3.0"
pillow = "^12"
pydantic-settings = "^2.0"
python-dotenv = "^1.0"
structlog = "^25.4"
mss = "^10.0"
prometheus-client = "^0.24"
psutil = ">=5.9,<8.0"
sqlalchemy = "^2.0"
pydantic = "^2.11.9"
qontinui-schemas = { path = "../qontinui-schemas", develop = true }
multistate = { path = "../multistate", develop = true }
croniter = "^6.0"
playwright = "^1.56.0"
selenium = "^4.38.0"
webdriver-manager = "^4.0.2"
click = "^8.1"
httpx = "^0.28"
aiohttp = "^3.9" # CDP WebSocket for accessibility capture
yarl = "<1.24" # 1.24.0 wheels lack cp312-manylinux ABI tags as of 2026-05-19; pin transitive dep until upstream republishes
# Optional: UI-TARS quantization support (for local inference on consumer GPUs)
bitsandbytes = { version = "^0.45", optional = true }
# Optional: Sentence transformers for local embeddings
sentence-transformers = { version = "^5.0", optional = true }
# Optional: PaddleOCR as alternative OCR engine for OmniParser
paddleocr = { version = ">=2.7", optional = true }
paddlepaddle = { version = ">=2.5", optional = true }
[tool.poetry.extras]
uitars = ["bitsandbytes"] # Enable: poetry install -E uitars
embeddings = ["sentence-transformers"] # Enable: poetry install -E embeddings
omniparser = ["paddleocr", "paddlepaddle"] # Enable: poetry install -E omniparser
[tool.poetry.scripts]
qontinui = "qontinui.cli.main:main"
[tool.poetry.group.dev.dependencies]
pytest = "^9.0"
pytest-cov = "^7.0"
pytest-asyncio = "^1.3"
ruff = "^0.15"
mypy = "^1.14"
pre-commit = "^4.4"
sphinx = "^9.0"
sphinx-rtd-theme = "^3.0"
pylint = "^4.0"
flake8 = "^7.3.0"
tox = "^4.30.2"
types-pyautogui = "^0.9.3.20241230"
types-psutil = "^7.0.0.20250822"
types-pynput = "^1.8.1.20250809"
types-reportlab = "^4.4.4.20250926"
sphinx-autodoc-typehints = ">=1.20,<4.0"
myst-parser = "^5.0"
types-pyyaml = "^6.0.12.20250915"
# Note: SAM3 must be installed manually (see README for instructions)
# Poetry extras removed since SAM3 cannot be installed via poetry
types-requests = "^2.32.4.20250913"
bandit = "^1.9.2"
respx = "^0.22"
[[tool.poetry.source]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
priority = "explicit"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by ruff format)
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
[tool.ruff.lint.per-file-ignores]
# Late imports in multistate_integration are intentional (after sys.path manipulation)
"src/qontinui/multistate_integration/*.py" = ["E402"]
# Late imports in config/transition_loader for debug helper function
"src/qontinui/config/transition_loader.py" = ["E402"]
# Late imports in tests are intentional (after sys.path manipulation)
# Late imports in actions are intentional (to break circular imports)
"src/qontinui/actions/*.py" = ["E402"]
"src/qontinui/actions/**/*.py" = ["E402"]
# Late imports in tests are intentional (after sys.path manipulation)
"tests/**/*.py" = ["E402", "B011", "B017", "F841"]
[tool.ruff.lint.isort]
known-first-party = ["qontinui"]
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
plugins = ["pydantic.mypy"]
# For src-layout projects, use mypy_path to set the import root
# IMPORTANT: Run mypy as `mypy -p qontinui` or `mypy src/qontinui`, NOT `mypy .`
# Running `mypy .` causes "Source file found twice" due to path resolution conflicts
mypy_path = "src"
namespace_packages = true
explicit_package_bases = true
disable_error_code = ["import-untyped"]
# Exclude everything except src/ to prevent "Source file found twice" when running `mypy .`
exclude = ["tests", "docs", "scripts", "examples", "benchmarks"]
# Only check the qontinui package
packages = ["qontinui"]
[[tool.mypy.overrides]]
module = "pydantic"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "qontinui.hal.implementations.mss_capture"
warn_return_any = false
disallow_any_unimported = false
# Disable strict checking for extraction modules with complex union types
[[tool.mypy.overrides]]
module = "qontinui.extraction.*"
warn_return_any = false
strict = false
ignore_errors = true
[tool.pylint]
max-line-length = 100
disable = ["C0114", "C0115", "C0116"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
asyncio_mode = "auto"
addopts = [
"--cov=src/qontinui",
"--cov-report=term-missing",
"--cov-report=xml",
"--cov-report=html",
"-v",
]
[tool.coverage.run]
source = ["src/qontinui"]
omit = ["*/tests/*", "*/__init__.py"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if __name__ == .__main__.:",
"raise NotImplementedError",
"pass",
"except ImportError:",
]
# Quality gate configuration for qontinui-devtools
[tool.qontinui-devtools]
# God class detection thresholds
max_god_class_lines = 500
max_god_class_methods = 30
max_lcom = 0.9
# Type coverage requirements
min_type_coverage = 85.0
# Import analysis
allow_circular_dependencies = false
# Baselines (current state as of analysis)
baseline_god_classes_critical = 43
baseline_race_conditions_critical = 474
baseline_security_critical = 20
[tool.qontinui-devtools.security]
# Security scan configuration
fail_on_critical = true
fail_on_high = false
ignore_patterns = ["*/tests/*", "*/examples/*", "*/benchmarks/*"]
# Severity levels to report
report_levels = ["critical", "high", "medium"]
[tool.qontinui-devtools.race-conditions]
# Race condition detection
fail_on_new_critical = true
baseline_critical_count = 474
# Patterns to check
check_patterns = [
"shared_state_access",
"unprotected_modification",
"async_race",
"thread_race"
]
[tool.qontinui-devtools.architecture]
# Architecture complexity thresholds
max_coupling = 10
max_cyclomatic_complexity = 15
max_dependencies_per_module = 20
# God class thresholds
god_class_line_threshold = 500
god_class_method_threshold = 30
god_class_lcom_threshold = 0.9