about summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/minari/default.nix88
-rw-r--r--pkgs/development/python-modules/nbmake/default.nix74
-rw-r--r--pkgs/development/python-modules/oci/default.nix4
-rw-r--r--pkgs/development/python-modules/pettingzoo/default.nix135
-rw-r--r--pkgs/development/python-modules/portion/default.nix49
-rw-r--r--pkgs/development/python-modules/pytest-markdown-docs/default.nix48
-rw-r--r--pkgs/development/python-modules/rq/default.nix4
-rw-r--r--pkgs/development/python-modules/scalene/default.nix17
-rw-r--r--pkgs/development/python-modules/scooby/default.nix4
-rw-r--r--pkgs/development/python-modules/torchsnapshot/default.nix71
-rw-r--r--pkgs/development/python-modules/winacl/default.nix31
-rw-r--r--pkgs/development/python-modules/yolink-api/default.nix4
12 files changed, 486 insertions, 43 deletions
diff --git a/pkgs/development/python-modules/minari/default.nix b/pkgs/development/python-modules/minari/default.nix
new file mode 100644
index 0000000000000..45c3f0fc36ec2
--- /dev/null
+++ b/pkgs/development/python-modules/minari/default.nix
@@ -0,0 +1,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";
+  };
+}
diff --git a/pkgs/development/python-modules/nbmake/default.nix b/pkgs/development/python-modules/nbmake/default.nix
new file mode 100644
index 0000000000000..03606d7b07876
--- /dev/null
+++ b/pkgs/development/python-modules/nbmake/default.nix
@@ -0,0 +1,74 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+, poetry-core
+, pythonRelaxDepsHook
+, setuptools
+, wheel
+, ipykernel
+, nbclient
+, nbformat
+, pygments
+, pytest
+, pyyaml
+, pytest-xdist
+, pytestCheckHook
+, typing-extensions
+}:
+
+buildPythonPackage rec {
+  pname = "nbmake";
+  version = "1.5.3";
+  pyproject = true;
+
+  disabled = pythonOlder "3.8";
+
+  src = fetchFromGitHub {
+    owner = "treebeardtech";
+    repo = "nbmake";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-sX0YqyBchLlo0QPIpLvl11/gwoiZknG5rBDzmQKiXhs=";
+  };
+
+  build-system = [
+    poetry-core
+    pythonRelaxDepsHook
+    setuptools
+    wheel
+  ];
+
+  dependencies = [
+    ipykernel
+    nbclient
+    nbformat
+    pygments
+    pytest
+    pyyaml
+  ];
+
+  pythonRelaxDeps = [
+    "nbclient"
+  ];
+
+  pythonImportsCheck = [
+    "nbmake"
+  ];
+
+  nativeCheckInputs = [
+    pytest-xdist
+    pytestCheckHook
+    typing-extensions
+  ];
+
+  __darwinAllowLocalNetworking = true;
+
+
+  meta = with lib; {
+    description = "Pytest plugin for testing notebooks";
+    homepage = "https://github.com/treebeardtech/nbmake";
+    changelog = "https://github.com/treebeardtech/nbmake/releases/tag/v${version}";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ GaetanLepage ];
+  };
+}
diff --git a/pkgs/development/python-modules/oci/default.nix b/pkgs/development/python-modules/oci/default.nix
index b1bb84dba7865..c0d759db7b221 100644
--- a/pkgs/development/python-modules/oci/default.nix
+++ b/pkgs/development/python-modules/oci/default.nix
@@ -14,7 +14,7 @@
 
 buildPythonPackage rec {
   pname = "oci";
-  version = "2.126.1";
+  version = "2.126.2";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
@@ -23,7 +23,7 @@ buildPythonPackage rec {
     owner = "oracle";
     repo = "oci-python-sdk";
     rev = "refs/tags/v${version}";
-    hash = "sha256-emWfpI+4oyb3p8RzhLKm1iWkvLu7OZTrEnyvZ5AI9Zw=";
+    hash = "sha256-eejIDpKpPekxrm1H9x2skxK67KNUm9mmrGM23hZ6ztM=";
   };
 
   pythonRelaxDeps = [
diff --git a/pkgs/development/python-modules/pettingzoo/default.nix b/pkgs/development/python-modules/pettingzoo/default.nix
new file mode 100644
index 0000000000000..389abd5f89071
--- /dev/null
+++ b/pkgs/development/python-modules/pettingzoo/default.nix
@@ -0,0 +1,135 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+, setuptools
+, wheel
+, gymnasium
+, numpy
+, chess
+, pillow
+, pybox2d
+, pygame
+, pymunk
+, rlcard
+, scipy
+, pre-commit
+, pynput
+, pytest
+, pytest-cov
+, pytest-markdown-docs
+, pytest-xdist
+, pytestCheckHook
+, stdenv
+}:
+
+buildPythonPackage rec {
+  pname = "pettingzoo";
+  version = "1.24.3";
+  pyproject = true;
+
+  disabled = pythonOlder "3.8";
+
+  src = fetchFromGitHub {
+    owner = "Farama-Foundation";
+    repo = "PettingZoo";
+    rev = "refs/tags/${version}";
+    hash = "sha256-TVM4MrA4W6AIWEdBIecI85ahJAAc21f27OzCxSpOoZU=";
+  };
+
+  build-system = [
+    setuptools
+    wheel
+  ];
+
+  dependencies = [
+    gymnasium
+    numpy
+  ];
+
+  passthru.optional-dependencies = {
+    all = [
+      chess
+      # multi-agent-ale-py
+      pillow
+      pybox2d
+      pygame
+      pymunk
+      rlcard
+      scipy
+      # shimmy
+    ];
+    atari = [
+      # multi-agent-ale-py
+      pygame
+    ];
+    butterfly = [
+      pygame
+      pymunk
+    ];
+    classic = [
+      chess
+      pygame
+      rlcard
+      # shimmy
+    ];
+    mpe = [
+      pygame
+    ];
+    other = [
+      pillow
+    ];
+    sisl = [
+      pybox2d
+      pygame
+      pymunk
+      scipy
+    ];
+    testing = [
+      # autorom
+      pre-commit
+      pynput
+      pytest
+      pytest-cov
+      pytest-markdown-docs
+      pytest-xdist
+    ];
+  };
+
+  pythonImportsCheck = [
+    "pettingzoo"
+  ];
+
+  nativeCheckInputs = [
+    chess
+    pygame
+    pymunk
+    pytest-markdown-docs
+    pytest-xdist
+    pytestCheckHook
+    rlcard
+  ];
+
+  disabledTestPaths = [
+    # Require unpackaged multi_agent_ale_py
+    "test/all_parameter_combs_test.py"
+    "test/pickle_test.py"
+    "test/unwrapped_test.py"
+  ];
+
+  disabledTests = [
+    # ImportError: cannot import name 'pytest_plugins' from 'pettingzoo.classic'
+    "test_chess"
+  ] ++ lib.optionals stdenv.isDarwin [
+    # Crashes on darwin: `Fatal Python error: Aborted`
+    "test_multi_episode_parallel_env_wrapper"
+  ];
+
+  meta = with lib; {
+    description = "An API standard for multi-agent reinforcement learning environments, with popular reference environments and related utilities";
+    homepage = "https://github.com/Farama-Foundation/PettingZoo";
+    changelog = "https://github.com/Farama-Foundation/PettingZoo/releases/tag/${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ GaetanLepage ];
+  };
+}
diff --git a/pkgs/development/python-modules/portion/default.nix b/pkgs/development/python-modules/portion/default.nix
new file mode 100644
index 0000000000000..5cba2a5792945
--- /dev/null
+++ b/pkgs/development/python-modules/portion/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+, setuptools
+, wheel
+, sortedcontainers
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "portion";
+  version = "2.4.2";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "AlexandreDecan";
+    repo = "portion";
+    rev = "refs/tags/${version}";
+    hash = "sha256-URoyuE0yivUqPjJZbvATkAnTxicY4F2eiJ16rIUdY3Y=";
+  };
+
+  build-system = [
+    setuptools
+    wheel
+  ];
+
+  dependencies = [
+    sortedcontainers
+  ];
+
+  pythonImportsCheck = [
+    "portion"
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  meta = with lib; {
+    description = "Portion, a Python library providing data structure and operations for intervals";
+    homepage = "https://github.com/AlexandreDecan/portion";
+    changelog = "https://github.com/AlexandreDecan/portion/blob/${src.rev}/CHANGELOG.md";
+    license = licenses.lgpl3;
+    maintainers = with maintainers; [ GaetanLepage ];
+  };
+}
diff --git a/pkgs/development/python-modules/pytest-markdown-docs/default.nix b/pkgs/development/python-modules/pytest-markdown-docs/default.nix
new file mode 100644
index 0000000000000..46dcd7d940437
--- /dev/null
+++ b/pkgs/development/python-modules/pytest-markdown-docs/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+, poetry-core
+, markdown-it-py
+, pytest
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "pytest-markdown-docs";
+  version = "0.5.1";
+  pyproject = true;
+
+  disabled = pythonOlder "3.8";
+
+  src = fetchFromGitHub {
+    owner = "modal-com";
+    repo = "pytest-markdown-docs";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-mclN28tfPcoFxswECjbrkeOI51XXSqUXfbvuSHrd7Sw=";
+  };
+
+  build-system = [
+    poetry-core
+  ];
+
+  dependencies = [
+    markdown-it-py
+    pytest
+  ];
+
+  pythonImportsCheck = [
+    "pytest_markdown_docs"
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  meta = with lib; {
+    description = "Run pytest on markdown code fence blocks";
+    homepage = "https://github.com/modal-com/pytest-markdown-docs";
+    license = licenses.mit;
+    maintainers = with maintainers; [ GaetanLepage ];
+  };
+}
diff --git a/pkgs/development/python-modules/rq/default.nix b/pkgs/development/python-modules/rq/default.nix
index 7eb455a6dc82c..a0ed2d38b2d86 100644
--- a/pkgs/development/python-modules/rq/default.nix
+++ b/pkgs/development/python-modules/rq/default.nix
@@ -20,7 +20,7 @@
 
 buildPythonPackage rec {
   pname = "rq";
-  version = "1.16.1";
+  version = "1.16.2";
   pyproject = true;
 
   disabled = pythonOlder "3.7";
@@ -29,7 +29,7 @@ buildPythonPackage rec {
     owner = "rq";
     repo = "rq";
     rev = "refs/tags/v${version}";
-    hash = "sha256-1E7jPTSQCjuKZVFL4uZqL1WZHnxWSLTNcnpyvfHz7oY=";
+    hash = "sha256-8uhCV4aJNbY273jOa9D5OlgEG1w3hXVncClKQTO9Pyk=";
   };
 
   build-system = [
diff --git a/pkgs/development/python-modules/scalene/default.nix b/pkgs/development/python-modules/scalene/default.nix
index 18eebe07cc198..f8684a16cbf2a 100644
--- a/pkgs/development/python-modules/scalene/default.nix
+++ b/pkgs/development/python-modules/scalene/default.nix
@@ -27,15 +27,6 @@ buildPythonPackage rec {
     hash = "sha256-B4pDLP3+56toQZyvh6+6NimCKv0cpcO0ydcqV1tJZkg=";
   };
 
-  patches = [
-    # fix scalene_config import. remove on next update
-    (fetchpatch {
-      name = "scalene_config-import-fix.patch";
-      url = "https://github.com/plasma-umass/scalene/commit/cd437be11f600ac0925ce77efa516e6d83934200.patch";
-      hash = "sha256-YjFh+mu5jyIJYUQFhmGqLXhec6lgQAdj4tWxij3NkwU=";
-    })
-  ];
-
   nativeBuildInputs = [
     cython
     setuptools
@@ -61,14 +52,6 @@ buildPythonPackage rec {
     numpy
   ];
 
-  disabledTestPaths = [
-    # remove on next update
-    # Failing Darwin-specific tests that were subsequently removed from the source repo.
-    "tests/test_coverup_35.py"
-    "tests/test_coverup_42.py"
-    "tests/test_coverup_43.py"
-  ];
-
   # remove scalene directory to prevent pytest import confusion
   preCheck = ''
     rm -rf scalene
diff --git a/pkgs/development/python-modules/scooby/default.nix b/pkgs/development/python-modules/scooby/default.nix
index 869a1a5895014..229ba0526a970 100644
--- a/pkgs/development/python-modules/scooby/default.nix
+++ b/pkgs/development/python-modules/scooby/default.nix
@@ -13,7 +13,7 @@
 
 buildPythonPackage rec {
   pname = "scooby";
-  version = "0.9.2";
+  version = "0.10.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
@@ -22,7 +22,7 @@ buildPythonPackage rec {
     owner = "banesullivan";
     repo = "scooby";
     rev = "refs/tags/v${version}";
-    hash = "sha256-x6GPRo0OuXJtN41urviY0joZKzq0SQjUdRBpIylgcXY=";
+    hash = "sha256-KXhLN8KPz61l+4v88+kVSvodT6OXDJ3Pw9A9aFWSqYE=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/torchsnapshot/default.nix b/pkgs/development/python-modules/torchsnapshot/default.nix
new file mode 100644
index 0000000000000..62f6fd6b24def
--- /dev/null
+++ b/pkgs/development/python-modules/torchsnapshot/default.nix
@@ -0,0 +1,71 @@
+{
+  lib,
+  buildPythonPackage,
+  pythonOlder,
+  fetchFromGitHub,
+  setuptools,
+  wheel,
+  aiofiles,
+  aiohttp,
+  importlib-metadata,
+  nest-asyncio,
+  psutil,
+  pyyaml,
+  torch,
+  typing-extensions,
+  pytest-asyncio,
+  pytestCheckHook,
+  pythonAtLeast,
+  stdenv,
+}:
+
+buildPythonPackage rec {
+  pname = "torchsnapshot";
+  version = "0.1.0";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "pytorch";
+    repo = "torchsnapshot";
+    rev = "refs/tags/${version}";
+    hash = "sha256-F8OaxLH8BL6MPNLFv1hBuVmeEdnEQ5w2Qny6by1wP6k=";
+  };
+
+  build-system = [
+    setuptools
+    wheel
+  ];
+
+  dependencies = [
+    aiofiles
+    aiohttp
+    importlib-metadata
+    nest-asyncio
+    psutil
+    pyyaml
+    torch
+    typing-extensions
+  ];
+
+  pythonImportsCheck = [ "torchsnapshot" ];
+
+  nativeCheckInputs = [
+    pytest-asyncio
+    pytestCheckHook
+  ];
+
+  meta = with lib; {
+    description = "A performant, memory-efficient checkpointing library for PyTorch applications, designed with large, complex distributed workloads in mind";
+    homepage = "https://github.com/pytorch/torchsnapshot/";
+    changelog = "https://github.com/pytorch/torchsnapshot/releases/tag/${version}";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ GaetanLepage ];
+    broken =
+      # https://github.com/pytorch/torchsnapshot/issues/175
+      pythonAtLeast "3.12"
+      # ModuleNotFoundError: No module named 'torch._C._distributed_c10d'; 'torch._C' is not a package
+      || stdenv.isDarwin;
+  };
+}
diff --git a/pkgs/development/python-modules/winacl/default.nix b/pkgs/development/python-modules/winacl/default.nix
index ab27147d6519c..3ff55cf32a72b 100644
--- a/pkgs/development/python-modules/winacl/default.nix
+++ b/pkgs/development/python-modules/winacl/default.nix
@@ -1,37 +1,32 @@
-{ lib
-, buildPythonPackage
-, cryptography
-, fetchPypi
-, pythonOlder
+{
+  lib,
+  buildPythonPackage,
+  cryptography,
+  fetchPypi,
+  pythonOlder,
+  setuptools,
 }:
 
 buildPythonPackage rec {
   pname = "winacl";
-  version = "0.1.8";
-  format = "setuptools";
+  version = "0.1.9";
+  pyproject = true;
 
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-RCcaMCVi3lFin2jvFUDUDzom57wBc2RrAaZ3nO2tZEw=";
+    hash = "sha256-r3DC7DAXi/njyKHEjCXoeBI1/iwbMhrbRuLyrh+NSqs=";
   };
 
-  propagatedBuildInputs = [
-    cryptography
-  ];
+  build-system = [ setuptools ];
 
-  postPatch = ''
-    substituteInPlace setup.py \
-      --replace "cryptography>=38.0.1" "cryptography"
-  '';
+  dependencies = [ cryptography ];
 
   # Project doesn't have tests
   doCheck = false;
 
-  pythonImportsCheck = [
-    "winacl"
-  ];
+  pythonImportsCheck = [ "winacl" ];
 
   meta = with lib; {
     description = "Python module for ACL/ACE/Security descriptor manipulation";
diff --git a/pkgs/development/python-modules/yolink-api/default.nix b/pkgs/development/python-modules/yolink-api/default.nix
index c1b4703ea4d4a..8a567cd5a51e3 100644
--- a/pkgs/development/python-modules/yolink-api/default.nix
+++ b/pkgs/development/python-modules/yolink-api/default.nix
@@ -12,7 +12,7 @@
 
 buildPythonPackage rec {
   pname = "yolink-api";
-  version = "0.4.3";
+  version = "0.4.4";
   pyproject = true;
 
   disabled = pythonOlder "3.7";
@@ -21,7 +21,7 @@ buildPythonPackage rec {
     owner = "YoSmart-Inc";
     repo = "yolink-api";
     rev = "refs/tags/v${version}";
-    hash = "sha256-cLuto2V5i3au1MRYYbgR2plw9YBpgIAxsG2fu4t37jk=";
+    hash = "sha256-yRxv3Itj+SkLtj5rErOzJoxj0JhsAWrdi0DucKZKKIU=";
   };
 
   build-system = [ setuptools ];