-
Notifications
You must be signed in to change notification settings - Fork 494
Expand file tree
/
Copy pathpyproject.toml
More file actions
212 lines (189 loc) · 5.68 KB
/
pyproject.toml
File metadata and controls
212 lines (189 loc) · 5.68 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
# 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"
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 ; platform_machine != 'aarch64' and python_version < '3.14'",
"usd-exchange>=2.2 ; python_version >= '3.10' and python_version < '3.13' and platform_machine == 'aarch64'",
]
examples = [
"blosc>=1.11.1",
"matplotlib>=3.7.5",
"pillow>=10.4.0",
"psutil>=7.1.0",
"pyglet>=2.1.9",
"usd-core>=25.5 ; platform_machine != 'aarch64' and python_version < '3.14'",
"usd-exchange>=2.2 ; python_version >= '3.10' and python_version < '3.13' and platform_machine == 'aarch64'",
]
torch-cu12 = [
"warp-lang[examples]",
"torch>=2.7.0",
]
dev = [
"warp-lang[examples]",
"warp-lang[docs]",
"nvtx",
"coverage[toml]",
"rmm-cu12 ; platform_system == 'Linux' and python_version < '3.14'",
"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 = [
"notebooks",
"warp/_src/thirdparty/appdirs.py",
"warp/_src/thirdparty/dlpack.py",
"tools",
]
[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/*.py" = ["PLC0414"]
"warp/tests/*.py" = ["F841"]
"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]
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
[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true
[tool.uv.sources]
torch = [{ index = "pytorch-cu128", extra = "torch-cu12" }]
[[tool.uv.index]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
[tool.typos]
files.extend-exclude = ["/tools/packman", "/tools/repoman", "/PUBLICATIONS.md", "/licenses", "/warp/native/nanovdb", "/warp/native/cuBQL", "*.svg", "*.usda"]
[tool.typos.default]
extend-ignore-re = [
# MSVC compiler flags like /Fo, /Fe, /Fd, etc.
"/F[oedpircaOAu]"
]
[tool.typos.default.extend-words]
arange = "arange"
commun = "commun"
dout = "dout"
iy = "iy"
iz = "iz"
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