-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
158 lines (138 loc) · 3.51 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
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "rago"
version = "0.9.0" # semantic-release
description = "Rago is a lightweight framework for RAG"
readme = "README.md"
authors = ["Ivan Ogasawara <[email protected]>"]
packages = [
{include = "rago", from="src"},
]
license = "BSD 3 Clause"
exclude = [
".git/*",
".env*",
]
include = ["src/rago/py.typed"]
[tool.poetry.dependencies]
python = ">=3.9,<4"
typeguard = ">=4.0"
# https://github.com/kyamagu/faiss-wheels?tab=readme-ov-file#supporting-gpu-or-customized-build-configuration
faiss-cpu = ">=1.9.0"
sentencepiece = {version = ">=0.2.0"}
sentence-transformers = {version = ">=3.2.0"}
transformers = {version = ">=4"}
torch = [
{version = ">=2.5.0", markers="extra=='cpu' and extra!='gpu'", source="pytorch-cpu"},
{version = ">=2.5.0", markers="extra=='gpu' and extra!='cpu'"},
]
torchvision = [
{version = ">=0.20.0", markers="extra=='cpu' and extra!='gpu'", source="pytorch-cpu"},
{version = ">=0.20.0", markers="extra=='gpu' and extra!='cpu'"},
]
langdetect = ">=1"
openai = "^1.52.2"
google-generativeai = "^0.8.3"
pypdf = ">=5"
langchain = ">=0.3.7"
langchain-community = ">=0.3.7"
spacy = ">=3"
instructor = ">=1"
pydantic = ">=2"
[tool.poetry.extras]
cpu = ["torch", "torchvision"]
gpu = ["torch", "torchvision"]
[tool.poetry.group.dev.dependencies]
pytest = ">=7.3.2"
pytest-cov = ">=4.1.0"
coverage = ">=7.2.7"
pre-commit = ">=3.3.2"
ruff = ">=0.2.0"
mypy = ">=1.5.0"
bandit = ">=1.7.5"
vulture = ">=2.7"
mccabe = ">=0.6.1"
ipython = "<8"
ipykernel = ">=6.0.0"
Jinja2 = ">=3.1.2"
mkdocs = ">=1.4.3"
mkdocs-exclude = ">=1.0.2"
mkdocs-jupyter = ">=0.24.1"
mkdocs-literate-nav = ">=0.6.0"
mkdocs-macros-plugin = ">=0.7.0,<1"
mkdocs-material = ">=9.1.15"
mkdocstrings = ">=0.21.2"
mkdocstrings-python = ">= 1.1.2"
mkdocs-gen-files = ">=0.5.0"
makim = "1.19.0"
# 'PosixPath' object has no attribute 'endswith'
virtualenv = "<=20.25.1"
python-dotenv = ">=1.0"
# note: Version 3.7.1 requries spaCy >=3.7.2,<3.8.0
en-core-web-md = {url = "https://github.com/explosion/spacy-models/releases/download/en_core_web_md-3.7.1/en_core_web_md-3.7.1-py3-none-any.whl"}
[[tool.poetry.source]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
priority = "supplemental"
[[tool.poetry.source]]
name = "pytorch-gpu-cuda118"
url = "https://download.pytorch.org/whl/cu118"
priority = "supplemental"
[[tool.poetry.source]]
name = "pytorch-gpu-cuda121"
url = "https://download.pytorch.org/whl/cu121"
priority = "supplemental"
[tool.pytest.ini_options]
testpaths = [
"tests",
]
markers = [
"skip_on_ci: Skip these tests in CI",
]
[tool.bandit]
exclude_dirs = ["tests"]
targets = "./"
[tool.vulture]
exclude = ["tests"]
ignore_decorators = []
ignore_names = []
make_whitelist = true
min_confidence = 80
paths = ["./"]
sort_by_size = true
verbose = false
[tool.ruff]
line-length = 79
force-exclude = true
src = ["./"]
exclude = [
'docs',
]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
"D", # pydocstyle
"YTT", # flake8-2020
"RUF", # Ruff-specific rules
"I001", # isort
]
fixable = ["I001"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.isort]
# Use a single line between direct and from import
lines-between-types = 1
[tool.ruff.format]
quote-style = "single"
[tool.mypy]
python_version = "3.9"
check_untyped_defs = true
strict = true
ignore_missing_imports = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
exclude = ["scripts/"]