Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
165 lines (153 loc) · 4.33 KB
/
Copy pathpyproject.toml
File metadata and controls
165 lines (153 loc) · 4.33 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "alphamind"
version = "0.1.0"
description = "Autonomous LLM-powered swing trading system"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
# LLM
"claude-agent-sdk>=0.1.69",
# Database
"sqlalchemy[asyncio]>=2.0",
"alembic>=1.13",
# Configuration
"pyyaml>=6.0",
"ruamel.yaml>=0.18",
"pydantic>=2.0",
"python-dotenv>=1.0",
# Scheduling
"apscheduler>=3.11,<4",
"croniter>=2.0",
# Async HTTP / websockets
"httpx>=0.27",
"websockets>=13",
# Numerical
"numpy>=2.0",
"pandas>=2.2",
"scipy>=1.13",
"ta-lib>=0.5",
# Market calendar
"exchange-calendars>=4.5",
# Market data clients
"polygon-api-client>=1.14",
"alpaca-py>=0.32",
"finnhub-python>=2.4",
"fredapi>=0.5",
"openpyxl>=3.1.5",
# Command center backend
"fastapi>=0.115",
"uvicorn[standard]>=0.32",
"aiosqlite>=0.20",
"webauthn>=2.5",
]
[dependency-groups]
dev = [
"ruff>=0.7",
"mypy>=1.13",
"pytest>=8.3",
"pytest-asyncio>=0.24",
"pytest-cov>=6.0",
"pytest-xdist>=3.6",
"types-croniter>=2.0",
"types-jsonschema>=4.20",
"types-pyyaml>=6.0",
"types-requests>=2.32",
"import-linter>=2.0",
]
[tool.ruff]
line-length = 100
target-version = "py313"
extend-exclude = [".claude/worktrees", ".claude/skills"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"UP", # pyupgrade
"RUF", # ruff-specific
"DTZ", # tz-aware datetimes (critical for market data)
"ASYNC", # no blocking calls in async functions
"PD", # pandas-vet
"NPY", # numpy
"ERA", # eradicate commented-out code
"TRY", # tryceratops (exception antipatterns)
"SIM", # flake8-simplify
"RET", # flake8-return
"ARG", # unused arguments
"C90", # mccabe complexity
"PTH", # use pathlib
"A", # don't shadow builtins
"G", # logging format
"LOG", # flake8-logging
"N", # pep8-naming
"PIE", # flake8-pie
"FURB", # refurb modernization
"PLR0911", # too many return statements
"PLR0912", # too many branches
"PLR0913", # too many arguments
"PLR0915", # too many statements
]
ignore = [
"TRY003", # long messages outside exception class — too noisy
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.pylint]
max-args = 8
max-branches = 12
max-returns = 6
max-statements = 50
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"PLR2004", # magic numbers fine in tests
"ARG", # fixtures often appear unused at signature
"PLR0913", # test builders that mirror vendor API field structure exceed 8 args
]
"tests/analysis/qualitative_research/test_parser.py" = [
"E501", # verbatim fixture strings from the prompt spec cannot be wrapped
"RUF001", # verbatim fixture strings may contain Unicode dashes from the spec
]
"tests/analysis/adaptive_research/test_parser.py" = [
"E501", # verbatim fixture strings from the prompt spec cannot be wrapped
"RUF001", # verbatim fixture strings contain Unicode chars (σ, ×, em-dash) from the spec
]
"src/alphamind/risk_guardrails/guardrail_evaluation/rules/*.py" = [
"ARG001", # rule callbacks conform to a uniform RuleSpec interface; some rules
# don't use every parameter (e.g., config is unused by most contribute
# functions, dae is unused by helper-only rules). The 4-arg shape is
# the deliberate contract enforced by RuleSpec, not accidental.
]
[tool.ruff.format]
[tool.mypy]
python_version = "3.13"
strict = true
warn_unused_ignores = true
files = ["src", "tests", "scripts"]
[[tool.mypy.overrides]]
module = [
"talib.*",
"finnhub.*",
"fredapi.*",
"alpaca.*",
"polygon.*",
"exchange_calendars.*",
"apscheduler.*",
"alphamind.*",
"pandas.*",
]
ignore_missing_imports = true
[tool.hatch.build.targets.wheel]
packages = ["src/alphamind"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
addopts = "--strict-markers --strict-config"
xfail_strict = true
markers = [
"e2e: live SDK + database integration tests; gated on RUN_LIVE_LLM_TESTS=1.",
]