-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
166 lines (149 loc) · 4.62 KB
/
Copy pathpyproject.toml
File metadata and controls
166 lines (149 loc) · 4.62 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
[project]
name = "sentinel"
version = "0.0.0"
description = "AI on-call copilot — ingests alerts, assembles context, produces evidence-cited diagnoses."
readme = "README.md"
requires-python = ">=3.12,<3.13"
license = { text = "Apache-2.0" }
authors = [{ name = "Arik Levinsky" }]
keywords = ["incident-response", "ai", "on-call", "diagnosis", "observability", "pgvector"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.12",
"Topic :: System :: Monitoring",
]
dependencies = [
"fastapi>=0.115,<0.116",
"uvicorn[standard]>=0.32,<0.33",
"pydantic>=2.9,<3",
"pydantic-settings>=2.6,<3",
"sqlalchemy[asyncio]>=2.0.36,<2.1",
"asyncpg>=0.30,<0.31",
"alembic>=1.14,<1.15",
"redis>=5.2,<5.3",
"aiokafka>=0.12,<0.13",
"anthropic>=0.39,<0.40",
"httpx>=0.27,<0.28",
"structlog>=24.4,<25",
"prometheus-client>=0.21,<0.22",
"opentelemetry-sdk>=1.28,<2",
"opentelemetry-exporter-otlp-proto-grpc>=1.28,<2",
"opentelemetry-instrumentation-fastapi>=0.49b0,<1",
"pyyaml>=6.0.2,<7",
"pgvector>=0.3.0,<0.4.0",
"fastembed>=0.4,<0.5",
]
[project.optional-dependencies]
dev = [
"pytest>=8.3,<9",
"pytest-asyncio>=0.24,<0.25",
"pytest-cov>=6.0,<7",
"ruff>=0.8,<0.9",
"mypy>=1.13,<2",
"testcontainers[postgres,redis,kafka]>=4.8,<5",
"fakeredis>=2.20,<3.0",
"hypothesis>=6.100,<7.0",
"locust>=2.32,<3",
"toxiproxy-python>=0.1,<1.0",
"types-pyyaml>=6.0,<7",
"pre-commit>=4,<5",
]
[project.urls]
Homepage = "https://github.com/JumpTechCode/Sentinel"
Repository = "https://github.com/JumpTechCode/Sentinel"
Issues = "https://github.com/JumpTechCode/Sentinel/issues"
[project.scripts]
sentinel-api = "sentinel.api.app:run"
[build-system]
requires = ["setuptools>=75", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
include = ["sentinel*"]
[tool.setuptools.package-data]
# The non-editable wheel (the Docker image) must ship the versioned diagnosis
# prompt + its integrity baseline; setuptools includes only *.py by default, so
# without this the image crashes at PromptBundle.load. The eval corpus/cassettes
# are deliberately NOT packaged — they are dev/CI-only and run from the source
# tree, never from the installed wheel.
"sentinel.diagnosis" = ["prompts/*.md", "prompts/*.sha256"]
[tool.ruff]
line-length = 100
target-version = "py312"
src = ["sentinel", "tests"]
[tool.ruff.lint]
select = [
"E", "F", "W",
"I",
"B",
"UP",
"SIM",
"TID",
"RUF",
"ASYNC",
"S",
"RET",
"PIE",
"PERF",
]
ignore = [
"E501",
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["B011", "SIM", "S101", "S105", "S106"]
[tool.ruff.lint.flake8-bugbear]
# FastAPI's Query/Path/Body/Depends/etc. in argument defaults are the idiomatic
# pattern, not accidental mutable-default calls. Whitelist them so B008 still
# catches genuine function-call-in-default bugs everywhere else.
extend-immutable-calls = [
"fastapi.Query",
"fastapi.Path",
"fastapi.Body",
"fastapi.Header",
"fastapi.Cookie",
"fastapi.Form",
"fastapi.File",
"fastapi.Depends",
"fastapi.Security",
]
[tool.ruff.format]
quote-style = "double"
[tool.mypy]
python_version = "3.12"
strict = true
warn_unreachable = true
warn_redundant_casts = true
warn_unused_ignores = true
no_implicit_reexport = true
show_error_codes = true
files = ["sentinel", "tests"]
plugins = ["pydantic.mypy"]
[[tool.mypy.overrides]]
module = ["aiokafka.*", "asyncpg.*", "testcontainers.*", "locust.*", "pgvector.*", "fastembed.*", "toxiproxy.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = "-ra --strict-markers --strict-config --cov=sentinel --cov-report=term-missing --cov-report=xml"
asyncio_mode = "auto"
testpaths = ["tests"]
markers = [
"integration: requires docker-compose services (postgres, redis, kafka)",
"load: locust-driven load test; excluded from default and PR CI (run via `make load`)",
"chaos: toxiproxy / fault-injection resilience test; excluded from default and PR CI (run via `make chaos`)",
]
filterwarnings = [
"error::DeprecationWarning",
"error::PendingDeprecationWarning",
# testcontainers uses a deprecated @wait_container_is_ready decorator internally;
# filter it at module level since it fires on import, not in our code.
"ignore::DeprecationWarning:testcontainers",
# huggingface_hub uses a deprecated hf_xet.download_files() call internally;
# this is a third-party library issue, not our code.
"ignore::DeprecationWarning:huggingface_hub",
]
[tool.coverage.run]
source = ["sentinel"]
branch = true
[tool.coverage.report]
fail_under = 80
show_missing = true