forked from Quansight/ragna
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
174 lines (153 loc) · 3.67 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
[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",
"importlib_metadata>=4.6; python_version<'3.10'",
"packaging",
"panel==1.4.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.4.13",
"httpx_sse",
"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.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"
testpaths = [
"tests",
]
filterwarnings = [
"error",
"ignore::ResourceWarning",
# https://github.com/lancedb/lancedb/issues/1296
"ignore:Function 'semver.parse_version_info' is deprecated: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 = [
"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",
]