-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
227 lines (208 loc) · 6.01 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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
[project]
name = "unstract-sdk"
dynamic = ["version"]
description = "A framework for writing Unstract Tools/Apps"
readme = "README.md"
urls = { Homepage = "https://unstract.com", "Release notes" = "https://github.com/Zipstack/unstract-sdk/releases", Source = "https://github.com/Zipstack/unstract-sdk" }
license = { text = "AGPL v3" }
authors = [{ name = "Zipstack Inc", email = "[email protected]" }]
keywords = ["unstract tools-development-kit apps development-kit sdk"]
requires-python = ">=3.9, <3.13"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
# Specs and validation
"jsonschema~=4.18.2",
"python-magic~=0.4.27",
"python-dotenv==1.0.0",
# Adapter changes
"llama-index==0.12.8",
"tiktoken~=0.9.0",
"transformers==4.37.0",
"llama-index-embeddings-google==0.3.0",
"llama-index-embeddings-azure-openai==0.3.0",
# Disabling Hugging Face & FastEmbed to
# keep the image size under check
# "llama-index-embeddings-huggingface==0.2.0",
# Disabling fast embed due to high processing power
# "llama-index-embeddings-fastembed==0.1.4",
"llama-index-embeddings-openai==0.3.1",
"llama-index-embeddings-ollama==0.5.0",
"llama-index-embeddings-bedrock==0.5.0",
"llama-index-embeddings-vertex==0.3.1",
"llama-index-vector-stores-postgres==0.4.1",
# Including Supabase conflicts with postgres on pg-vector.
# Hence, commenting it out at the moment
# "llama-index-vector-stores-supabase==0.1.3",
"llama-index-vector-stores-milvus==0.4.0",
"llama-index-vector-stores-weaviate==1.3.1",
"llama-index-vector-stores-pinecone==0.4.2",
"llama-index-vector-stores-qdrant==0.4.2",
"llama-index-llms-openai==0.3.25",
"llama-index-llms-palm==0.3.0",
"llama-index-llms-mistralai==0.3.1",
"mistralai==1.2.5",
"llama-index-llms-anyscale==0.3.0",
"llama-index-llms-anthropic==0.6.10",
"llama-index-llms-azure-openai==0.3.1",
"llama-index-llms-vertex==0.4.2",
"llama-index-llms-replicate==0.4.0",
"llama-index-llms-ollama==0.5.0",
"llama-index-llms-bedrock==0.3.3",
# For Llama Parse X2Text
"llama-parse==0.5.19",
# OCR
"filetype~=1.2.0",
# Others
# For singleton classes
"singleton-decorator~=1.0.0",
"httpx>=0.25.2",
"pdfplumber>=0.11.2",
"redis>=5.2.1",
"llmwhisperer-client>=2.2.1",
]
[project.optional-dependencies]
aws = ["s3fs[boto3]~=2024.10.0", "boto3~=1.34.131"]
gcs = ["gcsfs~=2024.10.0"]
azure = ["adlfs~=2024.7.0"]
[dependency-groups]
dev = [
"docutils~=0.20.1",
"mypy~=1.2.0",
"pre-commit~=3.3.1",
"yamllint>=1.35.1",
"ruff<1.0.0,>=0.2.2",
"pytest>=8.0.1",
"pycln>=2.5.0",
]
docs = ["lazydocs~=0.4.8"]
test = [
"parameterized==0.9.0",
"pytest==8.3.3",
"pytest-mock==3.14.0",
"gcsfs==2024.10.0",
"s3fs==2024.10.0",
"adlfs~=2024.7.0",
]
[project.scripts]
unstract-tool-gen = "unstract.sdk.scripts.tool_gen:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "src/unstract/sdk/__init__.py"
[tool.hatch.build.targets.wheel]
packages = ["src/unstract"]
# === Development tool configurations ===
[tool.ruff]
line-length = 90
target-version = "py312"
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle (formatting)
"F", # Pyflakes (static analysis)
"I", # isort (import sorting)
"B", # bugbear (security/performance)
"W", # warnings
"C90", # mccabe complexity
"N", # pep8-naming
"D", # pydocstyle
"UP", # pyupgrade
"ANN", # flake8-annotations
"TCH", # flake8-type-checking
"PYI", # flake8-pyi
]
fixable = ["ALL"]
ignore = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D104", # Missing docstring in public package
"D103", # Missing docstring in public function
"D106", # Missing docstring in public nested class
"ANN101", # Missing type annotation for self
"ANN102", # Missing type annotation for cls
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
docstring-code-format = true
[tool.ruff.mccabe]
max-complexity = 10
[tool.ruff.pydocstyle]
convention = "google"
[tool.pycln]
all = true
expand-stars = true
no-gitignore = false
verbose = true
[tool.pyupgrade]
keep-runtime-typing = true
py39-plus = true
keep-dict-typing = true
[tool.pytest.ini_options]
python_files = ["tests.py", "test_*.py", "*_tests.py"]
testpaths = ["tests"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration (deselect with '-m \"not integration\"')",
]
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = false
no_implicit_optional = true
strict_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
allow_untyped_globals = false
allow_redefinition = false
local_partial_types = true
implicit_reexport = true
follow_imports = "silent"
ignore_missing_imports = true
pretty = true
show_column_numbers = true
show_error_codes = true
exclude = ["venv", ".venv"]
[tool.yamllint]
relaxed = true