-
Notifications
You must be signed in to change notification settings - Fork 15
/
pyproject.toml
155 lines (137 loc) · 3.89 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
[build-system]
requires = [
"setuptools >= 67",
"wheel",
"gitpython",
"setuptools_scm[toml] >= 6.2",
]
build-backend = "setuptools.build_meta"
[project]
name = "milvus-model"
authors = [
{name = "Milvus Team", email = "[email protected]"},
]
requires-python = ">=3.8"
description = "Model components for PyMilvus, the Python SDK for Milvus"
readme = "README.md"
dependencies = [
"transformers >= 4.36.0",
"onnxruntime",
"scipy >= 1.10.0",
"protobuf",
"numpy"
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
]
dynamic = ["version"]
[project.urls]
repository = "https://github.com/milvus-io/milvus-model" # Update the repository URL
[tool.setuptools.dynamic]
version = { attr = "_version_helper.version" }
[tool.setuptools_scm]
[tool.black]
line-length = 100
target-version = ['py37']
include = '\.pyi?$'
extend-ignore = ["E203", "E501"]
[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
"C901", # TODO
"PYI041", # TODO
]
# 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",
]