[build-system] requires = ["uv_build>=0.11.0"] build-backend = "uv_build" [project] name = "newton" version = "1.7.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.17.0", ] [project.optional-dependencies] # Core simulation dependencies sim = [ # MuJoCo simulation "mujoco-warp~=3.14.0", # MuJoCo, warp-accelerated "mujoco~=3.14.0", # MuJoCo physics engine ] # Optional ONNX policy inference for neural actuators and RL policy examples. onnx = [ # Pin operator support from NVIDIA/warp-nn#8 until it is released. "warp-nn[onnx] @ git+https://github.com/NVIDIA/warp-nn.git@d9334ff1b00cb429e8336bb373bdfa1a948f8d49", ] # 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.5", # 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.19.0; python_version < '3.13' and (sys_platform != 'linux' or platform_machine != 'aarch64')", # USD core libraries "usd-core>=25.5,<26.9 ; platform_machine != 'aarch64' and python_version < '3.14'", "usd-exchange>=2.3.0,<4 ; platform_machine == 'aarch64' and python_version < '3.14'", # Newton USD Schemas "newton-usd-schemas>=0.5.0", ] # Remeshing dependencies (for SurfaceReconstructor) remesh = [ "open3d>=0.19.0; python_version < '3.13' and (sys_platform != 'linux' or platform_machine != 'aarch64')", "pyfqmr>=0.5.0", # for fast mesh simplification ] # Examples dependencies including visualization examples = [ "newton[sim]", # include simulation dependencies "newton[importers]", # include import dependencies "newton[onnx]", # for RL policy examples "pyglet>=2.1.6,<3", # for OpenGL viewer "GitPython>=3.1.58", # for downloading assets via newton.utils.download_asset() "imgui_bundle>=1.92.0", # for viewer GUI "pyyaml>=6.0.2", "cbor2>=5.7.0", # for binary recording format (.bin files) - more efficient than JSON "Pillow>=11.3.0", ] # OVRTX real-time ray tracing viewer rtx = [ "newton[importers]", # include import dependencies (USD) "pyglet>=2.1.6,<3", # for the viewer window/presentation "ovrtx>=0.3", # NVIDIA OVRTX renderer ] # PyTorch is not required for ONNX policy inference. These extras cover # workflows that still need PyTorch explicitly, including .pt/.pth policies. 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 "GitPython>=3.1.58", # for downloading tutorial assets via newton.utils.download_asset() # Pin the backend and web client to one Viser build; 1.0.24-1.0.26 changed playback-sensitive paths. "viser==1.0.26", ] # Dependencies for Jupyter notebook compatibility notebook = [ "newton[examples]", "rerun-sdk[notebook]>=0.27.1; python_version < '3.14'", "jupyterlab>=4.5.7", "jupyter-server-proxy>=4.5.0", # Pin the backend and web client to one Viser build; 1.0.24-1.0.26 changed playback-sensitive paths. "viser==1.0.26", ] [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", "ovrtx", "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.towncrier] directory = "changelog" filename = "CHANGELOG.md" start_string = "\n" title_format = "## [{version}] - {project_date}" issue_format = "[#{issue}](https://github.com/newton-physics/newton/issues/{issue})" issue_pattern = "\\d+" ignore = ["*.skip"] wrap = false [[tool.towncrier.type]] directory = "added" name = "Added" showcontent = true [[tool.towncrier.type]] directory = "changed" name = "Changed" showcontent = true [[tool.towncrier.type]] directory = "deprecated" name = "Deprecated" showcontent = true [[tool.towncrier.type]] directory = "removed" name = "Removed" showcontent = true [[tool.towncrier.type]] directory = "fixed" name = "Fixed" showcontent = true [tool.typos] files.extend-exclude = ["/examples/assets", "*.urdf", "*.usd", "*.usda", "*.mjcf", "*.js"] [tool.typos.default.extend-words] arange = "arange" precess = "precess" ba = "ba" ix = "ix" iy = "iy" 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" # Wonik Allegro thumb-adduction joint names tha0 = "tha0" tha1 = "tha1" tha2 = "tha2" tha3 = "tha3"