forked from pnxenopoulos/awpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
277 lines (239 loc) · 7.42 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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
[build-system]
requires = ["setuptools", "wheel"]
[project]
name = "awpy"
authors = [
{ name = "Peter Xenopoulos", email = "[email protected]" },
{ name = "Jan-Eric Nitschke", email = "[email protected]" },
]
description = "Counter-Strike: Global Offensive data parsing, analysis and visualization functions"
readme = "README.md"
requires-python = ">=3.11"
keywords = ["esports", "sports-analytics", "csgo", "counter-strike"]
license = { text = "MIT License" }
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
]
dependencies = [
"imageio==2.28",
"matplotlib==3.7",
"networkx==2.6",
"numpy>=1.20,<=1.25",
"pandas>=2.0.1, <=2.1",
"scipy==1.10",
"Shapely==2.0",
"sphinx-rtd-theme==1.2",
"sympy==1.11",
"textdistance==4.5",
"tqdm==4.55",
]
dynamic = ["version"]
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
where = ["awpy"]
[tool.setuptools.package-data]
"*" = [
"*.go",
"data/map/*.png",
"data/map/*.json",
"data/nav/*.txt",
"data/nav/*.csv",
"data/nav/*.json",
"*.mod",
"*.sum",
]
[tool.ruff]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
select = [
"E",
"F",
"B",
"W",
"I",
"N",
"D",
"UP",
"YTT",
"ANN",
"S",
"BLE",
"FBT",
"A",
"C4",
"DTZ",
"T10",
"EXE",
"ISC",
"ICN",
"G",
"INP",
"PIE",
"PYI",
"PT",
"Q",
"RSE",
"RET",
"SLF",
"SIM",
"TID",
"TCH",
"INT",
"ARG",
"ERA",
"PD",
"PGH",
"PLC",
"PLE",
"PLR",
"PLW",
"TRY",
"NPY",
"RUF",
"EM",
]
ignore = ["D208", "ANN101", "T20", "PTH", "TRY003"] # , "PLR0912", "PLR0915", "PLR0913"
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"docs",
]
# Same as Black.
line-length = 88
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.11.
target-version = "py311"
[tool.ruff.per-file-ignores]
"__init__.py" = ["E402", "F401"]
"awpy/types.py" = ["N815"]
"setup.py" = ["D100"]
"tests/test_*.py" = ["ANN201", "S101", "SLF001", "PLR2004"]
"awpy/analytics/states.py" = ["ARG001"]
"awpy/analytics/wpa.py" = ["ARG001"]
"awpy/parser/cleaning.py" = ["PLC1901"]
[tool.ruff.pydocstyle]
convention = "google" # Accepts: "google", "numpy", or "pep257".
[tool.ruff.pylint]
max-args = 15
[tool.pyright]
include = ["awpy"]
exclude = ["tests"]
strictListInference = true
strictDictionaryInference = true
strictSetInference = true
useLibraryCodeForTypes = false
reportPropertyTypeMismatch = "error"
reportFunctionMemberAccess = "warning"
reportMissingTypeStubs = "none"
reportUntypedFunctionDecorator = "error"
reportUntypedClassDecorator = "error"
reportUntypedBaseClass = "error"
reportUntypedNamedTuple = "error"
reportPrivateUsage = "error"
reportConstantRedefinition = "error"
reportOverlappingOverload = "error"
reportMissingParameterType = "warning"
reportUnnecessaryIsInstance = "none"
reportUnnecessaryCast = "error"
reportUnnecessaryComparison = "error"
reportUnnecessaryContains = "error"
reportAssertAlwaysTrue = "error"
reportUnnecessaryTypeIgnoreComment = "error"
reportImplicitOverride = "none"
reportShadowedImports = "error"
[tool.coverage.run]
branch = true
source = ["awpy"]
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.pylint.main]
# Specify a score threshold under which the program will exit with error.
fail-under = 9.99
[tool.pylint.basic]
# Good variable names which should always be accepted, separated by a comma.
good-names = ["i", "j", "k", "ex", "Run", "_", "x", "y", "z", "e"]
[tool.pylint.design]
# Maximum number of arguments for function / method.
max-args = 15
# Maximum number of attributes for a class (see R0902).
max-attributes = 7
# Maximum number of boolean expressions in an if statement (see R0916).
max-bool-expr = 5
# Maximum number of branch for function / method body.
max-branches = 12
# Maximum number of locals for function / method body.
max-locals = 15
# Maximum number of public methods for a class (see R0904).
max-public-methods = 30
# Maximum number of return / yield for function / method body.
max-returns = 6
# Maximum number of statements in function / method body.
max-statements = 50
# Minimum number of public methods for a class (see R0903).
min-public-methods = 1
[tool.pylint.exceptions]
# Exceptions that will emit a warning when caught.
overgeneral-exceptions = ["builtins.BaseException"]
[tool.pylint.format]
# Maximum number of characters on a single line.
max-line-length = 88
# Maximum number of lines in a module.
max-module-lines = 2000
[tool.pylint."messages control"]
# Only show warnings with the listed confidence levels. Leave empty to show all.
# Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
confidence = ["HIGH", "CONTROL_FLOW", "INFERENCE", "INFERENCE_FAILURE", "UNDEFINED"]
# Disable the message, report, category or checker with the given id(s). You can
# either give multiple identifiers separated by comma (,) or put this option
# multiple times (only on the command line, not in the configuration file where
# it should appear only once). You can also use "--disable=all" to disable
# everything first and then re-enable specific checks. For example, if you want
# to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable = ["unnecessary-ellipsis"] # but needed for pyright
[tool.pylint.miscellaneous]
# List of note tags to take in consideration, separated by a comma.
notes = ["FIXME", "XXX", "TODO"]
[tool.pylint.refactoring]
# Maximum number of nested blocks for function / method body
max-nested-blocks = 5
# Complete name of functions that never returns. When checking for inconsistent-
# return-statements if a never returning function is called then it will be
# considered as an explicit return statement and no message will be printed.
never-returning-functions = ["sys.exit", "argparse.parse_error"]
[tool.pylint.reports]
# Python expression which should return a score less than or equal to 10. You
# have access to the variables 'fatal', 'error', 'warning', 'refactor',
# 'convention', and 'info' which contain the number of messages in each category,
# as well as 'statement' which is the total number of statements analyzed. This
# score is used by the global evaluation report (RP0004).
evaluation = "max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))"
[tool.pylint.similarities]
# Minimum lines number of a similarity.
min-similarity-lines = 4
[tool.pylint.spelling]
# Limits count of emitted suggestions for spelling mistakes.
max-spelling-suggestions = 4