GNU bug report logs - #66929
[PATCH 00/10] Add python-quadpy and dependencies.

Previous Next

Package: guix-patches;

Reported by: Felix Gruber <felgru <at> posteo.net>

Date: Sat, 4 Nov 2023 15:02:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66929 in the body.
You can then email your comments to 66929 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#66929; Package guix-patches. (Sat, 04 Nov 2023 15:02:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Felix Gruber <felgru <at> posteo.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 04 Nov 2023 15:02:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Felix Gruber <felgru <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: Felix Gruber <felgru <at> posteo.net>
Subject: [PATCH 00/10] Add python-quadpy and dependencies.
Date: Sat,  4 Nov 2023 15:00:34 +0000
This patchset adds the quadpy Python library which collects a large
number of different numerical integration algorithms.

I've packaged a fork of the last GPL-licensed version of quadpy. Newer
versions are distributed under a proprietary license and the history of
the original git repository on https://github.com/nschloe/quadpy had
been removed (hence I'm referring to a fork in the source and home-page
fields). The same holds for the python-orthopy, python-ndim,
python-accupy and python-meshzoo packages.
Also, quadpy stores some required data files via git-lfs. I couldn't
figure out how to download those git-lfs stored files in the source of
the python-quadpy package. In the end, I resorted to instead point the
source field to a zip file that contained the source code including
those data files.

Felix Gruber (10):
  gnu: Add python-meshzoo.
  gnu: Add python-matplotx.
  gnu: Add python-npx.
  gnu: Add python-cplot.
  gnu: Add python-perfplot.
  gnu: Add python-pyfma.
  gnu: Add python-accupy.
  gnu: Add python-ndim.
  gnu: Add python-orthopy.
  gnu: Add python-quadpy.

 gnu/local.mk                                  |   4 +-
 gnu/packages/maths.scm                        | 145 ++++++++++++++++++
 .../python-accupy-fix-use-of-perfplot.patch   |  48 ++++++
 .../patches/python-accupy-use-matplotx.patch  | 113 ++++++++++++++
 gnu/packages/python-science.scm               |  52 ++++++-
 gnu/packages/python-xyz.scm                   | 110 ++++++++++++-
 6 files changed, 469 insertions(+), 3 deletions(-)
 create mode 100644 gnu/packages/patches/python-accupy-fix-use-of-perfplot.patch
 create mode 100644 gnu/packages/patches/python-accupy-use-matplotx.patch


base-commit: 9dcd8802f5bc472579f23a38dcf437f8a9ac976c
-- 
2.42.0





Information forwarded to guix-patches <at> gnu.org:
bug#66929; Package guix-patches. (Sat, 04 Nov 2023 15:04:01 GMT) Full text and rfc822 format available.

Message #8 received at 66929 <at> debbugs.gnu.org (full text, mbox):

From: Felix Gruber <felgru <at> posteo.net>
To: 66929 <at> debbugs.gnu.org
Cc: Felix Gruber <felgru <at> posteo.net>
Subject: [PATCH 01/10] gnu: Add python-meshzoo.
Date: Sat,  4 Nov 2023 15:02:30 +0000
* gnu/packages/python-science.scm (python-meshzoo): New variable.

Change-Id: Ia41d62ebd6c4cb3c22ebe0668c36279a9ca191ac
---
 gnu/packages/python-science.scm | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 4063797a30..275f9a27c1 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -14,7 +14,7 @@
 ;;; Copyright © 2021 Roel Janssen <roel <at> gnu.org>
 ;;; Copyright © 2021 Paul Garlick <pgarlick <at> tourbillion-technology.com>
 ;;; Copyright © 2021 Arun Isaac <arunisaac <at> systemreboot.net>
-;;; Copyright © 2021 Felix Gruber <felgru <at> posteo.net>
+;;; Copyright © 2021, 2023 Felix Gruber <felgru <at> posteo.net>
 ;;; Copyright © 2022 Malte Frank Gerdes <malte.f.gerdes <at> gmail.com>
 ;;; Copyright © 2022 Guillaume Le Vaillant <glv <at> posteo.net>
 ;;; Copyright © 2022 Paul A. Patience <paul <at> apatience.com>
@@ -387,6 +387,31 @@ (define-public python-trimesh
 library.")
     (license license:expat)))
 
+(define-public python-meshzoo
+  (package
+    (name "python-meshzoo")
+    (version "0.9.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/diego-hayashi/meshzoo")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "107byfppbq16fqyp2hw7ydcvvahspzq0hzvlvzqg2zxi1aigbr68"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs
+      (list python-numpy))
+    (native-inputs (list python-flit-core python-matplotlib python-pytest))
+    (home-page "https://github.com/diego-hayashi/meshzoo")
+    (synopsis "Mesh generator for simple geometries")
+    (description
+      "@code{meshzoo} is a mesh generator for finite element or finite
+volume computations for simple domains like regular polygons, disks,
+spheres, cubes, etc.")
+    (license license:gpl3)))
+
 (define-public python-tspex
   (package
     (name "python-tspex")
-- 
2.42.0





Information forwarded to guix-patches <at> gnu.org:
bug#66929; Package guix-patches. (Sat, 04 Nov 2023 15:05:02 GMT) Full text and rfc822 format available.

Message #11 received at 66929 <at> debbugs.gnu.org (full text, mbox):

From: Felix Gruber <felgru <at> posteo.net>
To: 66929 <at> debbugs.gnu.org
Cc: Felix Gruber <felgru <at> posteo.net>
Subject: [PATCH 02/10] gnu: Add python-matplotx.
Date: Sat,  4 Nov 2023 15:02:31 +0000
* gnu/packages/python-xyz.scm (python-matplotx): New variable.

Change-Id: I354732edeaa30cbae506e78a16f42e66edb3011b
---
 gnu/packages/python-xyz.scm | 39 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 38 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e521c1580d..33b0c401ef 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -108,7 +108,7 @@
 ;;; Copyright © 2021 Simon Streit <simon <at> netpanic.org>
 ;;; Copyright © 2021, 2022, 2023 Daniel Meißner <daniel.meissner-i4k <at> ruhr-uni-bochum.de>
 ;;; Copyright © 2021, 2022 Pradana Aumars <paumars <at> courrier.dev>
-;;; Copyright © 2021, 2022 Felix Gruber <felgru <at> posteo.net>
+;;; Copyright © 2021, 2022, 2023 Felix Gruber <felgru <at> posteo.net>
 ;;; Copyright © 2021 Sébastien Lerique <sl <at> eauchat.org>
 ;;; Copyright © 2021 Raphaël Mélotte <raphael.melotte <at> mind.be>
 ;;; Copyright © 2021 ZmnSCPxj <ZmnSCPxj <at> protonmail.com>
@@ -8262,6 +8262,43 @@ (define-public python-matplotlib-venn
 three-way Venn diagrams in @code{matplotlib}.")
     (license license:expat)))
 
+(define-public python-matplotx
+  (package
+    (name "python-matplotx")
+    (version "0.3.10")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/nschloe/matplotx")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1j301mr7ai2jmbm5mkva0jd99fzxhyq585pqzqfmrf5pil8j4q8i"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs
+      (list python-matplotlib
+            python-numpy
+            ;; optional dependencies
+            python-networkx
+            python-pypng
+            python-scipy))
+    (native-inputs (list python-imageio
+                         python-meshzoo
+                         python-pytest
+                         python-scikit-fem))
+    (arguments
+     (list
+      #:test-flags
+      ;; This test fails with ValueError: not enough values to unpack.
+      #~(list "--deselect" "tests/test_spy.py::test_cli")))
+    (home-page "https://github.com/nschloe/matplotx")
+    (synopsis "Minimal matplotlib styles")
+    (description
+      "This package includes some extensions for Matplotlib to create
+clean plots with a minimalistic style.")
+    (license license:expat)))
+
 (define-public python-pysnptools
   (package
     (name "python-pysnptools")
-- 
2.42.0





Information forwarded to guix-patches <at> gnu.org:
bug#66929; Package guix-patches. (Sat, 04 Nov 2023 15:05:02 GMT) Full text and rfc822 format available.

Message #14 received at 66929 <at> debbugs.gnu.org (full text, mbox):

From: Felix Gruber <felgru <at> posteo.net>
To: 66929 <at> debbugs.gnu.org
Cc: Felix Gruber <felgru <at> posteo.net>
Subject: [PATCH 03/10] gnu: Add python-npx.
Date: Sat,  4 Nov 2023 15:02:32 +0000
* gnu/packages/python-xyz.scm (python-npx): New variable.

Change-Id: I9520ce12a936c68d38f2ac706165eff816d8b1ad
---
 gnu/packages/python-xyz.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 33b0c401ef..54e1086af8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -7431,6 +7431,28 @@ (define-public python-numpy-documentation
     (description "This package provides the complete NumPy documentation in
 the Texinfo, HTML, and PDF formats.")))
 
+(define-public python-npx
+  (package
+    (name "python-npx")
+    (version "0.1.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "npx" version))
+              (sha256
+               (base32
+                "1m0v2p5mh3aqrypl4ipgzvr5nhx7bk5vv9ah2xr9l1xgj6nnmqnc"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-numpy))
+    (native-inputs (list python-flit-core python-networkx python-pytest))
+    (home-page "https://github.com/nschloe/npx")
+    (synopsis "Extensions for NumPy")
+    (description "NumPy is a large library used everywhere in scientific
+computing.  That's why breaking backwards-compatibility comes at a
+significant cost and is almost always avoided, even if the API of some
+methods is arguably lacking.  This package provides drop-in wrappers
+\"fixing\" those.")
+    (license license:bsd-3)))
+
 (define-public python-munch
   (package
     (name "python-munch")
-- 
2.42.0





Information forwarded to guix-patches <at> gnu.org:
bug#66929; Package guix-patches. (Sat, 04 Nov 2023 15:05:03 GMT) Full text and rfc822 format available.

Message #17 received at 66929 <at> debbugs.gnu.org (full text, mbox):

From: Felix Gruber <felgru <at> posteo.net>
To: 66929 <at> debbugs.gnu.org
Cc: Felix Gruber <felgru <at> posteo.net>
Subject: [PATCH 04/10] gnu: Add python-cplot.
Date: Sat,  4 Nov 2023 15:02:33 +0000
* gnu/packages/python-xyz.scm (python-cplot): New variable.

Change-Id: I8e634799954b120e00d900ae26b16af1717d4474
---
 gnu/packages/python-xyz.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 54e1086af8..f2e55e2788 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -8321,6 +8321,31 @@ (define-public python-matplotx
 clean plots with a minimalistic style.")
     (license license:expat)))
 
+(define-public python-cplot
+  (package
+    (name "python-cplot")
+    (version "0.9.3")
+    (source
+     (origin
+       (method git-fetch)   ;for tests
+       (uri (git-reference
+             (url "https://github.com/nschloe/cplot")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0zk7hpq358sbympmkms7w2wjs7nw8mdfvkvdasblg2nhqayv42qz"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-matplotlib
+                             python-matplotx
+                             python-npx
+                             python-numpy))
+    (native-inputs (list python-pytest))
+    (home-page "https://github.com/nschloe/cplot")
+    (synopsis "Plot complex-valued functions")
+    (description "@code{cplot} is a Python library for plotting
+complex-valued functions.")
+    (license license:gpl3)))
+
 (define-public python-pysnptools
   (package
     (name "python-pysnptools")
-- 
2.42.0





Information forwarded to guix-patches <at> gnu.org:
bug#66929; Package guix-patches. (Sat, 04 Nov 2023 15:05:03 GMT) Full text and rfc822 format available.

Message #20 received at 66929 <at> debbugs.gnu.org (full text, mbox):

From: Felix Gruber <felgru <at> posteo.net>
To: 66929 <at> debbugs.gnu.org
Cc: Felix Gruber <felgru <at> posteo.net>
Subject: [PATCH 05/10] gnu: Add python-perfplot.
Date: Sat,  4 Nov 2023 15:02:34 +0000
* gnu/packages/python-xyz.scm (python-perfplot): New variable.

Change-Id: I04266dfd7081bd3f917a48b2667137b829680498
---
 gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f2e55e2788..b69cd19f45 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -8346,6 +8346,30 @@ (define-public python-cplot
 complex-valued functions.")
     (license license:gpl3)))
 
+(define-public python-perfplot
+  (package
+    (name "python-perfplot")
+    (version "0.10.2")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "perfplot" version))
+              (sha256
+               (base32
+                "0hbyv17f9ra6l6albcrqx4rylmfv2m6z4qsnhb4bar256dralvfp"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-matplotlib
+                             python-matplotx
+                             python-numpy
+                             python-rich))
+    (native-inputs (list python-flit-core
+                         python-pytest))
+    (home-page "https://github.com/nschloe/perfplot")
+    (synopsis "Performance plots for Python code snippets")
+    (description "@code{perfplot} extends Python's timeit by testing
+snippets with input parameters (e.g., the size of an array) and plotting
+the results.")
+    (license license:gpl3)))
+
 (define-public python-pysnptools
   (package
     (name "python-pysnptools")
-- 
2.42.0





Information forwarded to guix-patches <at> gnu.org:
bug#66929; Package guix-patches. (Sat, 04 Nov 2023 15:05:04 GMT) Full text and rfc822 format available.

Message #23 received at 66929 <at> debbugs.gnu.org (full text, mbox):

From: Felix Gruber <felgru <at> posteo.net>
To: 66929 <at> debbugs.gnu.org
Cc: Felix Gruber <felgru <at> posteo.net>
Subject: [PATCH 06/10] gnu: Add python-pyfma.
Date: Sat,  4 Nov 2023 15:02:35 +0000
* gnu/packages/python-science.scm (python-pyfma): New variable.

Change-Id: I354d3d56f2799c8c9ac9b868fcacbf88dcc5c25d
---
 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 275f9a27c1..83255fff90 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1858,6 +1858,31 @@ (define-public python-gpy
 machine learning algorithms based on GPs.")
     (license license:bsd-3)))
 
+(define-public python-pyfma
+  (package
+    (name "python-pyfma")
+    (version "0.1.6")
+    (source (origin
+              (method git-fetch)   ;for tests
+              (uri (git-reference
+                    (url "https://github.com/nschloe/pyfma")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "12i68jj9n1qj9phjnj6f0kmfhlsd3fqjlk9p6d4gs008azw5m8yn"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-numpy))
+    (native-inputs (list pybind11 python-pytest))
+    (home-page "https://github.com/nschloe/pyfma")
+    (synopsis "Fused multiply-add for Python")
+    (description "@code{pyfma} provides an implementation of fused
+multiply-add which computes @code{(x*y) + z} with a single rounding.
+This is useful for dot products, matrix multiplications, polynomial
+evaluations (e.g., with Horner's rule), Newton's method for evaluating
+functions, convolutions, artificial neural networks etc.")
+    (license license:expat)))
+
 (define-public python-pydicom
   (package
     (name "python-pydicom")
-- 
2.42.0





Information forwarded to guix-patches <at> gnu.org:
bug#66929; Package guix-patches. (Sat, 04 Nov 2023 15:05:04 GMT) Full text and rfc822 format available.

Message #26 received at 66929 <at> debbugs.gnu.org (full text, mbox):

From: Felix Gruber <felgru <at> posteo.net>
To: 66929 <at> debbugs.gnu.org
Cc: Felix Gruber <felgru <at> posteo.net>
Subject: [PATCH 07/10] gnu: Add python-accupy.
Date: Sat,  4 Nov 2023 15:02:36 +0000
* gnu/packages/maths.scm (python-accupy): New variable.
* gnu/packages/patches/python-accupy-fix-use-of-perfplot.patch: New
  file.
* gnu/packages/patches/python-accupy-use-matplotx.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add new patch files.

Change-Id: I0222665d54a36830844b3b33e3dcb546741cfaa1
---
 gnu/local.mk                                  |   4 +-
 gnu/packages/maths.scm                        |  41 +++++++
 .../python-accupy-fix-use-of-perfplot.patch   |  48 ++++++++
 .../patches/python-accupy-use-matplotx.patch  | 113 ++++++++++++++++++
 4 files changed, 205 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/python-accupy-fix-use-of-perfplot.patch
 create mode 100644 gnu/packages/patches/python-accupy-use-matplotx.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 8d817379a7..3fbdc3ee9d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -31,7 +31,7 @@
 # Copyright © 2020 R Veera Kumar <vkor <at> vkten.in>
 # Copyright © 2020 Nicolò Balzarotti <nicolo <at> nixo.xyz>
 # Copyright © 2020 Michael Rohleder <mike <at> rohleder.de>
-# Copyright © 2020, 2021, 2022 Felix Gruber <felgru <at> posteo.net>
+# Copyright © 2020, 2021, 2022, 2023 Felix Gruber <felgru <at> posteo.net>
 # Copyright © 2020 Ryan Prior <rprior <at> protonmail.com>
 # Copyright © 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia <at> interia.pl>
 # Copyright © 2020, 2021 Brice Waegeneire <brice <at> waegenei.re>
@@ -1753,6 +1753,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/prusa-slicer-fix-tests.patch		\
   %D%/packages/patches/prusa-slicer-with-cereal-1.3.1.patch	\
   %D%/packages/patches/pthreadpool-system-libraries.patch	\
+  %D%/packages/patches/python-accupy-use-matplotx.patch		\
+  %D%/packages/patches/python-accupy-fix-use-of-perfplot.patch	\
   %D%/packages/patches/python-chai-drop-python2.patch		\
   %D%/packages/patches/python-docrepr-fix-tests.patch		\
   %D%/packages/patches/python-feedparser-missing-import.patch	\
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ed1708c77b..28e023190f 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -3648,6 +3648,47 @@ (define-public python-kiwisolver
 savings are consistently > 5x.")
     (license license:bsd-3)))
 
+(define-public python-accupy
+  (package
+    (name "python-accupy")
+    (version "0.3.6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/diego-hayashi/accupy")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0sxkwpp2xy2jgakhdxr4nh1cspqv8l89kz6s832h05pbpyc0n767"))
+       (patches (search-patches "python-accupy-use-matplotx.patch"
+                                "python-accupy-fix-use-of-perfplot.patch"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'set-eigen-include-dir
+            (lambda _
+              (substitute* "setup.py"
+                (("include_dirs=\\[\"\\/usr\\/include\\/eigen3\\/\"\\]," _)
+                 (string-append "include_dirs=[\""
+                                #$(file-append (this-package-input "eigen")
+                                             "/include/eigen3/")
+                                "\"],"))))))))
+    (propagated-inputs (list eigen python-mpmath python-pyfma))
+    (native-inputs (list pybind11
+                         python-matplotx
+                         python-perfplot
+                         python-pytest))
+    (home-page "https://github.com/diego-hayashi/accupy")
+    (synopsis "Accurate calculation of sums and dot products")
+    (description
+      "@code{accupy} is a Python library for accurately computing sums
+and (dot) products.  It implements Kahan summation, Shewchuck's
+algorithm and summation in K-fold precision.")
+    (license license:gpl3)))
+
 (define-public slepc
   (package
     (name "slepc")
diff --git a/gnu/packages/patches/python-accupy-fix-use-of-perfplot.patch b/gnu/packages/patches/python-accupy-fix-use-of-perfplot.patch
new file mode 100644
index 0000000000..5b874e0056
--- /dev/null
+++ b/gnu/packages/patches/python-accupy-fix-use-of-perfplot.patch
@@ -0,0 +1,48 @@
+From 567558a4eb9b73ab30f9e469b36091eccf445f80 Mon Sep 17 00:00:00 2001
+From: Felix Gruber <felgru <at> posteo.net>
+Date: Sun, 23 Apr 2023 16:48:59 +0200
+Subject: [PATCH] Fix use of perfplot.
+
+data tuples are unpacked by perfplot before it calls the kernel
+functions.
+---
+ tests/test_dot.py | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/tests/test_dot.py b/tests/test_dot.py
+index a8160fe..51307ad 100644
+--- a/tests/test_dot.py
++++ b/tests/test_dot.py
+@@ -76,10 +76,10 @@ def test_speed_comparison1(n_range=None):
+     perfplot.plot(
+         setup=lambda n: (np.random.rand(n, 100), np.random.rand(100, n)),
+         kernels=[
+-            lambda xy: np.dot(*xy),
+-            lambda xy: accupy.kdot(*xy, K=2),
+-            lambda xy: accupy.kdot(*xy, K=3),
+-            lambda xy: accupy.fdot(*xy),
++            lambda x, y: np.dot(x, y),
++            lambda x, y: accupy.kdot(x, y, K=2),
++            lambda x, y: accupy.kdot(x, y, K=3),
++            lambda x, y: accupy.fdot(x, y),
+         ],
+         labels=["np.dot", "accupy.kdot[2]", "accupy.kdot[3]", "accupy.fdot"],
+         n_range=n_range,
+@@ -96,10 +96,10 @@ def test_speed_comparison2(n_range=None):
+     perfplot.plot(
+         setup=lambda n: (np.random.rand(100, n), np.random.rand(n, 100)),
+         kernels=[
+-            lambda xy: np.dot(*xy),
+-            lambda xy: accupy.kdot(*xy, K=2),
+-            lambda xy: accupy.kdot(*xy, K=3),
+-            lambda xy: accupy.fdot(*xy),
++            lambda x, y: np.dot(x, y),
++            lambda x, y: accupy.kdot(x, y, K=2),
++            lambda x, y: accupy.kdot(x, y, K=3),
++            lambda x, y: accupy.fdot(x, y),
+         ],
+         labels=["np.dot", "accupy.kdot[2]", "accupy.kdot[3]", "accupy.fdot"],
+         n_range=n_range,
+-- 
+2.39.2
+
diff --git a/gnu/packages/patches/python-accupy-use-matplotx.patch b/gnu/packages/patches/python-accupy-use-matplotx.patch
new file mode 100644
index 0000000000..f3dd17da22
--- /dev/null
+++ b/gnu/packages/patches/python-accupy-use-matplotx.patch
@@ -0,0 +1,113 @@
+From 1da1ed24cfba8a051b6c2f452a67ebfee77ca040 Mon Sep 17 00:00:00 2001
+From: Felix Gruber <felgru <at> posteo.net>
+Date: Sun, 23 Apr 2023 15:42:19 +0200
+Subject: [PATCH] Use dufte style from matplotx.
+
+The stand-alone dufte package has been deprecated in favor of the dufte
+style that has been integrated into matplotx.
+---
+ tests/test_dot.py  | 10 +++++-----
+ tests/test_sums.py | 12 ++++++------
+ tox.ini            |  2 +-
+ 3 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/tests/test_dot.py b/tests/test_dot.py
+index 0a40a0c..a8160fe 100644
+--- a/tests/test_dot.py
++++ b/tests/test_dot.py
+@@ -1,5 +1,5 @@
+-import dufte
+ import matplotlib.pyplot as plt
++import matplotx
+ import numpy as np
+ import perfplot
+ import pytest
+@@ -33,7 +33,7 @@ def test_fdot(cond):
+ 
+ 
+ def test_accuracy_comparison_illcond(target_cond=None):
+-    plt.style.use(dufte.style)
++    plt.style.use(matplotx.styles.dufte)
+ 
+     if target_cond is None:
+         target_cond = [10 ** k for k in range(2)]
+@@ -61,13 +61,13 @@ def test_accuracy_comparison_illcond(target_cond=None):
+     for label, d in zip(labels, data.T):
+         plt.loglog(condition_numbers, d, label=label)
+ 
+-    dufte.legend()
++    matplotx.line_labels()
+     plt.xlabel("condition number")
+-    dufte.ylabel("relative error")
++    matplotx.ylabel_top("relative error")
+ 
+ 
+ def test_speed_comparison1(n_range=None):
+-    plt.style.use(dufte.style)
++    plt.style.use(matplotx.styles.dufte)
+ 
+     if n_range is None:
+         n_range = [2 ** k for k in range(2)]
+diff --git a/tests/test_sums.py b/tests/test_sums.py
+index 1c0f6b0..8cd9ddb 100644
+--- a/tests/test_sums.py
++++ b/tests/test_sums.py
+@@ -1,5 +1,5 @@
+-import dufte
+ import matplotlib.pyplot as plt
++import matplotx
+ import numpy as np
+ import perfplot
+ import pytest
+@@ -32,7 +32,7 @@ def test_fsum(cond):
+ 
+ 
+ def test_accuracy_comparison_illcond(target_conds=None):
+-    plt.style.use(dufte.style)
++    plt.style.use(matplotx.styles.dufte)
+ 
+     if target_conds is None:
+         target_conds = [10 ** k for k in range(1, 2)]
+@@ -71,14 +71,14 @@ def test_accuracy_comparison_illcond(target_conds=None):
+     for label, color, d in zip(labels, colors, data.T):
+         plt.loglog(condition_numbers, d, label=label, color=color)
+ 
+-    dufte.legend()
++    matplotx.line_labels()
+     plt.xlabel("condition number")
+-    dufte.ylabel("relative error")
++    matplotx.ylabel_top("relative error")
+     # plt.gca().set_aspect(1.3)
+ 
+ 
+ def test_speed_comparison1(n_range=None):
+-    plt.style.use(dufte.style)
++    plt.style.use(matplotx.styles.dufte)
+ 
+     if n_range is None:
+         n_range = [2 ** k for k in range(2)]
+@@ -109,7 +109,7 @@ def test_speed_comparison1(n_range=None):
+ 
+ 
+ def test_speed_comparison2(n_range=None):
+-    plt.style.use(dufte.style)
++    plt.style.use(matplotx.styles.dufte)
+ 
+     if n_range is None:
+         n_range = [2 ** k for k in range(2)]
+diff --git a/tox.ini b/tox.ini
+index 79a53ec..524b3bc 100644
+--- a/tox.ini
++++ b/tox.ini
+@@ -4,7 +4,7 @@ isolated_build = True
+ 
+ [testenv]
+ deps =
+-    dufte
++    matplotx
+     perfplot
+     pytest
+     pytest-cov
+-- 
+2.39.2
+
-- 
2.42.0





Information forwarded to guix-patches <at> gnu.org:
bug#66929; Package guix-patches. (Sat, 04 Nov 2023 15:05:04 GMT) Full text and rfc822 format available.

Message #29 received at 66929 <at> debbugs.gnu.org (full text, mbox):

From: Felix Gruber <felgru <at> posteo.net>
To: 66929 <at> debbugs.gnu.org
Cc: Felix Gruber <felgru <at> posteo.net>
Subject: [PATCH 08/10] gnu: Add python-ndim.
Date: Sat,  4 Nov 2023 15:02:37 +0000
* gnu/packages/maths.scm (python-ndim): New variable.

Change-Id: I543f1f5e195f4f2fd5bd70f9ce29ec750a24439b
---
 gnu/packages/maths.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 28e023190f..3c12cf7622 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -162,6 +162,7 @@ (define-module (gnu packages maths)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
@@ -3689,6 +3690,30 @@ (define-public python-accupy
 algorithm and summation in K-fold precision.")
     (license license:gpl3)))
 
+(define-public python-ndim
+  (package
+    (name "python-ndim")
+    (version "0.1.6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/diego-hayashi/ndim")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1hri82k7pcpw9dns8l1f2asa3dm7hjv71wnxi3752258ia2qa44v"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-sympy))
+    (native-inputs (list python-flit-core python-pytest))
+    (home-page "https://github.com/diego-hayashi/ndim")
+    (synopsis "Multidimensional volumes and monomial integrals")
+    (description
+      "@code{ndim} computes all kinds of volumes and integrals of
+monomials over such volumes in a fast, numerically stable way, using
+recurrence relations.")
+    (license license:gpl3)))
+
 (define-public slepc
   (package
     (name "slepc")
-- 
2.42.0





Information forwarded to guix-patches <at> gnu.org:
bug#66929; Package guix-patches. (Sat, 04 Nov 2023 15:05:05 GMT) Full text and rfc822 format available.

Message #32 received at 66929 <at> debbugs.gnu.org (full text, mbox):

From: Felix Gruber <felgru <at> posteo.net>
To: 66929 <at> debbugs.gnu.org
Cc: Felix Gruber <felgru <at> posteo.net>
Subject: [PATCH 09/10] gnu: Add python-orthopy.
Date: Sat,  4 Nov 2023 15:02:38 +0000
* gnu/packages/maths.scm (python-orthopy): New variable.

Change-Id: I75e528f30d285666b8012a9cbc5cbb7e28aaf764
---
 gnu/packages/maths.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 3c12cf7622..2474e463c5 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -172,6 +172,7 @@ (define-module (gnu packages maths)
   #:use-module (gnu packages scheme)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages shells)
+  #:use-module (gnu packages simulation)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages swig)
@@ -3714,6 +3715,47 @@ (define-public python-ndim
 recurrence relations.")
     (license license:gpl3)))
 
+(define-public python-orthopy
+  (package
+    (name "python-orthopy")
+    (version "0.9.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/diego-hayashi/orthopy")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "00s2rwjdlq38zkf7wl1gvm2aw057r30266lkzfxkrfzr4i705xnq"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs
+      (list python-importlib-metadata
+            python-ndim
+            python-numpy
+            python-sympy))
+    (native-inputs (list ;python-cplot  ;only used in deselected tests
+                         python-matplotx
+                         python-meshio
+                         python-meshzoo
+                         python-pytest
+                         python-scipy))
+    (arguments
+     (list
+      #:test-flags
+      ;; These tests fails with unexpected keyword arguments
+      ;; in calls to cplot.
+      #~(list "--deselect" "tests/test_u3.py::test_write_single"
+              "--deselect" "tests/test_u3.py::test_write_tree")))
+    (home-page "https://github.com/diego-hayashi/orthopy")
+    (synopsis "Tools for orthogonal polynomials, Gaussian quadrature")
+    (description "@code{orthopy} provides various orthogonal polynomial
+classes for lines, triangles, quadrilaterals, disks, spheres, hexahedra,
+and n-cubes.  All computations are done using numerically stable
+recurrence schemes.  Furthermore, all functions are fully vectorized and
+can return results in exact arithmetic.")
+    (license license:gpl3)))
+
 (define-public slepc
   (package
     (name "slepc")
-- 
2.42.0





Information forwarded to guix-patches <at> gnu.org:
bug#66929; Package guix-patches. (Sat, 04 Nov 2023 15:05:05 GMT) Full text and rfc822 format available.

Message #35 received at 66929 <at> debbugs.gnu.org (full text, mbox):

From: Felix Gruber <felgru <at> posteo.net>
To: 66929 <at> debbugs.gnu.org
Cc: Felix Gruber <felgru <at> posteo.net>
Subject: [PATCH 10/10] gnu: Add python-quadpy.
Date: Sat,  4 Nov 2023 15:02:39 +0000
* gnu/packages/maths.scm (python-quadpy): New variable.

Change-Id: Icb5a60920465bc5861cf32ffe5dc44a9088af890
---
 gnu/packages/maths.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 2474e463c5..d73546d4c2 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -135,6 +135,7 @@ (define-module (gnu packages maths)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages image-processing)
   #:use-module (gnu packages java)
   #:use-module (gnu packages less)
   #:use-module (gnu packages lisp)
@@ -163,6 +164,7 @@ (define-module (gnu packages maths)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-build)
+  #:use-module (gnu packages python-science)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
@@ -3756,6 +3758,41 @@ (define-public python-orthopy
 can return results in exact arithmetic.")
     (license license:gpl3)))
 
+(define-public python-quadpy
+  (package
+    (name "python-quadpy")
+    (version "0.16.10")
+    (source
+      (origin
+        (method url-fetch)
+        ; Download zipfile from zenodo, because git checkout is missing
+        ; some data files that are stored via git-lfs.
+        (uri (string-append
+               "https://zenodo.org/records/5541216/files/nschloe/quadpy-v"
+               version
+               ".zip"))
+        (sha256
+          (base32
+            "1f989dipv7lqxvalfrvvlmhlxyl67a87lavyyqrr1mh88glhl592"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs
+      (list python-importlib-metadata
+            python-numpy
+            python-orthopy
+            python-scipy
+            python-sympy))
+    (native-inputs (list python-accupy python-pytest unzip vtk))
+    (home-page "https://github.com/diego-hayashi/quadpy")
+    (synopsis
+      "Numerical integration, quadrature for various domains")
+    (description
+      "More than 1500 numerical integration schemes for line segments, circles,
+  disks, triangles, quadrilaterals, spheres, balls, tetrahedra, hexahedra,
+  wedges, pyramids, n-spheres, n-balls, n-cubes, n-simplices, and the
+  1D/2D/3D/nD spaces with weight functions exp(-r) and exp(-r2) for fast
+  integration of real-, complex-, and vector-valued functions.")
+    (license license:gpl3)))
+
 (define-public slepc
   (package
     (name "slepc")
-- 
2.42.0





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 04 Dec 2023 21:24:02 GMT) Full text and rfc822 format available.

Notification sent to Felix Gruber <felgru <at> posteo.net>:
bug acknowledged by developer. (Mon, 04 Dec 2023 21:24:02 GMT) Full text and rfc822 format available.

Message #40 received at 66929-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Felix Gruber <felgru <at> posteo.net>
Cc: 66929-done <at> debbugs.gnu.org
Subject: Re: [bug#66929] [PATCH 00/10] Add python-quadpy and dependencies.
Date: Mon, 04 Dec 2023 22:23:08 +0100
Hi Felix,

Felix Gruber <felgru <at> posteo.net> skribis:

> This patchset adds the quadpy Python library which collects a large
> number of different numerical integration algorithms.
>
> I've packaged a fork of the last GPL-licensed version of quadpy. Newer
> versions are distributed under a proprietary license and the history of
> the original git repository on https://github.com/nschloe/quadpy had
> been removed (hence I'm referring to a fork in the source and home-page
> fields). The same holds for the python-orthopy, python-ndim,
> python-accupy and python-meshzoo packages.
> Also, quadpy stores some required data files via git-lfs. I couldn't
> figure out how to download those git-lfs stored files in the source of
> the python-quadpy package. In the end, I resorted to instead point the
> source field to a zip file that contained the source code including
> those data files.
>
> Felix Gruber (10):
>   gnu: Add python-meshzoo.
>   gnu: Add python-matplotx.
>   gnu: Add python-npx.
>   gnu: Add python-cplot.
>   gnu: Add python-perfplot.
>   gnu: Add python-pyfma.
>   gnu: Add python-accupy.
>   gnu: Add python-ndim.
>   gnu: Add python-orthopy.
>   gnu: Add python-quadpy.

I applied the whole series with one change: replaced ‘gpl3’ with ‘gpl3+’
because these packages were all explicitly or implicitly “version 3 or
any later version”.

Thanks, and sorry for the delay!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 02 Jan 2024 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 150 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.