-
Notifications
You must be signed in to change notification settings - Fork 23
/
pyproject.toml
185 lines (164 loc) · 4.13 KB
/
pyproject.toml
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
[build-system]
requires = [
"setuptools>=64",
"setuptools_scm[toml]>=8",
]
build-backend = "setuptools.build_meta"
[project]
name = "Ragna"
description = "RAG orchestration framework"
license = {file = "LICENSE"}
authors = [
{ name = "Ragna Development Team", email = "connect@quansight.com" },
]
readme = "README.md"
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
requires-python = ">=3.10"
dependencies = [
"aiofiles",
"emoji",
"fastapi",
"httpx",
"packaging",
"panel[fastapi]==1.5.4",
"pydantic>=2",
"pydantic-core",
"pydantic-settings>=2",
"PyJWT",
"python-multipart",
"questionary",
"rich",
"sqlalchemy>=2",
"starlette",
"tomlkit",
"typer",
"uvicorn",
]
dynamic = ["version"]
[project.urls]
Homepage = "https://ragna.chat"
Documentation = "https://ragna.chat"
Changelog = "https://ragna.chat/en/stable/references/release-notes/"
Repository = "https://github.com/Quansight/ragna"
[project.optional-dependencies]
# to update the array below, run scripts/update_optional_dependencies.py
all = [
"chromadb<=0.5.11,>=0.4.13",
"httpx_sse",
"ijson",
"lancedb>=0.2",
"pyarrow",
"pymupdf<=1.24.10,>=1.23.6",
"python-docx",
"python-pptx",
"tiktoken",
]
[tool.setuptools_scm]
write_to = "ragna/_version.py"
version_scheme = "release-branch-semver"
local_scheme = "node-and-timestamp"
[project.scripts]
ragna = "ragna.__main__:app"
[tool.setuptools.packages.find]
include = [
"ragna*",
]
[tool.ruff.lint]
select = [
"E",
"F",
# import sorting
"I001"
]
# Ignore line too long, because due to black, the error can only occur for strings
ignore = ["E501"]
[tool.ruff.lint.per-file-ignores]
# ignore unused imports and imports not at the top of the file in __init__.py files
"__init__.py" = ["F401", "E402"]
# The examples often have imports below the top of the file to follow the narrative
"docs/examples/**/*.py" = ["E402", "F704", "I001"]
"docs/tutorials/**/*.py" = ["E402", "F704", "I001"]
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra --tb=short --asyncio-mode=auto --ignore tests/deploy/ui"
asyncio_default_fixture_loop_scope = "function"
testpaths = [
"tests",
]
filterwarnings = [
"error",
"ignore::ResourceWarning",
# https://github.com/lancedb/lancedb/issues/1296
"ignore:Function 'semver.parse_version_info' is deprecated:DeprecationWarning",
# chromadb -> opentelemetry -> google
"ignore:Type google._upb._message:DeprecationWarning",
# chromadb
"ignore:Python 3.14 will:DeprecationWarning"
]
xfail_strict = true
[tool.mypy]
files = "ragna"
plugins = [
"sqlmypy",
]
show_error_codes = true
pretty = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
allow_redefinition = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_unused_configs = true
[[tool.mypy.overrides]]
module = [
"ragna.deploy._ui.*",
]
disallow_untyped_calls = false
disallow_untyped_defs = false
disallow_incomplete_defs = false
[[tool.mypy.overrides]]
module = [
# FIXME: the package should be typed
"bokeh_fastapi",
"bokeh_fastapi.handler",
"docx",
"fitz",
"ijson",
"lancedb",
"param",
"pptx",
"pyarrow",
"sentence_transformers",
"traitlets",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"ragna.deploy._orm",
]
# Our ORM schema doesn't really work with mypy. There are some other ways to define it
# to play ball. We should do that in the future.
disable_error_code = [
"var-annotated",
]
[[tool.mypy.overrides]]
# 1. We automatically handle user-defined sync and async methods
# 2. It is a fundamental feature of the RAG components to request more parameters than
# the base class.
# Thus, we just silence mypy where it would complain about the points above.
module = [
"ragna.deploy._auth",
"ragna.source_storages.*",
"ragna.assistants.*"
]
disable_error_code = [
"override",
]