[PATCH] gnu: Add python-gym.

  • Done
  • quality assurance status badge
Details
3 participants
  • kiasoc5
  • Maxime Devos
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
kiasoc5
Severity
normal

Debbugs page

kiasoc5 wrote 3 years ago
(name . Guix Patches)(address . guix-patches@gnu.org)
MwIsxM4--3-2@tutanota.com
Importing this module in python fails because python-importlib-metadata is too old. At least it builds successfully when sanity check is disabled.
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(+)

Toggle diff (37 lines)
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
Maxime Devos wrote 3 years ago
5e78604c1d9d92f57b76d3a97a1a38fa37439e88.camel@telenet.be
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.
Toggle quote (2 lines)
> + (delete 'sanity-check)))) ; requires python-importlib-metadata>4.10

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

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYhIZXBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7u2aAP41F93KPJupxydaDqSXrhI8RID6
3sOBHRpWtkIhJvTzBAD+MtBqMaW0OEJzJCXgt5KayUCEgf84cG5PHXAEni5LUQA=
=IMLH
-----END PGP SIGNATURE-----


Maxime Devos wrote 3 years ago
93bbe0ce19a4c82a61fa8003f59b29541c2f8031.camel@telenet.be
kiasoc5--- via Guix-patches via schreef op za 19-02-2022 om 22:29
[+0100]:
Toggle quote (4 lines)
> +     `(#: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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYhIZsRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7iqHAQDQ6u9cfJjUtRFLQaUgVUjneBnT
3lGYDis05iURXCJwlQEAz2rLhJMJBz7kTL4SrNtgYulxJKAbGnYRpWHfeMXoSwo=
=lJZN
-----END PGP SIGNATURE-----


Maxime Devos wrote 3 years ago
(address . kiasoc5@tutanota.com)(address . 54067@debbugs.gnu.org)
2b303c132c84ede022018837a29147e9d2fb7075.camel@telenet.be
[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,
Toggle quote (6 lines)
> 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.

Toggle quote (3 lines)
> 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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYhKStRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7vq8AQDCyKM9fDj5K/hkwRRy5GsFXPhz
8uwLShKrok6K4dK9fwD/ebtV97Brg9YwT5C8CnCQdjLcsyRjMXC646GYeDh8rw0=
=LoWD
-----END PGP SIGNATURE-----


Sharlatan Hellseher wrote 1 years ago
[PATCH] gnu: Add python-gym.
(address . 54067-done@debbugs.gnu.org)
878r47u7hw.fsf@gmail.com
From the project's page https://github.com/openai/gym:

Toggle quote (7 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmW4H4sACgkQdtcnv/Ys
0rXFqg//YhZOlUUxiTKGALKtOTAtuJyPB+cQxZ1Lj+LOzDUmK4n121yMMHn1xO/I
fnV2U9Ca6BroMTpeZbyxQNDVdE3zF4HdVcjslPimPFgqy+2n0tjNW01Ss9V6bPAc
diXjObT+o0cZ4ljiScv0uxA1WGOC9tSVGH8lzaR4qgF6I2UT/Mb9f11/6N6EipwV
FLSHnesbTyhxtnlaESBmK7c7oY9YqX/psCiZVMAXRI13/gsZLFLmzYfABVntIIZj
C6DABMihmKt8bofCjrrotlvLIJC9cTlbcGHQsVt1bGwU9ZmBSJGAuHMgMOa69bVY
o4OcrzNsXPxsHC0zFM0NE8Yz1CzQDwIXHxHBo5KLKTVWYe3Ko1jECZwVpKtbzRFr
7XSjqKhc/6TNK1UUg1tgBcs2IRl/uB7pfbFdqn8Oa/MPeIN/7Ooshgm/r9w05wdp
uNfV2rcNHP5RP57NSRdckBK8LBkvh9pw2wDKRQAxrHcueUnujo6dNVy+HN/QnxMG
gT0gB5t78n1syGMjUeQL6RM3xfHyHutHN8r9SelwHPvZoBbFWxFOFV6qjiT5toUO
dE8qnOBUB2pwGZzuLCDxWQWLBD4vW/CxEQRB71L4/QS3MANVD4X9ltpeDqc3LgMn
kzmb3x/bb9p+5QYIOZ3pf1aEFBIqoSL0TeqCDCHq6LnZbwxdKLA=
=nHUc
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 54067@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 54067
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help