forked from NVIDIA/warp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
290 lines (260 loc) · 8.5 KB
/
Copy pathpyproject.toml
File metadata and controls
290 lines (260 loc) · 8.5 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
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
278
279
280
281
282
283
284
285
286
287
288
289
290
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
[build-system]
requires = ["setuptools>=75.3.2", "build", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "warp-lang"
requires-python = ">=3.10"
authors = [{ name = "NVIDIA Corporation", email = "warp-python@nvidia.com" }]
description = "A Python framework for high-performance simulation and graphics programming"
license = { text = "Apache-2.0" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3 :: Only",
"Environment :: GPU :: NVIDIA CUDA",
"Environment :: GPU :: NVIDIA CUDA :: 12",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering",
]
dependencies = ["numpy"]
dynamic = ["version", "readme"]
[project.urls]
Homepage = "https://developer.nvidia.com/warp-python"
Documentation = "https://nvidia.github.io/warp/stable/"
Repository = "https://github.com/NVIDIA/warp"
Issues = "https://github.com/NVIDIA/warp/issues"
Changelog = "https://github.com/NVIDIA/warp/blob/main/CHANGELOG.md"
[project.optional-dependencies]
docs = [
"nvidia-sphinx-theme",
"sphinx-copybutton",
"pre-commit",
"myst_parser",
]
benchmark = [
"usd-core>=25.5 ; (sys_platform != 'linux' or platform_machine != 'aarch64') and (sys_platform != 'win32' or (platform_machine != 'ARM64' and platform_machine != 'arm64' and platform_machine != 'aarch64'))",
"usd-exchange>=2.2 ; python_version >= '3.10' and python_version < '3.13' and sys_platform == 'linux' and platform_machine == 'aarch64'",
]
examples = [
"blosc>=1.11.1 ; sys_platform != 'win32' or (platform_machine != 'ARM64' and platform_machine != 'arm64' and platform_machine != 'aarch64')",
"matplotlib>=3.7.5",
"pillow>=10.4.0",
"psutil>=7.1.0",
"pyglet>=2.1.9",
"usd-core>=25.5 ; (sys_platform != 'linux' or platform_machine != 'aarch64') and (sys_platform != 'win32' or (platform_machine != 'ARM64' and platform_machine != 'arm64' and platform_machine != 'aarch64'))",
"usd-exchange>=2.2 ; python_version >= '3.10' and python_version < '3.13' and sys_platform == 'linux' and platform_machine == 'aarch64'",
]
torch-cu12 = [
"warp-lang[examples]",
"torch>=2.7.0",
]
torch-cu13 = [
"warp-lang[examples]",
"torch>=2.9.0",
]
dev = [
"warp-lang[examples]",
"warp-lang[docs]",
"nvtx ; sys_platform != 'win32' or (platform_machine != 'ARM64' and platform_machine != 'arm64' and platform_machine != 'aarch64')",
"coverage[toml]",
"ml-dtypes>=0.5.4",
]
[tool.setuptools.packages.find]
include = ["warp*"]
exclude = ["warp.examples.cpp*"]
[tool.setuptools.dynamic]
version = { file = ["VERSION.md"] }
readme = { file = ["README.md"], content-type = "text/markdown" }
[tool.ruff]
cache-dir = ".cache/ruff"
line-length = 120
indent-width = 4
extend-exclude = [
# Skill eval fixtures stand in for third-party codebases under assessment.
# Their shape is what the evals grade, so they are neither linted nor
# formatted.
"skills/*/evals/files",
"warp/_src/thirdparty/appdirs.py",
"warp/_src/thirdparty/dlpack.py",
"tools/build",
"tools/ci/deploy_doc.py",
"tools/ci/publishing",
"tools/cmake",
"tools/packman",
"tools/pre-commit-hooks",
"tools/repoman",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"I", # isort
"F", # pyflakes
"W", # pycodestyle warnings
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"NPY", # NumPy-specific rules
"PLC", # pylint convention
"PLE", # pylint error
"PLW", # pylint warning
"UP", # pyupgrade
"RUF",
]
ignore = [
"E501", # Many lines are over 120 characters already
"E741", # Warp often uses l as a variable name
"F403", # Allow wildcard imports
"F405", # Related to use of wildcard imports
"F811", # Warp often uses overloads
"E721", # Warp often uses == in float and int type comparisons
"PLW0603", # Allow assignments to global variables
"UP018", # Warp kernels often use float(val) and int(val)
"RUF046", # Warp kernels often use int(val)
"PLW1641", # TODO: Make sure classes implementing __eq__ also implement a __hash__ method
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "PLC0414"]
"__init__.pyi" = ["E402", "I001"]
# `warp/__init__.py` registers all Warp module source declarations before
# importing implementation symbols, so the statement-before-import ordering is
# intentional.
"warp/__init__.py" = ["E402"]
"warp/*.py" = ["PLC0414"]
"warp/tests/*.py" = ["F841"]
# Skill evaluation fixtures intentionally contain the defects agents must
# find (e.g. a computed-but-never-consumed adjoint), so unused-variable
# lints are expected there.
"skills/warp-debug-gradients/evals/files/**/*.py" = ["F841", "RUF059"]
"asv/benchmarks/**.py" = ["RUF012"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
exclude = ["warp/__init__.pyi"]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
[tool.coverage.run]
# Use sys.monitoring on Python 3.12+ to reduce tracing overhead; Coverage.py falls back on older versions.
core = "sysmon"
source = ["warp", "warp.render"]
disable_warnings = [
"module-not-measured",
"module-not-imported",
"no-data-collected",
"couldnt-parse",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"@wp",
"@warp",
"if 0:",
"if __name__ == .__main__.:",
]
omit = [
"*/warp/_src/thirdparty/*",
"*/warp/examples/*",
"*/warp/tests/*",
"*/warp/_src/fem/*",
"appdirs.py",
"render_opengl.py",
"build_dll.py",
"config.py",
"__init__.pyi",
]
[tool.uv]
managed = true
required-environments = [
"sys_platform == 'win32' and platform_machine == 'AMD64'",
]
conflicts = [
[
{ extra = "torch-cu12" },
{ extra = "torch-cu13" },
],
]
[tool.uv.sources]
torch = [
{ index = "pytorch-cu126", extra = "torch-cu12" },
{ index = "pytorch-cu130", extra = "torch-cu13" },
]
[[tool.uv.index]]
name = "pytorch-cu126"
url = "https://download.pytorch.org/whl/cu126"
explicit = true
[[tool.uv.index]]
name = "pytorch-cu130"
url = "https://download.pytorch.org/whl/cu130"
explicit = true
[tool.towncrier]
directory = "changelog"
filename = "CHANGELOG.md"
start_string = "<!-- towncrier release notes start -->\n"
title_format = "## [{version}] - {project_date}"
issue_format = "[GH-{issue}](https://github.com/NVIDIA/warp/issues/{issue})"
issue_pattern = "\\d+"
wrap = false
ignore = []
[[tool.towncrier.type]]
directory = "added"
name = "Added"
showcontent = true
[[tool.towncrier.type]]
directory = "removed"
name = "Removed"
showcontent = true
[[tool.towncrier.type]]
directory = "deprecated"
name = "Deprecated"
showcontent = true
[[tool.towncrier.type]]
directory = "changed"
name = "Changed"
showcontent = true
[[tool.towncrier.type]]
directory = "fixed"
name = "Fixed"
showcontent = true
[[tool.towncrier.type]]
directory = "documentation"
name = "Documentation"
showcontent = true
[tool.typos]
# Skill eval fixtures stand in for third-party codebases under assessment, so
# their prose and identifiers are deliberately not held to Warp's conventions.
files.extend-exclude = ["/tools/packman", "/tools/repoman", "/PUBLICATIONS.md", "/licenses", "/warp/native/nanovdb", "/warp/native/cuBQL", "*.svg", "*.usda", "/skills/*/evals/files"]
[tool.typos.default]
extend-ignore-re = [
# MSVC compiler flags like /Fo, /Fe, /Fd, etc.
"/F[oedpircaOAu]",
# Short-SHA commit links in design/deprecations.md, e.g. [ba7a865](https://github.com/NVIDIA/warp/commit/<sha>)
"\\[[0-9a-f]{7,40}\\]\\(https://github\\.com/NVIDIA/warp/commit/[0-9a-f]{7,40}\\)",
]
[tool.typos.default.extend-words]
arange = "arange"
commun = "commun"
dout = "dout"
iy = "iy"
iz = "iz"
lod = "lod"
nd = "nd"
setp = "setp"
transformd = "transformd"
[tool.typos.default.extend-identifiers]
CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = "CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN"
ba = "ba"
[tool.pyright]
extraPaths = ["."]
[[tool.pyright.executionEnvironments]]
root = "warp/__init__.pyi"
reportInvalidTypeVarUse = false