-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy pathpyproject.toml
More file actions
182 lines (161 loc) · 5.17 KB
/
Copy pathpyproject.toml
File metadata and controls
182 lines (161 loc) · 5.17 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
[tool.ruff]
# description of all rules are available on https://docs.astral.sh/ruff/rules/
lint.select = ["D", "E", "F", "W", "C", "S", "I", "G", "TCH", "SLOT", "RUF", "C90", "N", "YTT", "ASYNC", "A", "C4", "T10", "FURB", "PERF", "AIR", "NPY", "FLY", "PLW2901"]
# we need to check 'mood' of all docstrings, this needs to be enabled explicitly
lint.extend-select = ["D401"]
lint.ignore = []
# always generate Python 3.12-compatible code.
target-version = "py312"
lint.pydocstyle.convention = "google"
line-length = 100
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]
"scripts/*" = ["S101"]
[tool.hatch.version]
path = "ols/version.py"
[tool.hatch.metadata]
allow-direct-references = true
[tool.coverage.run]
source = ["ols", "runner"]
omit = [".venv/*"]
[tool.coverage.report]
# unit tests fails if the total coverage measurement is under this threshold value
fail_under = 90
[tool.mypy]
disable_error_code = ["union-attr", "return-value", "arg-type", "import-untyped"]
ignore_missing_imports = true
plugins = ["pydantic.mypy"]
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.bandit]
skips = ["B101", "B105", "B108", "B311", "B404", "B603", "B607", "B615"]
exclude_dirs = [
"tests",
"scripts",
".venv",
"embeddings_model",
"eval",
"local_testing",
]
[dependency-groups]
dev = [
"black>=25.1.0",
"pydocstyle>=6.3.0",
"mypy>=1.17.0",
"packaging>=24.1",
"pytest>=8.3.2",
"pytest-cov>=5.0.0",
"pytest-asyncio>=0.24.0",
"pydantic>=2.9.2",
"ruff>=0.8.0",
"bandit>=1.7.9",
"types-requests>=2.32.0.20240622",
"gradio>=4.44.1",
"boto3>=1.34.145",
"pyroscope-io>=0.8.8",
"memray>=1.15.0",
"pytest-benchmark[histogram]>=4.0.0",
"typing-extensions>=4.12.2",
"pytest-subtests>=0.13.1",
"build>=1.2.2.post1",
"twine>=5.1.1",
"pylint>=3.3.2",
"pybuild-deps>=0.5.0",
]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.uv.sources]
torch = { index = "pytorch-cpu" }
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "ols"
dynamic = ["version"]
description = "OpenShift Lightspeed is an AI powered assistant that runs on OpenShift and provides answers to product questions using backend LLM services."
authors = []
# NOTE: langchain bumps causes mypy issues
dependencies = [
# CVE-2026-69243 / CVE-2026-69244: RHOAI index still on 3.14.1
"aiohttp>=3.14.3",
"aiostream>=0.7.0",
"httpx>=0.28.0",
"fastapi>=0.115.6",
"langchain>=0.3.12",
"langchain-ibm>=0.3.2",
"llama-index>=0.12.25",
"llama-index-core>=0.12.44",
# CVE-2026-61536: RCE via unsafe tool import_path; RHOAI index still on 2.4.2
"banks>=2.4.3",
"llama-index-vector-stores-faiss>=0.3.0",
"llama-index-embeddings-huggingface>=0.4.0",
# CVE-2026-68770: RCE via trust_remote_code bypass; RHOAI index still on 5.2.0
"sentence-transformers>=5.6.0",
"uvicorn>=0.32.1",
"faiss-cpu>=1.9.0.post1",
"openai>=1.54.3",
"langchain-openai>=0.2.9",
"langchain-google-genai>=4.0.0",
"langchain-google-vertexai>=2.1.0",
"langchain-aws>=1.6.0",
"httpx-aws-auth>=4.2.0",
"anthropic>=0.40.0",
"pydantic>=2.9.2",
"setuptools>=72.1.0",
"prometheus-client>=0.20.0",
# do not upgrade kubernetes to version 34.1.0 before this is resolved
# https://github.com/kubernetes-client/python/issues/2460
"kubernetes<34.1.0",
"psycopg2-binary>=2.9.9",
"azure-identity>=1.18.0",
"langchain-community>=0.3,<0.4",
"sqlalchemy>=2.0.35",
"ibm-watsonx-ai>=1.3.6",
"certifi>=2024.8.30",
"cryptography>=44.0.1",
"urllib3>=2.7.0",
"zipp>=3.20.1",
"jinja2>=3.1.6",
"starlette>=1.0.1",
"virtualenv>=20.28.0",
"requests>=2.32.2",
"transformers>=4.50.3",
"langchain-mcp-adapters>=0.2.1",
"mcp>=1.23.0",
"qdrant-client>=1.13.3", # For ToolsRAG vector storage (pure Python, no Rust/Cargo)
"rank-bm25>=0.2.2", # For ToolsRAG sparse retrieval
"python-frontmatter>=1.1.0,<1.3.0", # For parsing skill YAML frontmatter; <1.3.0 avoids uv-build backend
"opentelemetry-api>=1.20.0",
"opentelemetry-sdk>=1.20.0", # For audit tracing
"opentelemetry-exporter-otlp-proto-grpc>=1.20.0", # For OTLP span export
"torch>=2.10.0",
]
requires-python = ">=3.12,<3.13"
readme = "README.md"
license = {file = "LICENSE"}
[project.urls]
Homepage = "https://github.com/openshift/lightspeed-service"
Issues = "https://github.com/openshift/lightspeed-service/issues"
[project.optional-dependencies]
evaluation = [
"scikit-learn>=1.6.1",
"pandas>=2.1.4",
"matplotlib>=3.10.0",
"rouge-score>=0.1.2",
"ragas>=0.3.0",
"datasets>=3.0.0",
"fastparquet>=2024.11.0",
"tqdm>=4.67.1",
]
lseval = [
"lightspeed-evaluation @ git+https://github.com/lightspeed-core/lightspeed-evaluation.git@v0.4.0",
]
[tool.hatch.build.targets.wheel]
packages = ["ols"]
[tool.pylint."MESSAGES CONTROL"]
good-names = ["e"]
disable = ["C0301", "C0302", "E0602", "E0611", "E1101", "R0902", "R0903", "R0913", "R0914", "W0102", "W0212", "W0511", "W0613", "W0621", "W0707", "W0718", "W0719", "R0801", "R0917"]