at 24.11-pre 2.0 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 setuptools, 7 wheel, 8 gymnasium, 9 numpy, 10 ale-py, 11 bsuite, 12 dm-control, 13 gym, 14 imageio, 15 pettingzoo, 16 pytestCheckHook, 17}: 18 19buildPythonPackage rec { 20 pname = "shimmy"; 21 version = "1.3.0"; 22 pyproject = true; 23 24 disabled = pythonOlder "3.8"; 25 26 src = fetchFromGitHub { 27 owner = "Farama-Foundation"; 28 repo = "Shimmy"; 29 rev = "refs/tags/v${version}"; 30 hash = "sha256-rYBbGyMSFF/iIGruKn2JXKAVIZIfJDEHUEZUESiUg/k="; 31 }; 32 33 build-system = [ 34 setuptools 35 wheel 36 ]; 37 38 dependencies = [ 39 gymnasium 40 numpy 41 ]; 42 43 pythonImportsCheck = [ "shimmy" ]; 44 45 nativeCheckInputs = [ 46 ale-py 47 bsuite 48 dm-control 49 gym 50 imageio 51 pettingzoo 52 pytestCheckHook 53 ]; 54 55 disabledTestPaths = [ 56 # Requires unpackaged pyspiel 57 "tests/test_openspiel.py" 58 59 # Broken since ale-py v0.9.0 due to API change 60 # https://github.com/Farama-Foundation/Shimmy/issues/120 61 "tests/test_atari.py" 62 ]; 63 64 preCheck = '' 65 export HOME=$(mktemp -d) 66 ''; 67 68 disabledTests = [ 69 # Require network access 70 "test_check_env[bsuite/mnist_noise-v0]" 71 "test_check_env[bsuite/mnist_scale-v0]" 72 "test_check_env[bsuite/mnist-v0]" 73 "test_existing_env" 74 "test_loading_env" 75 "test_pickle[bsuite/mnist-v0]" 76 "test_seeding[bsuite/mnist_noise-v0]" 77 "test_seeding[bsuite/mnist_scale-v0]" 78 "test_seeding[bsuite/mnist-v0]" 79 "test_seeding" 80 81 # RuntimeError: std::exception 82 "test_check_env" 83 "test_seeding[dm_control/quadruped-escape-v0]" 84 "test_rendering_camera_id" 85 "test_rendering_multiple_cameras" 86 "test_rendering_depth" 87 "test_render_height_widths" 88 ]; 89 90 meta = { 91 changelog = "https://github.com/Farama-Foundation/Shimmy/releases/tag/v${version}"; 92 description = "An API conversion tool for popular external reinforcement learning environments"; 93 homepage = "https://github.com/Farama-Foundation/Shimmy"; 94 license = lib.licenses.mit; 95 maintainers = with lib.maintainers; [ GaetanLepage ]; 96 }; 97}