-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathpyproject.toml
More file actions
205 lines (193 loc) · 6.34 KB
/
Copy pathpyproject.toml
File metadata and controls
205 lines (193 loc) · 6.34 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
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["."]
include = ["app*"]
exclude = ["users*", "k8s*", "template*"]
[project]
name = "tesslate-studio-orchestrator"
version = "0.1.0"
description = "OpenSail - Open source full stack software builder - Backend Orchestrator"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"fastapi>=0.109.0",
"uvicorn[standard]>=0.27.0",
"python-jose[cryptography]>=3.3.0",
"passlib[bcrypt]>=1.7.4",
"python-multipart>=0.0.6",
"sqlalchemy>=2.0.25",
"alembic>=1.13.1",
"aiofiles>=23.2.1",
"websockets>=12.0",
"openai>=1.0.0",
"python-dotenv>=1.0.0",
"pydantic>=2.5.3",
"pydantic-settings>=2.1.0",
"httpx>=0.26.0",
"jinja2>=3.1.3",
"asyncpg>=0.29.0",
"email-validator>=2.2.0",
"aiohttp>=3.9.0",
# SQLite async driver for desktop mode
"aiosqlite>=0.21.0",
# v33+ has a regression in `Configuration.auth_settings()` where it only
# registers a `BearerToken` auth entry when the token is in
# `api_key['BearerToken']`, but `load_incluster_config()` puts it under
# `api_key['authorization']`. The mismatch silently drops the
# `Authorization` header on every K8s call → 401 system:anonymous.
# The defensive backstop in `services/k8s_auth.py` covers in-process,
# but the upper bound prevents the bug from re-entering the image at
# `pip install` time. See orchestrator/app/services/k8s_auth.py.
"kubernetes>=28.1.0,<33.0.0",
"docker>=7.0.0",
"nanoid>=2.0.0",
# Authentication
"fastapi-users[sqlalchemy]>=13.0.0",
"httpx-oauth>=0.14.1",
"itsdangerous>=2.1.2",
"aiosmtplib>=3.0.0",
# Rate limiting
"slowapi>=0.1.9",
# Encryption
"cryptography>=41.0.0",
# Payment processing
"stripe>=7.0.0",
"tenacity>=9.1.2",
# AWS S3 for project storage
"boto3>=1.34.0",
# Web search providers
"tavily-python>=0.5.0",
"ddgs>=9.0.0",
# Redis for distributed caching, Pub/Sub, and horizontal scaling
"redis[hiredis]>=5.0.0",
# ARQ - async Redis task queue for agent worker fleet
"arq>=0.26.0",
# MCP (Model Context Protocol) SDK
"mcp>=1.9.2",
# Ed25519 verification for Discord webhooks + marketplace bundle attestations
"PyNaCl>=1.5.0",
# tar.zst marketplace bundle (de)compression
"zstandard>=0.21.0",
# gRPC client for btrfs CSI NodeOps service
"grpcio>=1.60.0",
# Gateway: cron scheduling
"croniter>=2.0.0",
# Gateway: Discord WebSocket
"discord.py>=2.3.0",
# Gateway: Slack Socket Mode
"slack-sdk[socket-mode]>=3.27.0",
# Local orchestrator: interactive PTY sessions + gitignore parsing
"ptyprocess>=0.7.0",
"pathspec>=0.12.0",
# Tesslate Apps: manifest schema validation + YAML parsing
"jsonschema>=4.21.0",
"PyYAML>=6.0",
]
[project.optional-dependencies]
dev = [
"pytest>=8.4.2",
"pytest-asyncio>=1.2.0",
"pytest-cov>=6.0.0",
"pytest-xdist>=3.6.0",
"freezegun>=1.2.0",
"pytest-timeout>=2.2.0",
"respx>=0.22.0",
"ruff>=0.8.4",
"pyright>=1.1.391",
"fakeredis>=2.35.0",
"lupa>=2.8",
]
[dependency-groups]
dev = [
"aiosqlite>=0.21.0",
"pytest>=8.4.2",
"pytest-asyncio>=1.2.0",
"pytest-mock>=3.15.1",
"pytest-xdist>=3.6.0",
"respx>=0.23.1",
"fakeredis>=2.35.0",
"lupa>=2.8",
]
# ============================================================================
# Ruff Configuration (Linting & Formatting)
# ============================================================================
[tool.ruff]
target-version = "py311"
line-length = 100
src = ["app", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"SIM", # flake8-simplify
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults (FastAPI Depends)
]
[tool.ruff.lint.per-file-ignores]
# Tests legitimately set environment variables / monkey-patch sys.modules
# before importing the system under test, and use broad context managers
# to assert that arbitrary failure modes propagate.
"tests/**/*.py" = [
"E402", # module-level import not at top of file (env setup before import)
"B017", # assertRaises(Exception) (broad pytest.raises in tests)
"SIM117", # nested with statements (readability in mock setup)
]
[tool.ruff.lint.isort]
known-first-party = ["app"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
# ============================================================================
# Pytest Configuration
# ============================================================================
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
asyncio_default_test_loop_scope = "module"
# Ignore broken test files referencing moved/deleted modules
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
ignore = [
"tests/agent/tools/test_patch_file_tool.py",
"tests/containers/test_container_system.py",
"tests/containers/test_multi_user_containers.py",
]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"e2e: End-to-end tests",
"slow: Slow running tests",
"docker: Tests requiring Docker",
"kubernetes: Tests requiring Kubernetes",
"minikube: Tests requiring minikube cluster",
"mocked: Fully mocked tests (no containers required)",
"llm: Tests using real LLM (Llama-4-Maverick via LiteLLM)",
"deterministic: Determinism verification tests",
"oracle: Oracle tests (golden input/output verification)",
"oracle_agent: Agent oracle tests with scripted model responses",
"security: Security-related tests",
]
# ============================================================================
# Coverage Configuration
# ============================================================================
[tool.coverage.run]
source = ["app"]
omit = ["*/tests/*", "*/__pycache__/*", "*/alembic/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"if __name__ == .__main__.:",
]