content: [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.6.dev802089588", # 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
  