Commit dbf899ad authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python312Packages.bsuite: refactor

- use nixfmt
parent cebee4c5
Loading
Loading
Loading
Loading
+116 −108
Original line number Diff line number Diff line
{ lib
, fetchPypi
, buildPythonPackage
, fetchpatch
, frozendict
, termcolor
, matplotlib
, gym
, pandas
, scipy
, absl-py
, dm-env
, plotnine
, scikit-image
, dm-tree
, patsy
, tensorflow-probability
, dm-haiku
, statsmodels
, mizani
, trfl
, optax
, pytestCheckHook
, dm-sonnet
, rlax
, distrax
{
  lib,
  absl-py,
  buildPythonPackage,
  distrax,
  dm-env,
  dm-haiku,
  dm-sonnet,
  dm-tree,
  fetchpatch,
  fetchPypi,
  frozendict,
  gym,
  matplotlib,
  mizani,
  optax,
  pandas,
  patsy,
  plotnine,
  pytestCheckHook,
  pythonOlder,
  rlax,
  scikit-image,
  scipy,
  setuptools,
  statsmodels,
  tensorflow-probability,
  termcolor,
  trfl,
}:

let bsuite = buildPythonPackage rec {
let
  bsuite = buildPythonPackage rec {
    pname = "bsuite";
    version = "0.3.5";
  format = "setuptools";
    pyproject = true;

    disabled = pythonOlder "3.7";

    src = fetchPypi {
      inherit pname version;
@@ -50,7 +56,9 @@ let bsuite = buildPythonPackage rec {
      })
    ];

  propagatedBuildInputs = [
    build-system = [ setuptools ];

    dependencies = [
      absl-py
      dm-env
      dm-tree
@@ -78,9 +86,7 @@ let bsuite = buildPythonPackage rec {
      trfl
    ];

  pythonImportsCheck = [
    "bsuite"
  ];
    pythonImportsCheck = [ "bsuite" ];

    disabledTests = [
      # Tests require network connection
@@ -101,20 +107,22 @@ let bsuite = buildPythonPackage rec {
      "test_episode_truncation"
    ];

  # escape infinite recursion with rlax
    # Escape infinite recursion with rlax
    doCheck = false;

    passthru.tests = {
    check = bsuite.overridePythonAttrs (_: { doCheck = true; });
      check = bsuite.overridePythonAttrs (_: {
        doCheck = true;
      });
    };

    meta = with lib; {
    description = ''
      Core RL Behaviour Suite. A collection of reinforcement learning
      experiments
    '';
      description = "Collection of experiments that investigate core capabilities of a reinforcement learning (RL) agent";
      homepage = "https://github.com/deepmind/bsuite";
      changelog = "https://github.com/google-deepmind/bsuite/releases/tag/${version}";
      license = licenses.asl20;
      maintainers = with maintainers; [ onny ];
    };
}; in bsuite
  };
in
bsuite