-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
150 lines (139 loc) · 3.16 KB
/
pyproject.toml
File metadata and controls
150 lines (139 loc) · 3.16 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
[project]
name = "query-genie"
authors = [
{name = "Michal Galuszka"},
]
version = "1.0.0"
description = "AI Chat Application with Strands Agents and PostgreSQL MCP Server"
requires-python = "==3.13.*"
dependencies = [
"python-dotenv==1.2.1",
"pydantic==2.12.5",
"pydantic-settings==2.12.0",
]
[dependency-groups]
backend = [
"fastapi==0.127.0",
"uvicorn==0.40.0",
"slowapi==0.1.9",
"redis==7.1.0",
"sse-starlette==3.0.4",
"Jinja2==3.1.6",
"httpx==0.28.1",
]
agent-service = [
"boto3==1.42.15",
"strands-agents[ollama,openai]==1.20.0",
"strands-agents-tools==0.2.18",
"mcp[cli]==1.25.0",
"redis==7.1.0",
"httpx==0.28.1",
]
mcp-server = [
"mcp==1.25.0",
"asyncpg==0.31.0",
"sqlparse==0.5.5",
]
dev = [
"pytest>=9.0.2",
"pytest-asyncio>=1.3.0",
"pytest-cov>=7.0.0",
"pytest-mock>=3.15.1",
"pytest-xdist>=3.8.0",
"mypy>=1.19.1",
"ruff>=0.14.10",
"rust-just>=1.45.0",
"bandit>=1.9.2",
"pip-audit>=2.10.0",
]
commit = ["commitizen>=4.10.1", "pre-commit>=4.5.1"]
# Tool configurations
[tool.bandit]
targets = ["Apps"]
severity = "all"
skips = ["B608"] # SQL injection - false positives on validated identifiers
exclude_dirs = [
"frontend/*",
"*/static/*",
"*/strands_sessions/*",
]
exclude = [
"*.js",
"*.jsx",
"*.tsx",
"*.ts",
"*.css",
"*.scss",
"*.svg",
"*.png",
"*.jpeg",
"*.jpg",
"*.txt",
"*.bat",
"*.sh",
]
[tool.ruff]
line-length = 88
target-version = "py313"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = ["E501"]
[tool.ruff.lint.isort]
known-first-party = ["src"]
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.mypy]
python_version = "3.13"
strict = true
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
disable_error_code = ["misc", "untyped-decorator", "no-untyped-call", "arg-type"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["backend/tests", "mcp_postgres/tests", "agent_service/tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
norecursedirs = ["__pycache__", ".git", ".venv"]
# Coverage options specified in just test tasks, not here
filterwarnings = [
"ignore::DeprecationWarning:strands.experimental.hooks",
]
addopts = [
"-v",
"--tb=short",
]
[tool.coverage.run]
# Source is specified per-module in just test tasks using --cov= flags
omit = [
"*/tests/*",
"*/__pycache__/*",
"*/.venv/*",
"*/__init__.py",
# Entry points and infrastructure files
"backend/src/app.py",
"backend/src/api/middleware.py",
"backend/src/api/rate_limit.py",
"backend/src/logging_config.py",
"mcp_postgres/src/server.py",
"mcp_postgres/src/core/logging_config.py",
"agent_service/src/main.py",
"agent_service/src/utils/logging_config.py",
"frontend/*",
]
[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = false
fail_under = 70