[build-system] requires = ["setuptools", "wheel", "cython>=3.0.0", "numpy>=1.26.4"] build-backend = "setuptools.build_meta" [project] name = "genesis-world" version = "1.5.0" description = "A universal and generative physics engine" readme = "README.md" requires-python = ">=3.12,<3.15" dependencies = [ "psutil", "quadrants==1.4.0", # * 2.13.0 sets the private state of a model built by 'model_construct', which pickling reads. "pydantic>=2.13.0", "numpy>=1.26.4", "frozendict", # * 4.8.2 fixed linear/sRGB color conversion in `to_color()`. # * 5.0 transforms a mesh without drawing from the global random generator of numpy, which the particle samplers # draw from, so that a seed gives the same particles whatever the mesh processing. "trimesh>=5.0.0", # Used for preprocessing .urdf.xacro files into plain URDF "xacro", # * No pre-compiled wheels are distributed for LibIGL v2.6.2 on Windows OS "libigl!=2.6.2", # Cross-platform library to get various kind of CPU information such as model name "py-cpuinfo", "mujoco>=3.2.5", # Streams video frames to file, for 'camera.start_recording' and the 'VideoFile' recorder "av", # Compresses the frames of trajectory files, fast enough for the writer thread to keep pace with stepping "zstandard", # Used by `pyrender` to manage onscreen graphical windows # * 2.1.8 breaks headless windowing, which is used in unit tests of the interactive viewer. # * 2.0.15 <= 2.1.8 breaks old-style option overwrite for string literal. # * 2.1.10 changes default DPI scaling behavior. "pyglet>=1.5,!=2.1.8", # Used by `pyrender` to load fonts "freetype-py", # Used by `pyrender` to write low-level OpenGL rendering pipeline "PyOpenGL>=3.1.4", # Use by `pyrender` to compile low-level OpenGL rendering pipeline "numba", # Use by `Mesh.remesh`, which is involve in `PBDTetEntity.sample` "pymeshlab", # Optional `trimesh` dependency for loading `.dae` mesh files "pycollada", # Used for parsing `.glb` mesh files "pygltflib", # Used for decoding Draco-compressed `.glb` mesh files "DracoPy", # Use by `PBD3DEntity.sample` to tetrahedralize a mesh "tetgen", # Used for some advanced mesh processing such as `skeletonization` # * 0.8.0 is the first release with native binaries for each platform, Linux ARM included. "PyGEL3D>=0.8.0", # Used here and there to load and export images # * 11.0 dramatically improves performance when exporting images to PNG "Pillow>11.0", # Use to display camera images and export images "opencv-python", # Use by `RigidGeom.visualize_sdf` to render SDF as level 0 marching cubes "scikit-image", # Convex decomposition library # * 1.0.14 makes the decomposition independent of thread scheduling, so a fixed seed reproduces it "coacd>=1.0.14", # Ray casting used in mesh to height field conversion "rtree", # Used for loading raytracing special texture images used by LuisaRender "OpenEXR", # Native batch renderer specifically designed for Genesis "gs-madrona==0.0.10; platform_system=='Linux' and (platform_machine=='x86_64' or platform_machine=='AMD64')", # Used for mesh simplification "fast_simplification>=0.1.12", # Surface reconstruction library for particle data from SPH simulations "pysplashsurf==0.14.*", ] [project.optional-dependencies] dev = [ # FIXME: Remove this cap once pytest-forked becomes compatible with newer versions (pytest-forked#112) "pytest>=8.2,<9.2.0", "pytest-xdist", "pytest-forked", "pytest-timeout", "pytest-print", # Note that 'pytest-rerunfailures' is incompatible with 'pytest-forked' # - 16.0 is causing pytest-xdist to crash in case of failure or skipped tests # "pytest-rerunfailures!=16.0", # GPU queries for the test infrastructure (tests/gpu_info.py); non-macOS so the CUDA device check runs on # Linux and Windows. AMD's 'amdsmi' ships with ROCm, not PyPI, so the AMD backend is import-gated instead. "nvidia-ml-py; platform_system != 'Darwin'", "setproctitle", # allows renaming the test processes on the cluster "syrupy", "huggingface_hub[hf_xet]<2", "wandb", "ipython", # * Mujoco 3.3.6 made contact islands an opt-out option instead of opt-in, # which requires setting the disableflags 'mjDSBL_ISLAND'. # * Mujoco 3.5.0 fixed computation of link invweight when degenerated. # * Mujoco 3.10.0 aligned the primal solvers with Genesis (Hager-Zhang CG update, shifted linesearch costs); # the step-by-step solver consistency tests only hold when both engines run the same algorithm. "mujoco>=3.10.0,<3.11.0", # Used by the locomotion environments to batch observations "tensordict", # Used internally by 'MPLPlotter' # * 3.7.0: introduces Button blitting and 'outside' keyword legend location # * 3.11.0: changes text rasterization, which the 'MPLPlotter' snapshots are rendered with "matplotlib>=3.11.0", # Used for ground truth validation in unit tests "scipy", # The ImGui overlay snapshots are rendered with imgui-bundle 1.93.0, which draws tab corners differently from 1.92 "imgui-bundle>=1.93.0", # Used for code formatting during commits "pre_commit", ] render = [ "pybind11[global]", "open3d", "imgui-bundle", ] usd = [ # Used for parsing `.usd` mesh files "usd-core", # Used to serialize concurrent omni-kit bake operations (concurrent bootstrapping causes segfaults) "filelock", ] [project.scripts] gs = "genesis._main:main" [tool.setuptools.packages.find] where = ["."] include = ["genesis", "genesis.*"] [tool.setuptools.package-data] genesis = [ "assets/*", "ext/pyrender/LICENSE", "ext/pyrender/fonts/*", "ext/pyrender/shaders/*", ] [tool.ruff] line-length = 120 [tool.ruff.lint] # Ignore the specific errors currently present in the codebase ignore = [ "F405", # undefined-local-with-import-star-usage "F401", # unused-import "F841", # unused-variable "E741", # ambiguous-variable-name "E402", # module-import-not-at-top-of-file "F403", # undefined-local-with-import-star "E712", # true-false-comparison ] [tool.ruff.lint.isort] combine-as-imports = true [tool.pytest.ini_options] addopts = [ "--verbose", # Exclude 'f' (failed) from short test summary because it duplicates the FAILURES section in verbose mode. # A plain list of failed test IDs is printed instead by 'pytest_terminal_summary' hook in tests/conftest.py. "-r", "EsxXw", "--color=yes", "--import-mode=importlib", "--pdbcls=IPython.terminal.debugger:TerminalPdb", # "--exitfirst", "--numprocesses=auto", "--dist=worksteal", # "--max-worker-restart=0", "--durations=0", "--durations-min=100.0", "--timeout=1200", # Very large timeout, just in case of deadlock # Note that the retry mechanism is not compatible with "--forked". "-m not (benchmarks or examples)", ] xfail_strict = true filterwarnings = [ "ignore::_pytest.warning_types.PytestUnknownMarkWarning", "ignore::DeprecationWarning", ] markers = [ "examples: example scripts.", "benchmarks: benchmarks for profiling and monitoring.", # '@pytest.mark.required("pairwise")' keeps the marker on a subset of the cases of a parametrized test in which every # pair of parameter values occurs together, and '@pytest.mark.required("sparse")' on the diagonal of its parameter # grid, its i-th case taking the i-th value of every decorator, both per backend (resolved in tests/conftest.py). "required: minimal test set that must pass on any environment before merging (args above).", # A test is flagged 'slow' when its baseline run time is >= 150s. The baseline is the worst case over the standard # parallel CI runs (field and ndarray backends) of the per-test average across its parametrizations. # '@pytest.mark.slow' with no argument means slow on every backend; passing one or more backend names, e.g. # '@pytest.mark.slow("gpu")' or '@pytest.mark.slow("cpu", "gpu")', restricts the flag to those backends only # (resolved per item in tests/conftest.py against the parametrized or session backend). "slow: tests that are slow to run (>= 150s); optional args restrict it to specific backends.", ] log_cli_level = "WARNING" [tool.uv] # uv respects the build-system and project tables # PyTorch must be installed separately before Genesis due to platform-specific builds # See README.md for installation instructions with different PyTorch backends