-
Notifications
You must be signed in to change notification settings - Fork 339
/
pyproject.toml
202 lines (179 loc) · 5.09 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
[build-system]
requires = [
"setuptools >= 67",
"wheel",
"gitpython",
"setuptools_scm[toml]>=6.2",
]
build-backend = "setuptools.build_meta"
[project]
name="pymilvus"
authors = [
{name='Milvus Team', email="[email protected]"},
]
requires-python = '>=3.8'
description = "Python Sdk for Milvus"
readme = "README.md"
dependencies=[
"setuptools>69",
"setuptools<70.1;python_version<='3.8'",
"grpcio>=1.49.1,<=1.67.1", #issue https://github.com/milvus-io/pymilvus/issues/2358
"protobuf>=3.20.0",
"python-dotenv>=1.0.1, <2.0.0",
"ujson>=2.0.0",
"pandas>=1.2.4",
"numpy<1.25.0;python_version<='3.8'",
"milvus-lite>=2.4.0;sys_platform!='win32'",
]
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
]
dynamic = ["version"]
[project.urls]
"repository" = 'https://github.com/milvus-io/pymilvus'
[project.optional-dependencies]
bulk_writer = [
"requests",
"minio>=7.0.0",
"pyarrow>=12.0.0",
"azure-storage-blob",
]
model = [
"milvus-model>=0.1.0",
]
dev = [
# The generated codes of 1.63.0 is incompatible with versions < 1.63.0,
# so we use fixed grpcio version to develop.
"grpcio==1.62.2",
"grpcio-tools==1.62.2",
"grpcio-testing==1.62.2",
"pytest>=5.3.4",
"pytest-cov>=2.8.1",
"pytest-timeout>=1.3.4",
"ruff>0.4.0",
"black",
]
[tool.setuptools.dynamic]
version = { attr = "_version_helper.version"}
[tool.setuptools_scm]
[tool.black]
line-length = 100
target-version = ['py38']
include = '\.pyi?$'
extend-ignore = ["E203", "E501"]
# 'extend-exclude' excludes files or directories in addition to the defaults
extend-exclude = '''
# A regex preceded with ^/ will apply only to files and directories
# in the root of the project.
(
^/foo.py # exclude a file named foo.py in the root of the project
| .*/grpc_gen/
)
'''
[tool.ruff]
lint.select = [
"E",
"F",
"C90",
"I",
"N",
"B", "C", "G",
"A",
"ANN001",
"S", "T", "W", "ARG", "BLE", "COM", "DJ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"
]
lint.ignore = [
"N818",
"DTZ", # datatime related
"BLE", # blind-except (BLE001)
"SLF", # SLF001 Private member accessed: `_fetch_handler` [E]
"PD003",
"TRY003", # [ruff] TRY003 Avoid specifying long messages outside the exception class [E] TODO
"PLR2004", # Magic value used in comparison, consider replacing 65535 with a constant variable [E] TODO
"TRY301", #[ruff] TRY301 Abstract `raise` to an inner function [E]
"FBT001", #[ruff] FBT001 Boolean positional arg in function definition [E] TODO
"FBT002", # [ruff] FBT002 Boolean default value in function definition [E] TODO
"PLR0911", # Too many return statements (15 > 6) [E]
"G004", # [ruff] G004 Logging statement uses f-string [E]
"S603", # [ruff] S603 `subprocess` call: check for execution of untrusted input [E]
"N802", #[ruff] N802 Function name `OK` should be lowercase [E] TODO
"PD011", # [ruff] PD011 Use `.to_numpy()` instead of `.values` [E]
"COM812",
"FBT003", # [ruff] FBT003 Boolean positional value in function call [E] TODO
"ARG002",
"E501", # black takes care of it
"ARG005", # [ruff] ARG005 Unused lambda argument: `disable` [E]
"TRY400",
"PLR0912", # TODO
"PLR0915", # To many statements TODO
"C901", # TODO
"PYI041", # TODO
"E402",
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
lint.fixable = [
"A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W",
"ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT",
"ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH",
"PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP",
"YTT",
]
lint.unfixable = []
show-fixes = true
# Exclude a variety of commonly ignored directories.
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",
"grpc_gen",
"__pycache__",
"pymilvus/client/stub.py",
"tests",
]
# Same as Black.
line-length = 100
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.7
target-version = "py37"
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 18
[tool.ruff.lint.pycodestyle]
max-doc-length = 100
[tool.ruff.lint.pylint]
max-args = 20
max-branches = 15
[tool.ruff.lint.flake8-builtins]
builtins-ignorelist = [
"format",
"next",
"object", # TODO
"id",
"dict", # TODO
"filter",
]