-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpyproject.toml
More file actions
175 lines (159 loc) · 4.24 KB
/
pyproject.toml
File metadata and controls
175 lines (159 loc) · 4.24 KB
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
[project]
name = "llmwhisperer-client"
dynamic = ["version"]
description = "Client library for LLM Whisperer"
readme = "README.md"
urls = { Homepage = "https://unstract.com/llmwhisperer/", Source = "https://github.com/Zipstack/llm-whisperer-python-client" }
license = { text = "AGPL v3" }
authors = [{ name = "Zipstack Inc", email = "devsupport@zipstack.com" }]
keywords = ["llmwhisperer tools-development-kit apps development-kit sdk"]
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",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.12"
dependencies = ["requests>=2", "tenacity>=8.0"]
[dependency-groups]
test = [
"pytest>=8.2.2",
"pytest-mock>=3.14.0",
"pytest-dotenv>=0.5.2",
"pytest-cov>=5.0.0",
"pytest-md-report>=0.6.2",
]
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",
"poethepoet>=0.34.0",
]
[tool.poe.tasks]
test.cmd = "pytest -s -v"
test.envfile = "tests/.env"
test.help = "Runs pytests for LLM Whisperer client"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "src/unstract/llmwhisperer/__init__.py"
[tool.hatch.build.targets.wheel]
packages = ["src/unstract"]
#Added pyright to detect vertual environment in IDE.
[tool.pyright]
venvPath = "."
venv = ".venv"
# === Development tool configurations ===
[tool.ruff]
line-length = 120
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 = [
"D205",
"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
"D417", # Missing argument description in the docstring
"ANN101", # Missing type annotation for self
"ANN102", # Missing type annotation for cls
"N818",
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
docstring-code-format = true
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.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", "*_test.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"]