-
Notifications
You must be signed in to change notification settings - Fork 475
Expand file tree
/
Copy pathpyproject.toml
More file actions
302 lines (269 loc) · 8.69 KB
/
pyproject.toml
File metadata and controls
302 lines (269 loc) · 8.69 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
291
292
293
294
295
296
297
298
299
300
301
302
[build-system]
requires = ["uv_build>=0.11.0"]
build-backend = "uv_build"
[project]
name = "newton"
version = "1.2.0.dev0"
license = "Apache-2.0"
license-files = ["LICENSE.md", "newton/licenses/**/*.txt"]
authors = [{ name = "Newton Developers", email = "developers@newton-physics.org" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Environment :: GPU :: NVIDIA CUDA",
"Environment :: GPU :: NVIDIA CUDA :: 12",
"Environment :: GPU :: NVIDIA CUDA :: 13",
"Topic :: Scientific/Engineering",
]
description = "A GPU-accelerated physics engine for robotics simulation"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"warp-lang>=1.13.0rc1",
]
[project.optional-dependencies]
# Core simulation dependencies
sim = [
# MuJoCo simulation
"mujoco-warp>=3.7.0.1,~=3.7.0; python_version < '3.14'", # MuJoCo, warp-accelerated (3.7.0 was broken; depends on mujoco which has no 3.14 wheels yet)
"mujoco~=3.7.0; python_version < '3.14'", # MuJoCo physics engine (no 3.14 wheels yet)
"newton-actuators>=0.1.0", # deprecated — kept for backward compat, will be removed
]
# Asset import and mesh processing dependencies
importers = [
# HTTP client for downloading meshes from URIs
"requests>=2.25.0",
# Mesh processing dependencies used by ModelBuilder.approximate_meshes
"scipy>=1.11.0", # for convex hull approximation
"fast-simplification>=0.1.11", # for mesh simplification
"alphashape>=1.3.1", # for alphashape remeshing
"coacd>=1.0.7; python_version < '3.14'", # for convex decomposition (no 3.14 wheels yet)
"trimesh>=4.6.8", # for mesh operations and V-HACD
"meshio>=5.3.0", # alternative mesh file loader (fallback)
"pycollada>=0.9", # transitive dependency of trimesh for COLLADA (.dae) mesh support
"resolve-robotics-uri-py>=0.4.0", # for resolving ROS/Gazebo-style URIs (package://, model://)
"open3d>=0.18.0; python_version < '3.13' and (sys_platform != 'linux' or platform_machine != 'aarch64')", # for importing Gaussian .ply files where wheels are available (no 3.13 wheels yet)
# USD core libraries
"usd-core>=25.5 ; platform_machine != 'aarch64' and python_version < '3.14'",
"usd-exchange>=2.2.0 ; platform_machine == 'aarch64' and python_version < '3.13'",
# Newton USD Schemas
"newton-usd-schemas>=0.2.0rc1",
]
# Remeshing dependencies (for SurfaceReconstructor)
remesh = [
"open3d>=0.18.0; python_version < '3.13' and (sys_platform != 'linux' or platform_machine != 'aarch64')", # for Poisson surface reconstruction where wheels are available (no 3.13 wheels yet)
"pyfqmr>=0.5.0", # for fast mesh simplification
]
# Examples dependencies including visualization
examples = [
"newton[sim]", # include simulation dependencies
"newton[importers]", # include import dependencies
"pyglet>=2.1.6,<3", # for OpenGL viewer
"GitPython>=3.1.44", # for downloading assets via newton.utils.download_asset()
"imgui_bundle>=1.92.0", # for viewer GUI
"pyyaml>=6.0.2",
"cbor2>=5.7.0, <6", # for binary recording format (.bin files) - more efficient than JSON
"Pillow>=9.0.0", # for image processing (viewer icons, heightfield loading, textures)
]
# Extra dependency needed to run examples that inference an RL policy
torch-cu12 = [
"newton[examples]", # include example dependencies
"torch>=2.7.0", # CUDA 12 PyTorch
]
torch-cu13 = [
"newton[examples]", # include example dependencies
"torch>=2.10.0", # CUDA 13 PyTorch
]
# Development and Testing
# Contains all w/o torch, plus development debugging dependencies
dev = [
"newton[examples]", # includes examples, which pulls in sim and visualization
"coverage[toml]>=7.8.0", # for code coverage testing
]
# Documentation dependencies
docs = [
"newton[importers]", # include import dependencies
"myst-parser>=3.0.1",
"sphinx>=7.4.7",
"pydata_sphinx_theme>=0.16.1",
"sphinxcontrib-mermaid>=1.0.0",
"sphinx-copybutton>=0.5.0",
"sphinx-design>=0.5.0,<=0.6.1",
"sphinx-tabs>=3.3.0",
"nbsphinx>=0.9.0", # for Jupyter notebook integration
"ipykernel>=6.0.0,<7.0.0", # required by nbsphinx to execute notebooks (pinned <7 for rerun-sdk compatibility)
"pypandoc>=1.11", # required by nbsphinx for notebook conversion
"pypandoc_binary>=1.11", # bundled pandoc binary
"viser>=1.0.16", # required for ViewerViser in tutorial notebooks
]
# Dependencies for Jupyter notebook compatibility
notebook = [
"newton[examples]",
"rerun-sdk[notebook]>=0.27.1; python_version < '3.14'",
"jupyterlab>=4.4.10",
]
[tool.uv.build-backend]
module-name = "newton"
module-root = ""
[[tool.uv.index]]
url = "https://pypi.org/simple"
[[tool.uv.index]]
name = "nvidia"
url = "https://pypi.nvidia.com/"
explicit = true
[tool.uv]
conflicts = [
[
{ extra = "torch-cu12" },
{ extra = "torch-cu13" },
],
]
[tool.uv.sources]
warp-lang = { index = "nvidia" }
torch = [
{ index = "pytorch-cu128", extra = "torch-cu12" },
{ index = "pytorch-cu130", extra = "torch-cu13" },
]
[dependency-groups]
dev = ["asv>=0.6.4"]
[tool.ruff]
cache-dir = ".cache/ruff"
line-length = 120
indent-width = 4
exclude = ["*.js"]
[[tool.uv.index]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
[[tool.uv.index]]
name = "pytorch-cu130"
url = "https://download.pytorch.org/whl/cu130"
explicit = true
[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", # ruff-specific rules
"TID253", # banned module-level imports
]
ignore = [
"E501", # Many lines are over 120 characters already (TODO: Fix)
"E741", # Warp often uses l as a variable name
"UP018", # Warp kernels often use float(val) and int(val)
"RUF046", # Warp kernels often use int(val)
"F811", # Allow Warp kernel/function overloads
"TC001", # Allow quotations in type annotations, e.g. Literal["a"]
"TC002",
"TC003",
"F821",
]
[tool.ruff.lint.per-file-ignores]
"asv/benchmarks/**/*" = ["RUF012", "E402"]
"newton/examples/**/*" = ["E402", "TID253"]
# TID253 (banned module-level imports) only applies to newton/_src and newton/tests
"docs/**/*" = ["TID253"]
"asv/**/*" = ["TID253"]
[tool.ruff.lint.flake8-tidy-imports]
banned-module-level-imports = [
"alphashape",
"coacd",
"fast_simplification",
"git",
"imgui_bundle",
"IPython",
"matplotlib",
"meshio",
"mujoco",
"mujoco_warp",
"networkx",
"open3d",
"openmesh",
"PIL",
"point_cloud_utils",
"pxr",
"pyfqmr",
"pyglet",
"pytetwild",
"requests",
"scipy",
"torch",
"trimesh",
"viser",
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
[tool.coverage.run]
source = ["newton"]
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 = [
"*/newton/examples/*",
"*/newton/tests/*",
"*/newton/tests/thirdparty/*",
]
[tool.basedpyright]
reportUnknownVariableType = false
reportUnknownArgumentType = false
reportAny = false
reportExplicitAny = false
reportUnannotatedClassAttribute = false
reportUnknownMemberType = false
reportUnknownParameterType = false
reportOptionalOperand = false
reportUnusedCallResult = false
[tool.typos]
files.extend-exclude = ["/examples/assets", "*.urdf", "*.usd", "*.usda", "*.mjcf", "*.js"]
[tool.typos.default.extend-words]
arange = "arange"
ba = "ba"
iz = "iz"
HAA = "HAA"
lod = "lod"
# MuJoCo Menagerie brand/product names
Pincher = "Pincher"
Robotis = "Robotis"
robotis = "robotis"
Iit = "Iit"
IIT = "IIT"
iit = "iit"
PN = "PN"
pnd = "pnd"
[tool.typos.default.extend-identifiers]
PNGs = "PNGs"
Haa = "Haa"
iy = "iy"