-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
218 lines (205 loc) · 6.47 KB
/
pyproject.toml
File metadata and controls
218 lines (205 loc) · 6.47 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
[project]
name = "qdash"
version = "0.1.0"
description = ""
authors = [
{name = "orangekame3", email = "oqtopus-team@googlegroups.com"}
]
readme = "README.md"
requires-python = ">=3.10,<3.13"
dependencies = [
"bunnet>=1.3.0",
"numpy>=1.26.0",
"pendulum>=3.1.0",
"pymongo>=4.8.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = [
"src",
"src/qdash",
"src/qdash/api",
"src/qdash/common",
"src/qdash/workflow",
"src/qdash/dbmodel",
"src/qdash/datamodel",
]
[tool.ruff]
line-length = 100
exclude = ["tools", "scripts"]
target-version = "py310"
lint.unfixable = ["F401"]
lint.select = [
"E", # pycodestyle errors
"F", # Pyflakes
"W", # pycodestyle warnings
"I", # isort
"B", # flake8-bugbear
"UP", # pyupgrade
"SIM", # flake8-simplify
"C4", # flake8-comprehensions
"RET", # flake8-return
"TCH", # flake8-type-checking
"PIE", # flake8-pie
"PERF", # perflint
"PLC", # pylint convention
"PLE", # pylint error
"PLW", # pylint warning
"RUF", # ruff-specific rules
"S", # flake8-bandit (security)
]
lint.ignore = [
"E501", # line-too-long (handled by formatter)
"B904", # raise-without-from-inside-except (TODO: fix in exception handling task)
"B008", # function-call-in-default-argument (FastAPI Depends pattern)
"UP038", # non-pep604-isinstance (requires manual fix)
"B007", # unused-loop-control-variable (minor style issue)
"B012", # return-in-finally (intentional in specific cases)
"B027", # empty-method-without-abstract-decorator (intentional default impl)
"RET505", # superfluous-else-return (style preference)
"RET506", # superfluous-else-raise (style preference)
"SIM102", # collapsible-if (readability preference)
"SIM108", # if-else-block-instead-of-if-exp (readability preference)
"PERF401", # manual-list-comprehension (readability over micro-optimization)
"PERF402", # manual-list-copy (readability over micro-optimization)
"PLW0603", # global-statement (used for singletons/caching)
"RUF003", # ambiguous-unicode-character-comment (Japanese comments)
"RUF012", # mutable-class-default (Pydantic models)
"S101", # assert (used for runtime checks)
]
[tool.ruff.lint.per-file-ignores]
"src/qdash/workflow/service/calib_service.py" = ["E402"] # Circular import avoidance
"src/qdash/workflow/paths.py" = ["F401"] # Re-exports for backward compatibility
"src/qdash/api/routers/auth.py" = ["S106"] # "bearer" is standard token type
"src/qdash/api/services/flow_service.py" = ["S603", "S607"] # ruff format subprocess call
"src/qdash/api/lib/topology_config.py" = ["S112"] # Skip invalid config files
"tests/**" = [
"ANN201",
"ANN205",
"ANN401",
"CPY001",
"D",
"PLC1901",
"PLR2004",
"PLR6301",
"S101",
"S106", # Test data passwords
"S108", # /tmp usage in tests is acceptable
"RUF002", # Japanese in docstrings
]
[tool.mypy]
strict = true
ignore_missing_imports = true
exclude = ["tools", "scripts", "user_flows"]
# Disable error codes for known issues:
# - misc: FastAPI untyped decorator warnings
# - override: Liskov substitution violations in calibtasks (design issue)
# - no-untyped-call: Calls to untyped external library functions
disable_error_code = ["misc", "override", "no-untyped-call", "redundant-cast"]
# Use explicit package bases to avoid src.qdash vs qdash conflicts
explicit_package_bases = true
mypy_path = "src"
plugins = ["pydantic.mypy"]
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
disallow_incomplete_defs = false
disallow_untyped_decorators = false
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
[tool.coverage.run]
source = ["src/qdash"]
omit = [
# Data models - primarily type definitions
"src/qdash/datamodel/*",
# Database models - document definitions
"src/qdash/dbmodel/*",
# API schemas - request/response models
"src/qdash/api/schemas/*",
# Auto-generated client code
"src/qdash/client/*",
# Internal service modules
"src/qdash/workflow/service/_internal/*",
# Worker tasks
"src/qdash/workflow/worker/*",
# Setup scripts
"src/qdash/workflow/setup_work_pool.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"@abstractmethod",
]
[dependency-groups]
api = [
"fastapi==0.111.1",
"uvicorn[standard]==0.34.0",
"gunicorn==22.0.0",
"python-dotenv==1.0.1",
"pymongo==4.8.0",
"bunnet==1.3.0",
"python-jose==3.4.0",
"passlib[bcrypt]==1.7.4",
"pyyaml==6.0.1",
"python-multipart==0.0.20",
"numpy>=1.26.0,<1.27.0",
"scipy",
"matplotlib>=3.8.0",
"networkx>=3.4.2",
"httpx>=0.27.0", # For deployment service communication
"ruff==0.5.5", # For auto-formatting saved flows
"gitpython>=3.1.44", # For Git operations in file router
"pendulum>=3.1.0", # For timestamp formatting in Git commits
"pydantic-settings>=2.0.0", # For Settings configuration
"reportlab>=4.4.1", # For PDF generation
"pandas>=2.0.0", # For copilot sandbox data analysis
"plotly>=5.18.0", # For chart generation
"kaleido>=0.2.1", # For Plotly image export
"pillow>=10.0.0", # For image processing
"croniter>=6.0.0", # For cron schedule parsing
"python-json-logger>=3.3.0", # For structured JSON logging
"openai>=1.0.0", # For copilot agent (LLM chat/analysis)
]
workflow = [
"pymongo==4.8.0",
"bunnet==1.3.0",
"slack-sdk==3.36.0",
"python-dotenv==1.0.1",
"numpy>=1.26.0,<1.27.0",
"matplotlib>=3.8.0,<4.0.0",
"pyyaml==6.0.1",
"qubex[backend]",
"filelock>=3.17.0",
"gitpython>=3.1.44",
"reportlab>=4.4.1",
"ruamel.yaml>=0.18.0",
]
dev = [
"ruff==0.5.5",
"pytest==8.3.2",
"pytest-cov==5.0.0",
"pytest-env==1.1.3",
"pytest-mypy==0.10.3",
"pytest-asyncio==0.24.0",
"pytest-mock==3.14.1",
"mongomock==4.1.2",
"go-task-bin>=3.41.0",
"pyyaml==6.0.1",
"types-pyyaml>=6.0.12.20250809",
"types-python-dateutil>=2.9.0.20250809",
"types-croniter>=6.0.0.20250809",
"types-requests>=2.32.0.20250809",
"setuptools>=80.9.0",
]
[tool.uv.sources]
qubex = { git = "https://github.com/amachino/qubex.git", tag = "v1.5.0b4" }