-
Notifications
You must be signed in to change notification settings - Fork 3.3k
/
pyproject.toml
200 lines (181 loc) · 4.57 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
[project]
name = "semantic-kernel"
description = "Semantic Kernel Python SDK"
authors = [{ name = "Microsoft", email = "SK-Support@microsoft.com"}]
readme = "pip/README.md"
# Version read from __version__ field in __init__.py by Flit
dynamic = ["version"]
requires-python = ">=3.10,<3.13"
license = {file = "LICENSE"}
urls.homepage = "https://learn.microsoft.com/en-us/semantic-kernel/overview/"
urls.source = "https://github.com/microsoft/semantic-kernel/tree/main/python"
urls.release_notes = "https://github.com/microsoft/semantic-kernel/releases?q=tag%3Apython-1&expanded=true"
urls.issues = "https://github.com/microsoft/semantic-kernel/issues"
classifiers = [
"License :: OSI Approved :: MIT License",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Framework :: Pydantic :: 2",
"Typing :: Typed",
]
dependencies = [
"aiohttp ~= 3.8",
"pydantic ~= 2.0",
"pydantic-settings ~= 2.0",
"defusedxml ~= 0.7",
# embeddings
"numpy ~= 1.25.0; python_version < '3.12'",
"numpy ~= 1.26.0; python_version >= '3.12'",
# openai connector
"openai ~= 1.0",
# openapi and swagger
"openapi_core >= 0.18,<0.20",
# OpenTelemetry
"opentelemetry-api ~= 1.24",
"opentelemetry-sdk ~= 1.24",
"prance ~= 23.6.21.0",
# templating
"pybars4 ~= 0.9",
"jinja2 ~= 3.1",
"nest-asyncio ~= 1.6"
]
### Optional dependencies
[project.optional-dependencies]
azure = [
"azure-ai-inference >= 1.0.0b3",
"azure-search-documents >= 11.6.0b4",
"azure-identity ~= 1.13",
"azure-cosmos ~= 4.7"
]
chroma = [
"chromadb >= 0.4,<0.6"
]
google = [
"google-cloud-aiplatform ~= 1.60",
"google-generativeai ~= 0.7"
]
hugging_face = [
"transformers[torch] ~= 4.28",
"sentence-transformers ~= 2.2",
"torch == 2.2.2"
]
mongo = [
"motor ~= 3.3.2"
]
notebooks = [
"ipykernel ~= 6.29"
]
milvus = [
"pymilvus >= 2.3,<2.4",
"milvus >= 2.3,<2.3.8; platform_system != 'Windows'"
]
mistralai = [
"mistralai ~= 0.4"
]
ollama = [
"ollama ~= 0.2"
]
anthropic = [
"anthropic ~= 0.32"
]
pinecone = [
"pinecone-client ~= 5.0"
]
postgres = [
"psycopg[binary,pool] ~= 3.2"
]
qdrant = [
"qdrant-client ~= 1.9"
]
redis = [
"redis[hiredis] ~= 5.0",
"types-redis ~= 4.6.0.20240425"
]
usearch = [
"usearch ~= 2.9",
"pyarrow >= 12.0,<18.0"
]
weaviate = [
"weaviate-client >= 3.18,<5.0"
]
pandas = [
"pandas ~= 2.2"
]
[tool.uv]
prerelease = "if-necessary-or-explicit"
dev-dependencies = [
"pre-commit ~= 3.7",
"ipykernel ~= 6.29",
"nbconvert ~= 7.16",
"pytest ~= 8.2",
"pytest-xdist[psutil] ~= 3.6",
"pytest-cov >= 5.0",
"pytest-asyncio ~= 0.23",
"snoop ~= 0.4",
"mypy >= 1.10",
"types-PyYAML ~= 6.0.12.20240311",
"ruff ~= 0.5"
]
environments = [
"sys_platform == 'darwin'",
"sys_platform == 'linux'",
"sys_platform == 'win32'"
]
[tool.pytest.ini_options]
addopts = "-ra -q -r fEX"
[tool.ruff]
line-length = 120
target-version = "py310"
include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
preview = true
[tool.ruff.lint]
fixable = ["ALL"]
unfixable = []
select = [
"D", #pydocstyle checks
"E", #error checks
"F", #pyflakes checks
"I", #isort
"CPY", #copyright
"ISC", #implicit string concat
"INP", #implicit namespace package
"RSE", #raise exception parantheses check
"RET", #flake8-return check
"SIM", #flake8-simplify check
"TD", #todos
"FIX", #fixme checks
"ERA", #remove connected out code
"RUF" #RUF specific rules
]
ignore = [
"D100", #allow missing docstring in public module
"D104", #allow missing docstring in public package
"TD003", #allow missing link to todo issue
"FIX002" #allow todo
]
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
# Ignore all directories named `tests` and `samples`.
"tests/**" = ["D", "INP", "TD", "ERA001", "RUF"]
"samples/**" = ["D", "INP", "ERA001", "RUF"]
# Ignore all files that end in `_test.py`.
"*_test.py" = ["D"]
"*.ipynb" = ["CPY", "E501"]
[tool.ruff.lint.flake8-copyright]
notice-rgx = "^# Copyright \\(c\\) Microsoft\\. All rights reserved\\."
min-file-size = 1
[tool.bandit]
targets = ["semantic_kernel"]
exclude_dirs = ["tests"]
[tool.flit.module]
name = "semantic_kernel"
[build-system]
requires = ["flit-core >= 3.9,<4.0"]
build-backend = "flit_core.buildapi"