about summary refs log tree commit diff
path: root/pkgs/development/python-modules/minari/default.nix
blob: 45c3f0fc36ec275cab3dd54aa80f3dbfdb206798 (plain) (blame)
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
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, setuptools
, wheel
, google-cloud-storage
, gymnasium
, h5py
, numpy
, packaging
, portion
, rich
, tqdm
, typer
, typing-extensions
, imageio
, nbmake
, pytest
, pytest-markdown-docs
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "minari";
  version = "0.4.3";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "Farama-Foundation";
    repo = "Minari";
    rev = "refs/tags/v${version}";
    hash = "sha256-DwuANo0PCb2pPTVST8EwuJHe5HKRV8JIpFBpSqoJNh8=";
  };

  build-system = [
    setuptools
    wheel
  ];

  dependencies = [
    google-cloud-storage
    gymnasium
    h5py
    numpy
    packaging
    portion
    rich
    tqdm
    typer
    typing-extensions
  ];

  passthru.optional-dependencies = {
    testing = [
      # gymnasium-robotics
      imageio
      nbmake
      pytest
      pytest-markdown-docs
    ];
  };

  pythonImportsCheck = [
    "minari"
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  disabledTestPaths = [
    # Require internet access
    "tests/dataset/test_dataset_download.py"
    "tests/test_cli.py"
  ];

  meta = with lib; {
    description = "A standard format for offline reinforcement learning datasets, with popular reference datasets and related utilities";
    homepage = "https://github.com/Farama-Foundation/Minari";
    changelog = "https://github.com/Farama-Foundation/Minari/releases/tag/v${version}";
    license = with licenses; [ asl20 mit ];
    maintainers = with maintainers; [ GaetanLepage ];
    mainProgram = "minari";
  };
}