Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
188 lines (175 loc) · 5.9 KB
/
Copy pathpyproject.toml
File metadata and controls
188 lines (175 loc) · 5.9 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
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "openrag"
version = "0.5.0"
description = "OpenRAG is a comprehensive Retrieval-Augmented Generation platform that enables intelligent document search and AI-powered conversations."
readme = "README.md"
requires-python = ">=3.13"
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"agentd>=0.8.7",
"aiofiles>=24.1.0",
"authlib>=1.8.0,<2.0.0",
"aiohttp>=3.14.1",
"cryptography>=48.0.1",
"click>=8.3.3",
"google-api-python-client>=2.143.0",
"google-auth-httplib2>=0.2.0",
"httplib2>=0.32.0",
"google-auth-oauthlib>=1.2.0",
"msal>=1.29.0",
"httpx>=0.27.0",
"idna>=3.18",
"opensearch-py[async]>=3.0.0",
"pyjwt>=2.15.1",
"python-multipart>=0.0.31",
"fastapi>=0.115.0",
"starlette>=1.6.0",
"uvicorn>=0.35.0",
"boto3>=1.35.0",
"ibm-cos-sdk>=2.13.0",
"azure-storage-blob>=12.20.0",
"psutil>=7.0.0",
"rich>=13.0.0",
"textual>=0.45.0",
"python-dotenv>=1.0.0",
"textual-fspicker>=0.6.0",
"structlog>=25.4.0",
"zxcvbn>=4.5.0",
"prometheus-fastapi-instrumentator>=8.0.0",
"litellm>=1.105.0,<2.0.0",
"joserfc>=1.7.3,<2.0.0",
"pyyaml>=6.0",
"tiktoken>=0.7.0",
"fastmcp>=3.4.0",
"mcp>=1.30.0",
"openai>=2.24.0,<3",
"tenacity>=9.1.4",
"pygments>=2.20.0",
"pyasn1>=0.6.4",
"protobuf>=7.35.0,<8",
"requests>=2.33.0",
"urllib3>=2.8.0",
"fsspec>=2026.6.0",
"sqlmodel>=0.0.22",
"sqlalchemy[asyncio]>=2.0.36",
"aiosqlite>=0.20.0",
"alembic>=1.13.0",
"asyncpg>=0.30.0",
"cachetools>=5.5.0",
]
# Optional extras. Install with `uv sync --extra <name>`.
[project.optional-dependencies]
# IBM Instana APM tracer. Optional because the feature is opt-in at runtime
# (INSTANA_ENABLED, default false) and the tracer monkey-patches httpx,
# opensearch-py, sqlalchemy, starlette, fastapi, and logging at import time —
# not something to install on every OSS deployment that will never enable it.
# The upper bound is deliberate for the same reason: a major release of a
# library that rewrites the runtime behaviour of the whole HTTP/DB stack should
# be adopted explicitly, not resolved into an install.
# src/main.py imports it defensively, so its absence downgrades to a warning.
apm = ["instana>=3.17.0,<4"]
tracing = [
"langfuse>=4.16,<5",
]
[dependency-groups]
dev = [
"pytest>=9.0.3",
"pytest-asyncio>=0.21.0",
"pytest-mock>=3.12.0",
"pytest-cov>=4.0.0",
"ruff>=0.15.12",
"mypy>=2.0.0",
# The tracing extra, so its unit tests (tests/unit/observability) run.
"langfuse>=4.16,<5",
# Used by the Langflow Split Text component, so its unit tests run the real splitter.
"langchain-text-splitters>=1.1.2,<2",
]
[project.scripts]
openrag = "tui.main:run_tui"
[tool.pytest.ini_options]
filterwarnings = [
"error::RuntimeWarning",
]
markers = [
"openrag_skip_app_onboard: selected tests manage their own infrastructure clients and do not need the session app onboarding fixture",
]
[tool.uv]
package = true
override-dependencies = ["python-dotenv>=1.1.0"]
# Ruff and mypy run only against files changed in a PR (see
# .github/workflows/lint-backend.yml). The configs below stay
# intentionally minimal — broad enforcement is out of scope for the
# refactor that introduced them.
[tool.ruff]
line-length = 100
target-version = "py312"
exclude = ["flows/components"]
[tool.ruff.lint]
select = ["E", "F", "I", "B", "UP"]
ignore = ["E501"] # line-length handled by formatter
# FastAPI's idiomatic dependency-injection pattern uses `Depends(...)` and
# our `require_permission(...)` as call expressions in default-argument
# position. B008 flags these as bugs ("function call in argument default")
# but for FastAPI they are by design — the framework introspects them at
# request time. Whitelist the call sites instead of sprinkling noqa
# comments across every handler.
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = [
"fastapi.Depends",
"fastapi.Query",
"fastapi.Path",
"fastapi.Body",
"fastapi.Header",
"fastapi.Cookie",
"fastapi.File",
"fastapi.Form",
"fastapi.Security",
"dependencies.require_permission",
"dependencies.require_all_permissions",
"dependencies.require_api_key_permission",
]
# `bootstrap` must be the first import in any module that uses it
# (it loads .env and configures structlog before anything else can
# read env vars or emit logs). Define it as its own isort section
# placed above standard-library so the formatter never re-sorts it
# below other imports.
[tool.ruff.lint.isort]
section-order = [
"future",
"bootstrap",
"standard-library",
"third-party",
"first-party",
"local-folder",
]
[tool.ruff.lint.isort.sections]
bootstrap = ["bootstrap"]
[tool.mypy]
python_version = "3.13"
ignore_missing_imports = true
no_strict_optional = true
warn_unused_ignores = true
exclude = ["flows/components"]
# FastAPI handlers in these modules declare a Pydantic response model as
# their return type but legitimately return `JSONResponse(...)` on error
# paths. The runtime accepts both, but the annotation can't be widened to
# `SomeResponse | JSONResponse` because FastAPI then tries to derive an
# OpenAPI schema from the union and fails. Suppress only the resulting
# return-value mismatches in these files.
[[tool.mypy.overrides]]
module = ["api.settings.endpoints", "api.v1.settings"]
disable_error_code = ["return-value"]