diff mbox series

[bug#69073] gnu: Add python-gymnasium.

Message ID 2187e1c4674f989b876d4de0bfbf805fdd4ae81b.1707747007.git.timothee.mathieu@inria.fr
State New
Headers show
Series [bug#69073] gnu: Add python-gymnasium. | expand

Commit Message

Timothee Mathieu Feb. 12, 2024, 2:10 p.m. UTC
* gnu/packages/machine-learning.scm (python-gymnasium): New variable.

Change-Id: I22564c63b24ae98896f2e7b7da679463bd6b8496
---
 gnu/packages/machine-learning.scm | 53 +++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)


base-commit: 5d2302a1959d09e6d5a5f02ac199458095847a82

Comments

Ricardo Wurmus Feb. 16, 2024, 7:01 a.m. UTC | #1
Thank you for your patch!  I split it into two commits, updated the
description, and made other minor changes.

Pushed to the master branch with commit
c83d67b8099c77a9c9afcf4b6960bf27e225cd66.

Thanks!
diff mbox series

Patch

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 7653608fd9..e052ff9054 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -5365,3 +5365,56 @@  (define-public oneapi-dnnl
      "OneAPI Deep Neural Network Library (oneDNN) is a cross-platform
 performance library of basic building blocks for deep learning applications.")
     (license license:asl2.0)))
+
+
+(define-public python-gymnasium
+  (package
+    (name "python-gymnasium")
+    (version "0.29.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "gymnasium" version))
+       (sha256
+        (base32 "1cab4wsnlsxn2z90qmymv8ppmsq8yq2amiqwid3r0xfbxx92flqs"))))
+
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (replace 'check
+                     (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+                       (when tests?
+                         (add-installed-pythonpath inputs outputs)
+                         (invoke "touch" "tests/__init__.py")
+                         (invoke "pytest")))))))
+
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-cloudpickle python-farama-notifications
+                             python-importlib-metadata python-numpy
+                             python-typing-extensions))
+    (native-inputs (list python-pytest python-scipy))
+    (home-page "https://gymnasium.farama.org/")
+    (synopsis
+     "Standard API for reinforcement learning and a set of reference environments")
+    (description
+     "This package provides a standard API for reinforcement learning and a diverse
+set of reference environments (formerly Gym).")
+    (license license:expat)))
+
+
+(define-public python-farama-notifications
+  (package
+    (name "python-farama-notifications")
+    (version "0.0.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "Farama-Notifications" version))
+       (sha256
+        (base32 "067xbra8xicgk7p6wcv5s73k6dxz5r36d0iwf20cy523s7rfzz0k"))))
+    (build-system pyproject-build-system)
+    (home-page "https://github.com/Farama-Foundation/Farama-Notifications")
+    (synopsis "Notifications for all Farama Foundation maintained libraries")
+    (description
+     "Notifications for all Farama Foundation maintained libraries.")
+    (license license:expat)))