@@ -27,27 +27,32 @@ urls = { homepage = "https://github.com/neuralmagic/guidellm" }
27
27
dependencies = [
28
28
" click" ,
29
29
" datasets" ,
30
+ " ftfy>=6.0.0" ,
30
31
" loguru" ,
31
32
" numpy" ,
32
33
" openai" ,
33
34
" pydantic>=2.0.0" ,
34
35
" pydantic-settings>=2.0.0" ,
35
36
" pyyaml>=6.0.0" ,
36
37
" requests" ,
38
+ " rich" ,
37
39
" transformers" ,
38
40
]
39
41
40
42
[project .optional-dependencies ]
41
43
dev = [
42
44
# general and configurations
43
45
" pre-commit~=3.5.0" ,
46
+ " scipy~=1.10" ,
44
47
" sphinx~=7.1.2" ,
45
48
" tox~=4.16.0" ,
46
49
47
50
# testing
48
51
" pytest~=8.2.2" ,
52
+ " pytest-asyncio~=0.23.8" ,
49
53
" pytest-cov~=5.0.0" ,
50
54
" pytest-mock~=3.14.0" ,
55
+ " pytest-rerunfailures~=14.0" ,
51
56
" requests-mock~=1.12.1" ,
52
57
53
58
# code quality
@@ -83,7 +88,7 @@ profile = "black"
83
88
files = [" src/guidellm" , " tests" ]
84
89
python_version = ' 3.8'
85
90
warn_redundant_casts = true
86
- warn_unused_ignores = true
91
+ warn_unused_ignores = false
87
92
show_error_codes = true
88
93
namespace_packages = true
89
94
exclude = [" venv" , " .tox" ]
@@ -92,22 +97,27 @@ exclude = ["venv", ".tox"]
92
97
# Check: https://mypy.readthedocs.io/en/latest/config_file.html#import-discovery
93
98
follow_imports = ' silent'
94
99
95
- [[tool .mypy .overrides ]]
96
- module = [" transformers.*" , " datasets.*" ]
97
- ignore_missing_imports =true
98
-
99
100
100
101
[tool .ruff ]
101
102
line-length = 88
103
+ indent-width = 4
102
104
exclude = [" build" , " dist" , " env" , " .venv" ]
103
- lint.ignore = [
105
+
106
+ [tool .ruff .format ]
107
+ quote-style = " double"
108
+ indent-style = " space"
109
+
110
+ [tool .ruff .lint ]
111
+ ignore = [
104
112
" PLR0913" ,
105
113
" TCH001" ,
106
114
" COM812" ,
107
115
" ISC001" ,
108
116
" TCH002" ,
117
+ " PLW1514" , # allow Path.open without encoding
118
+
109
119
]
110
- lint. select = [
120
+ select = [
111
121
# Rules reference: https://docs.astral.sh/ruff/rules/
112
122
113
123
# Code Style / Formatting
@@ -127,11 +137,11 @@ lint.select = [
127
137
" Q" , # flake8-quotes: enforces consistent use of single or double quotes
128
138
" TCH" , # flake8-type-checking: enforces type checking practices and standards
129
139
" TID" , # flake8-tidy-imports: enforces tidy and well-organized imports
140
+ " RUF022" , # flake8-ruff: enforce sorting of __all__ in modules
130
141
131
142
# Code Structure / Complexity
132
143
" C4" , # flake8-comprehensions: improves readability and performance of list, set, and dict comprehensions
133
144
" C90" , # mccabe: checks for overly complex code using cyclomatic complexity
134
- " FBT" , # flake8-boolean-trap: prevents the use of boolean traps in function arguments and calls
135
145
" ISC" , # flake8-implicit-str-concat: prevents implicit string concatenation
136
146
" PIE" , # flake8-pie: identifies and corrects common code inefficiencies and mistakes
137
147
" R" , # Refactor: suggests improvements to code structure and readability
@@ -164,7 +174,6 @@ lint.select = [
164
174
"tests/**/*.py" = [
165
175
" S101" , # asserts allowed in tests
166
176
" ARG" , # Unused function args allowed in tests
167
- " FBT" , # Booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
168
177
" PLR2004" , # Magic value used in comparison
169
178
" TCH002" , # No import only type checking in tests
170
179
" SLF001" , # enable private member access in tests
@@ -173,8 +182,13 @@ lint.select = [
173
182
" PT011" , # allow generic exceptions in tests
174
183
" N806" , # allow uppercase variable names in tests
175
184
" PGH003" , # allow general ignores in tests
185
+ " S106" , # allow hardcoded passwords in tests
186
+ " PLR0915" , # allow complext statements in tests
176
187
]
177
188
189
+ [tool .ruff .lint .isort ]
190
+ known-first-party = [" guidellm" , " tests" ]
191
+
178
192
179
193
[tool .pytest .ini_options ]
180
194
addopts = ' -s -vvv --cache-clear'
0 commit comments