forked from Quansight/ragna
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
173 lines (152 loc) · 3.63 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
[build-system]
requires = [
"setuptools>=45",
"setuptools_scm[toml]>=6.2",
]
build-backend = "setuptools.build_meta"
[project]
name = "Ragna"
description = "RAG orchestration framework"
license = {file = "LICENSE"}
authors = [
{ name = "Ragna Development Team", email = "[email protected]" },
]
readme = "README.md"
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
requires-python = ">=3.9"
dependencies = [
"aiofiles",
"emoji",
"fastapi",
"httpx",
"httpx-sse",
"importlib_metadata>=4.6; python_version<'3.10'",
"packaging",
"panel==1.3.8",
"pydantic>=2",
"pydantic-core",
"pydantic-settings>=2",
"PyJWT",
"python-multipart",
"redis",
"questionary",
"rich",
"sqlalchemy>=2",
"sse-starlette",
"starlette",
"tomlkit",
"typer",
"uvicorn",
]
dynamic = ["version"]
[project.urls]
Homepage = "https://ragna.chat"
Documentation = "https://ragna.chat"
Changelog = "https://ragna.chat/en/latest/references/changelog/"
Repository = "https://github.com/Quansight/ragna"
[project.optional-dependencies]
# to update the array below, run scripts/update_optional_dependencies.py
all = [
"chromadb>=0.4.13",
"ijson",
"lancedb>=0.2",
"pyarrow",
"pymupdf>=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]
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.per-file-ignores]
# ignore unused imports and imports not at the top of the file in __init__.py files
"__init__.py" = ["F401", "E402"]
"*.ipynb" = ["E402"]
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra --tb=short"
testpaths = [
"tests",
]
filterwarnings = [
"error",
# This is coming from the nested dependency
# chromadb -> opentelemetry-exporter-otlp-proto-grpc -> googleapis-common-protos
# This will be resolved by https://github.com/googleapis/python-api-common-protos/pull/187
"ignore::DeprecationWarning:pkg_resources",
"ignore::DeprecationWarning:google.rpc",
]
xfail_strict = true
[tool.mypy]
files = "ragna"
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 = [
"docx",
"fitz",
"ijson",
"lancedb",
"param",
"pptx",
"pyarrow",
"sentence_transformers",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"ragna.deploy._api.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]]
# It is a fundamental feature of the components to request more parameters than the base
# class. Thus, we just silence mypy here.
module = [
"ragna.source_storages.*",
"ragna.assistants.*"
]
disable_error_code = [
"override",
]