diff mbox series

[bug#54067] gnu: Add python-gym.

Message ID MwIsxM4--3-2@tutanota.com
State New
Headers show
Series [bug#54067] gnu: Add python-gym. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

dziltener--- via Guix-patches via Feb. 19, 2022, 9:29 p.m. UTC
Importing this module in python fails because python-importlib-metadata is too old. At least it builds successfully when sanity check is disabled.

Comments

M Feb. 20, 2022, 10:35 a.m. UTC | #1
kiasoc5--- via Guix-patches via schreef op za 19-02-2022 om 22:29 [+0100]:
Importing this module in python fails because python-importlib-
metadata is too old.
> +         (delete 'sanity-check))))   ; requires python-importlib-metadata>4.10

In that case, could python-importlib-metadata be updated?

Greetings,
Maxime.
M Feb. 20, 2022, 10:36 a.m. UTC | #2
kiasoc5--- via Guix-patches via schreef op za 19-02-2022 om 22:29
[+0100]:
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (delete 'check)   ; tests require nonfree library

How about setting the #:tests? argument instead?

  (arguments
    (list
      #:tests? #false ; tests require nonfree library
      #:phases
      #~(modify-phases ...)))

Greetings,
Maxime.
M Feb. 20, 2022, 7:12 p.m. UTC | #3
[Please keep 54067@debbugs.gnu.org in CC, such that other people
can comment]

kiasoc5@tutanota.com schreef op zo 20-02-2022 om 19:50 [+0100]:
Of course updating python-importlib-metadata is the natural option,
> I don't intend to submit broken patches. But I'm not sure whether
> updating python-importlib-metadata will be smooth, if I run guix
> refresh -l python-importlib-metadata, it says `Building the following
> 74 packages would ensure 131 dependent packages are rebuilt`. It's a
> lot of packages to comb through.

What I'd usually do for testing is

$ ./pre-inst-env guix build python-astroquery@0.4.5 vorta@0.8.3 komikku@0.36.1 [...]

and verify that the builds succeeded.

If their test suites are good, this should catch most issues.
Python packages are typically relatively cheap to build I think, so this
shouldn't take overly long.

We'll have to update python-importlib-metadata anyway eventually,
and it's not realistic to test each individual dependent manually.

> Is there any policy on testing packages for breakage when upgrading?
> Apologies, I should have asked this earlier.

There's (guix)Submitting patches:

  10. For important changes, check that dependent packages (if
     applicable) are not affected by the change; ‘guix refresh
     --list-dependent PACKAGE’ will help you do that (*note Invoking
     guix refresh::).

[...]

     All these branches are tracked by our build farm
     (https://ci.guix.gnu.org) and merged into ‘master’ once everything
     has been successfully built.  This allows us to fix issues before
     they hit users, and to reduce the window during which pre-built
     binaries are not available.

(so if building the python packages locally takes too long,
perhaps a temporary branch can be set up to let the build farm
take care of building).

Greetings,
Maxime.
Sharlatan Hellseher Jan. 29, 2024, 9:58 p.m. UTC | #4
From the project's page https://github.com/openai/gym:

> The team that has been maintaining Gym since 2021 has moved all future
> development to Gymnasium, a drop in replacement for Gym (import
> gymnasium as gym), and Gym will not be receiving any future updates.
> Please switch over to Gymnasium as soon as you're able to do so. If
> you'd like to read more about the story behind this switch, please check
> out this blog post.

Gymnasium is successor of Gym.
Closing as not actual. 

Thanks,
Oleg
diff mbox series

Patch

From 2fd8ce0ccab54cc94269f6d03be755d5e145027f Mon Sep 17 00:00:00 2001
From: kiasoc5 <kiasoc5@tutanota.com>
Date: Sat, 19 Feb 2022 16:25:01 -0500
Subject: [PATCH] gnu: Add python-gym.

* gnu/packages/python-science.scm (python-gym): New variable.
---
 gnu/packages/python-science.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index d9af3352b9..baf621870d 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1074,3 +1074,28 @@  (define-public python-modin
 libraries, Modin provides seamless integration and compatibility with existing
 pandas code.")
     (license license:asl2.0)))
+
+(define-public python-gym
+  (package
+    (name "python-gym")
+    (version "0.22.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "gym" version))
+        (sha256
+          (base32 "138lk1irl9qr7yg6kng9z6aicbqfphcij4bqqf3q2xaik744949k"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'check)   ; tests require nonfree library
+         (delete 'sanity-check))))   ; requires python-importlib-metadata>4.10
+    (propagated-inputs
+      (list python-cloudpickle python-numpy python-importlib-metadata))
+    (home-page "https://github.com/openai/gym")
+    (synopsis "Gym: A universal API for reinforcement learning environments.")
+    (description
+      "Gym: A universal API for reinforcement learning environments.")
+    (license license:expat)))
+

base-commit: f8aa8899e265a46fd3dff6c717ec484057ba2b68
-- 
2.35.1