Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
210 lines (196 loc) · 5.57 KB
/
Copy pathpyproject.toml
File metadata and controls
210 lines (196 loc) · 5.57 KB
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
[build-system]
requires = [ "flit_core >=3.11,<4" ]
build-backend = "flit_core.buildapi"
[tool.uv]
package = true
[dependency-groups]
dev = [
"packaging",
"flit",
"flit_core",
"mypy>=1.18,<1.19",
"pre-commit>=4,<5",
"ruff>=0.10,<1.0",
"wheel>=0.45",
]
[project]
name = "nvidia-variant-provider"
dependencies = []
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.10"
authors = [
{ name = "Jonathan Dekhtiar", email = "jonathan@dekhtiar.com" },
{ name = "Michael Sarahan", email = "msarahan@nvidia.com" },
]
maintainers = [
{ name = "Jonathan Dekhtiar", email = "jonathan@dekhtiar.com" },
{ name = "Michael Sarahan", email = "msarahan@nvidia.com" },
]
dynamic = ["version", "description"]
[project.optional-dependencies]
test = [
"pytest>=8.0.0,<9.0.0",
"pytest-cov>=5.0.0,<8.0.0",
"pytest-dotenv>=0.5.0,<1.0.0",
"pytest-env>=1.1.3,<2.0.0",
"pytest-runner>=6.0.0,<7.0.0",
"pytest-ordering>=0.6,<1.0.0",
"pytest-xdist>=3.6.0,<3.9.0",
"parameterized>=0.9.0,<0.10",
]
[project.urls]
"Homepage" = "https://pypi.org/project/nvidia-variant-provider/"
"Bug Reports" = "https://github.com/wheelnext/nvidia-variant-provider/issues"
"Source" = "https://github.com/wheelnext/nvidia-variant-provider"
[project.entry-points.variant_plugins]
nvidia_variant_provider = "nvidia_variant_provider.plugin:NvidiaVariantPlugin"
[tool.pytest.ini_options]
testpaths = ["tests/"]
addopts = "-vvv"
[tool.isort]
profile = "black"
[tool.ruff]
# 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",
"*/migrations/*.py",
"staticfiles/*",
]
# Same as Django: https://github.com/cookiecutter/cookiecutter-django/issues/4792.
line-length = 88
indent-width = 4
[tool.ruff.lint]
select = [
"F",
"E",
"W",
"C90",
"I",
"N",
"UP",
"YTT",
# "ANN", # flake8-annotations: we should support this in the future but 100+ errors atm
"ASYNC",
"S",
"BLE",
"FBT",
"B",
"A",
"COM",
"C4",
"DTZ",
"T10",
"DJ",
"EM",
"EXE",
"FA",
'ISC',
"ICN",
"G",
'INP',
'PIE',
"T20",
'PYI',
'PT',
"Q",
"RSE",
"RET",
"SLF",
"SLOT",
"SIM",
"TID",
"TCH",
"INT",
# "ARG", # Unused function argument
"PTH",
"ERA",
"PD",
"PGH",
"PL",
"TRY",
"FLY",
# "NPY",
# "AIR",
"PERF",
# "FURB",
# "LOG",
"RUF",
]
ignore = [
"COM812", # Checks for the absence of trailing commas.
"DTZ007", # Checks for uses of datetime.datetime.strptime() that lead to naive
# datetime objects.
"EM101", # Checks for the use of string literals in exception constructors.
"EM102", # Checks for the use of f-strings in exception constructors.
"ERA001", # Checks for commented-out Python code.
"EXE001", # Checks for a shebang directive in a file that is not executable.
"FBT001", # Checks for the use of boolean positional arguments in function
# definitions, as determined by the presence of a bool type hint.
"FBT002", # Checks for the use of boolean positional arguments in function
# definitions, as determined by the presence of a boolean default value.
"N806", # Checks for the use of non-lowercase variable names in functions.
"N815", # Checks for class variable names that follow the mixedCase convention.
"PLR0913", # Checks for function definitions that include too many arguments.
"PLR2004", # Checks for the use of unnamed numerical constants ("magic") values in
# comparisons.
"PYI024", # Checks for uses of collections.namedtuple in stub files.
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/
"S311", # Checks for uses of cryptographically weak pseudo-random number generators.
"SIM102", # sometimes it's better to nest
"TRY003", # Checks for long exception messages that are not defined in the exception
# class itself.
"UP009", # Checks for unnecessary UTF-8 encoding declarations.
"UP038", # Checks for uses of isinstance/issubclass that take a tuple of types for
# comparison.
# Deactivated because it can make the code slow:
# https://github.com/astral-sh/ruff/issues/7871
"C901", # Checks for function definitions that include too many statements.
"PLR0912", # Checks for functions or methods with too many branches, including (nested) if,
# elif, and else branches, for loops, try-except clauses, and match and case statements.
"PLR0915", # Checks for functions or methods with too many statements.
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# The fixes in extend-unsafe-fixes will require
# provide the `--unsafe-fixes` flag when fixing.
extend-unsafe-fixes = ["UP038"]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
exclude = ["flit/**/*.py"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
exclude = ["flit/**/*.py"]
[tool.ruff.lint.isort]
force-single-line = true
[tool.mypy]
exclude = [
".venv",
"nvidia_variant_provider/vendor/",
"nvidia_variant_provider/pynvml.py"
]