forked from newton-physics/newton
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
201 lines (177 loc) · 5.47 KB
/
pyproject.toml
File metadata and controls
201 lines (177 loc) · 5.47 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "newton"
dynamic = ["version"]
license = "Apache-2.0"
license-files = ["LICENSE.md", "newton/licenses/**/*.txt"]
authors = [{ name = "Newton Developers", email = "warp-python@nvidia.com" }]
classifiers = [
"Development Status :: 4 - Beta",
"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 :: Only",
"Environment :: GPU :: NVIDIA CUDA",
"Environment :: GPU :: NVIDIA CUDA :: 12",
"Topic :: Scientific/Engineering",
]
description = "A GPU-accelerated physics engine for robotics simulation"
readme = "README.md"
requires-python = ">=3.10"
dependencies = ["warp-lang>=1.7.0.dev20250823"]
[project.optional-dependencies]
# Core simulation dependencies
sim = [
# MuJoCo simulation
"mujoco-warp>=0.0.1", # MuJoCo, warp-accelerated
"mujoco>=3.3.3.dev769049331", # MuJoCo physics engine
"cbor2>=5.7.0",
]
# Asset import and mesh processing dependencies
importers = [
# Mesh processing dependencies used by ModelBuilder.approximate_meshes
"scipy", # for convex hull approximation
"fast-simplification>=0.1.11", # for mesh simplification
"alphashape>=1.3.1", # for alphashape remeshing
"coacd>=1.0.7", # for convex decomposition
"trimesh>=4.6.8", # for mesh operations and V-HACD
"pycollada>=0.9", # for loading mesh data with trimesh
# USD core libraries
"usd-core>=25.5 ; platform_machine != 'aarch64'",
"usd-exchange>=2.1.0a3 ; platform_machine == 'aarch64'",
]
# Examples dependencies including visualization
examples = [
"newton[sim]", # include simulation dependencies
"newton[importers]", # include import dependencies
"pyglet>=2.1.6", # 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",
]
# 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
]
# Development and Testing
# Contains all w/o torch, plus development debugging dependencies
dev = [
"newton[examples]", # includes examples, which pulls in sim and visualization
"tqdm>=4.67.1", # for progress bars
"coverage[toml]>=7.8.0", # for code coverage testing
]
# Documentation dependencies
docs = [
"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.6.1",
"sphinx-tabs>=3.3.0",
]
[tool.hatch.version]
path = "newton/_version.py"
[tool.hatch.build.targets.wheel]
include = ["/newton", "/newton/licenses"]
[[tool.uv.index]]
url = "https://pypi.org/simple"
[[tool.uv.index]]
name = "nvidia"
url = "https://pypi.nvidia.com/"
explicit = true
[tool.uv.sources]
mujoco-warp = { git = "https://github.com/google-deepmind/mujoco_warp" }
warp-lang = { index = "nvidia" }
mujoco = { index = "mujoco" }
torch = [{ index = "pytorch-cu129", extra = "torch-cu12" }]
[dependency-groups]
dev = ["asv>=0.6.4"]
[tool.ruff]
cache-dir = ".cache/ruff"
line-length = 120
indent-width = 4
exclude = []
[[tool.uv.index]]
name = "pytorch-cu129"
url = "https://download.pytorch.org/whl/cu129"
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
]
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"]
[[tool.uv.index]]
name = "mujoco"
url = "https://py.mujoco.org"
explicit = true
[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