[PATCH 0/6] gnu: Add python-pyvista.

  • Done
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Maxime Devos
  • Paul A. Patience
Owner
unassigned
Submitted by
Paul A. Patience
Severity
normal
P
P
Paul A. Patience wrote on 22 Apr 2022 03:00
(address . guix-patches@gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220422010015.23020-1-paul@apatience.com
This patch series adds the PyVista library to Guix.
The latest version of PyVista requires python-meshio 5.2 or later, hence the
update to that package.

Paul A. Patience (6):
gnu: python-meshio: Remove input labels.
gnu: python-meshio: Remove trailing booleans.
gnu: python-meshio: Honor #:tests? flag.
gnu: python-meshio: Update to 5.3.4.
gnu: Add python-scooby.
gnu: Add python-pyvista.

gnu/packages/python-science.scm | 56 +++++++++++++++++++++++++++++++++
gnu/packages/python-xyz.scm | 47 +++++++++++++++++++++++++++
gnu/packages/simulation.scm | 44 +++++++++++++-------------
3 files changed, 125 insertions(+), 22 deletions(-)

--
2.35.1
P
P
Paul A. Patience wrote on 22 Apr 2022 03:02
[PATCH 1/6] gnu: python-meshio: Remove input labels.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220422010244.23280-1-paul@apatience.com
* gnu/packages/simulation.scm (python-meshio)[inputs, native-inputs,
propagated-inputs]: Remove labels.
---
gnu/packages/simulation.scm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 3f2d8e136d..c8309761d2 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -789,13 +789,13 @@ (define-public python-meshio
#t))))
(build-system python-build-system)
(inputs
- `(("h5py" ,python-h5py)
- ("netcdf4" ,python-netcdf4)))
+ (list python-h5py
+ python-netcdf4))
(native-inputs
- `(("pytest" ,python-pytest)))
+ (list python-pytest))
(propagated-inputs
- `(("importlib-metadata" ,python-importlib-metadata)
- ("numpy" ,python-numpy)))
+ (list python-importlib-metadata
+ python-numpy))
(arguments
`(#:phases
(modify-phases %standard-phases
--
2.35.1
P
P
Paul A. Patience wrote on 22 Apr 2022 03:02
[PATCH 2/6] gnu: python-meshio: Remove trailing booleans.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220422010244.23280-2-paul@apatience.com
* gnu/packages/simulation.scm (python-meshio)[snippet]: Remove trailing
boolean.
[arguments]: Same.
---
gnu/packages/simulation.scm | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index c8309761d2..fa246f9fb7 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -785,8 +785,7 @@ (define-public python-meshio
'(begin
(let ((file (open-file "setup.py" "a")))
(display "from setuptools import setup\nsetup()" file)
- (close-port file))
- #t))))
+ (close-port file))))))
(build-system python-build-system)
(inputs
(list python-h5py
@@ -802,8 +801,7 @@ (define-public python-meshio
(replace 'check
(lambda* (#:key outputs inputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs)
- (invoke "python" "-m" "pytest" "-v" "tests")
- #t)))))
+ (invoke "python" "-m" "pytest" "-v" "tests"))))))
(home-page "https://github.com/nschloe/meshio")
(synopsis "I/O for mesh files")
(description "There are various file formats available for
--
2.35.1
P
P
Paul A. Patience wrote on 22 Apr 2022 03:02
[PATCH 3/6] gnu: python-meshio: Honor #:tests? flag.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220422010244.23280-3-paul@apatience.com
* gnu/packages/simulation.scm (python-meshio)[arguments]: Adjust custom
'check' phase to honor the #:tests? flag.
---
gnu/packages/simulation.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index fa246f9fb7..17d0a1352c 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -799,9 +799,10 @@ (define-public python-meshio
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key outputs inputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (invoke "python" "-m" "pytest" "-v" "tests"))))))
+ (lambda* (#:key tests? outputs inputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "-m" "pytest" "-v" "tests")))))))
(home-page "https://github.com/nschloe/meshio")
(synopsis "I/O for mesh files")
(description "There are various file formats available for
--
2.35.1
P
P
Paul A. Patience wrote on 22 Apr 2022 03:03
[PATCH 4/6] gnu: python-meshio: Update to 5.3.4.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220422010244.23280-4-paul@apatience.com
* gnu/packages/simulation.scm (python-meshio): Update to 5.3.4.
[source]: Reindent.
[propagated-inputs]: Add python-rich.
---
gnu/packages/simulation.scm | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)

Toggle diff (46 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 17d0a1352c..803127339c 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -773,19 +773,19 @@ (define-public fullswof-2d
(define-public python-meshio
(package
(name "python-meshio")
- (version "4.4.6")
+ (version "5.3.4")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "meshio" version))
- (sha256
- (base32
- "0kv832s2vyff30zz8yqypw5jifwdanvh5x56d2bzkvy94h4jlddy"))
- (snippet
- '(begin
- (let ((file (open-file "setup.py" "a")))
- (display "from setuptools import setup\nsetup()" file)
- (close-port file))))))
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "meshio" version))
+ (sha256
+ (base32
+ "1w39qcg0rw5kb04j7sa45fnqd6k20fsdgrf62cmw2ygjgwnnjh72"))
+ (snippet
+ '(begin
+ (let ((file (open-file "setup.py" "a")))
+ (display "from setuptools import setup\nsetup()" file)
+ (close-port file))))))
(build-system python-build-system)
(inputs
(list python-h5py
@@ -794,7 +794,8 @@ (define-public python-meshio
(list python-pytest))
(propagated-inputs
(list python-importlib-metadata
- python-numpy))
+ python-numpy
+ python-rich))
(arguments
`(#:phases
(modify-phases %standard-phases
--
2.35.1
P
P
Paul A. Patience wrote on 22 Apr 2022 03:03
[PATCH 5/6] gnu: Add python-scooby.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220422010244.23280-5-paul@apatience.com
* gnu/packages/python-xyz.scm (python-scooby): New variable.
---
gnu/packages/python-xyz.scm | 47 +++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9a5d311680..799a6441ea 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -29534,3 +29534,50 @@ (define-public python-sre-yield
uses the parsed regular expression, so you get a much more accurate result
than trying to just split strings.")
(license license:asl2.0)))
+
+(define-public python-scooby
+ (package
+ (name "python-scooby")
+ (version "0.5.12")
+ (source
+ ;; The PyPI tarball does not contain the tests.
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/banesullivan/scooby")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1gkpmz8wl3jg8ylf1na35308sznw2g9wx33zqlyq5i2gpy2ml9mw"))))
+ (build-system python-build-system)
+ (native-inputs
+ (list python-beautifulsoup4
+ python-numpy
+ python-pytest
+ python-pytest-cov
+ python-scipy))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests
+ (lambda _
+ (substitute* "tests/test_scooby.py"
+ ;; The test suite uses the no-version PyPI package
+ ;; (https://pypi.org/project/no-version/),
+ ;; but it doesn't seem worth packaging in Guix just for this.
+ (("scooby\\.report\\.VERSION_NOT_FOUND")
+ "scooby.report.MODULE_NOT_FOUND")
+ (("^ +import no_version # noqa.*") "")
+ (("with pytest\\.raises\\(OSError\\):")
+ "with pytest.raises(ModuleNotFoundError):"))))
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest")))))))
+ (home-page "https://github.com/banesullivan/scooby")
+ (synopsis "Great Dane turned Python environment detective")
+ (description
+ "This is a lightweight tool for easily reporting your Python
+environment's package versions and hardware resources.")
+ (license license:expat)))
--
2.35.1
P
P
Paul A. Patience wrote on 22 Apr 2022 03:03
[PATCH 6/6] gnu: Add python-pyvista.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220422010244.23280-6-paul@apatience.com
* gnu/packages/python-science.scm (python-pyvista): New variable.
---
gnu/packages/python-science.scm | 56 +++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)

Toggle diff (64 lines)
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 07d713e013..d114a1c12f 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1183,3 +1183,59 @@ (define-public python-numpy-groupies
"This package provides optimized tools for group-indexing operations:
aggregated sum and more.")
(license license:bsd-3)))
+
+(define-public python-pyvista
+ (package
+ (name "python-pyvista")
+ (version "0.34.0")
+ (source
+ ;; The PyPI tarball does not contain the tests.
+ ;; (However, we don't yet actually run the tests.)
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pyvista/pyvista")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0f2x2wvi5pkpv5h3jrnx8zxnaj51navfqp2fdna1l9rpjgjjf94g"))))
+ (build-system python-build-system)
+ (inputs
+ (list vtk))
+ (propagated-inputs
+ (list python-appdirs
+ python-imageio
+ python-matplotlib
+ python-meshio
+ python-numpy
+ python-pillow
+ python-scooby))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; Disable tests for now because they require several modules
+ ;; currently unpackaged in Guix.
+ (delete 'check)
+ ;; Disable the sanity check, which fails with the following error:
+ ;;
+ ;; ...checking requirements: ERROR: pyvista==0.34.0 DistributionNotFound(Requirement.parse('vtk'), {'pyvista'})
+ ;;
+ ;; Probably it cannot find VTK because it isn't a Python library.
+ (delete 'sanity-check))))
+ (home-page "https://docs.pyvista.org/")
+ (synopsis "3D plotting and mesh analysis through VTK")
+ (description
+ "PyVista is...
+
+@itemize
+@item @emph{Pythonic VTK}: a high-level API to the Visualization Toolkit (VTK)
+@item mesh data structures and filtering methods for spatial datasets
+@item 3D plotting made simple and built for large/complex data geometries
+@end itemize
+
+PyVista is a helper module for the Visualization Toolkit (VTK) that wraps the
+VTK library through NumPy and direct array access through a variety of methods
+and classes. This package provides a Pythonic, well-documented interface
+exposing VTK's powerful visualization backend to facilitate rapid prototyping,
+analysis, and visual integration of spatially referenced datasets.")
+ (license (list license:expat))))
--
2.35.1
P
P
Paul A. Patience wrote on 22 Apr 2022 14:41
[PATCH v2 1/6] gnu: python-meshio: Remove input labels.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220422124118.66783-2-paul@apatience.com
* gnu/packages/simulation.scm (python-meshio)[inputs, native-inputs,
propagated-inputs]: Remove labels.
---
gnu/packages/simulation.scm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 3f2d8e136d..c8309761d2 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -789,13 +789,13 @@ (define-public python-meshio
#t))))
(build-system python-build-system)
(inputs
- `(("h5py" ,python-h5py)
- ("netcdf4" ,python-netcdf4)))
+ (list python-h5py
+ python-netcdf4))
(native-inputs
- `(("pytest" ,python-pytest)))
+ (list python-pytest))
(propagated-inputs
- `(("importlib-metadata" ,python-importlib-metadata)
- ("numpy" ,python-numpy)))
+ (list python-importlib-metadata
+ python-numpy))
(arguments
`(#:phases
(modify-phases %standard-phases
--
2.35.1
P
P
Paul A. Patience wrote on 22 Apr 2022 14:41
[PATCH v2 0/6] gnu: Add python-pyvista.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220422124118.66783-1-paul@apatience.com
Minor changes. Only the last two patches are different:

* python-scooby to add the copyright header.
* python-pyvista to add the copyright header and move vtk to
propagated-inputs.

Paul A. Patience (6):
gnu: python-meshio: Remove input labels.
gnu: python-meshio: Remove trailing booleans.
gnu: python-meshio: Honor #:tests? flag.
gnu: python-meshio: Update to 5.3.4.
gnu: Add python-scooby.
gnu: Add python-pyvista.

gnu/packages/python-science.scm | 56 +++++++++++++++++++++++++++++++++
gnu/packages/python-xyz.scm | 48 ++++++++++++++++++++++++++++
gnu/packages/simulation.scm | 44 +++++++++++++-------------
3 files changed, 126 insertions(+), 22 deletions(-)

--
2.35.1
P
P
Paul A. Patience wrote on 22 Apr 2022 14:41
[PATCH v2 2/6] gnu: python-meshio: Remove trailing booleans.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220422124118.66783-3-paul@apatience.com
* gnu/packages/simulation.scm (python-meshio)[snippet]: Remove trailing
boolean.
[arguments]: Same.
---
gnu/packages/simulation.scm | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index c8309761d2..fa246f9fb7 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -785,8 +785,7 @@ (define-public python-meshio
'(begin
(let ((file (open-file "setup.py" "a")))
(display "from setuptools import setup\nsetup()" file)
- (close-port file))
- #t))))
+ (close-port file))))))
(build-system python-build-system)
(inputs
(list python-h5py
@@ -802,8 +801,7 @@ (define-public python-meshio
(replace 'check
(lambda* (#:key outputs inputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs)
- (invoke "python" "-m" "pytest" "-v" "tests")
- #t)))))
+ (invoke "python" "-m" "pytest" "-v" "tests"))))))
(home-page "https://github.com/nschloe/meshio")
(synopsis "I/O for mesh files")
(description "There are various file formats available for
--
2.35.1
P
P
Paul A. Patience wrote on 22 Apr 2022 14:41
[PATCH v2 3/6] gnu: python-meshio: Honor #:tests? flag.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220422124118.66783-4-paul@apatience.com
* gnu/packages/simulation.scm (python-meshio)[arguments]: Adjust custom
'check' phase to honor the #:tests? flag.
---
gnu/packages/simulation.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index fa246f9fb7..17d0a1352c 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -799,9 +799,10 @@ (define-public python-meshio
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key outputs inputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (invoke "python" "-m" "pytest" "-v" "tests"))))))
+ (lambda* (#:key tests? outputs inputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "-m" "pytest" "-v" "tests")))))))
(home-page "https://github.com/nschloe/meshio")
(synopsis "I/O for mesh files")
(description "There are various file formats available for
--
2.35.1
P
P
Paul A. Patience wrote on 22 Apr 2022 14:41
[PATCH v2 4/6] gnu: python-meshio: Update to 5.3.4.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220422124118.66783-5-paul@apatience.com
* gnu/packages/simulation.scm (python-meshio): Update to 5.3.4.
[source]: Reindent.
[propagated-inputs]: Add python-rich.
---
gnu/packages/simulation.scm | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)

Toggle diff (46 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 17d0a1352c..803127339c 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -773,19 +773,19 @@ (define-public fullswof-2d
(define-public python-meshio
(package
(name "python-meshio")
- (version "4.4.6")
+ (version "5.3.4")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "meshio" version))
- (sha256
- (base32
- "0kv832s2vyff30zz8yqypw5jifwdanvh5x56d2bzkvy94h4jlddy"))
- (snippet
- '(begin
- (let ((file (open-file "setup.py" "a")))
- (display "from setuptools import setup\nsetup()" file)
- (close-port file))))))
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "meshio" version))
+ (sha256
+ (base32
+ "1w39qcg0rw5kb04j7sa45fnqd6k20fsdgrf62cmw2ygjgwnnjh72"))
+ (snippet
+ '(begin
+ (let ((file (open-file "setup.py" "a")))
+ (display "from setuptools import setup\nsetup()" file)
+ (close-port file))))))
(build-system python-build-system)
(inputs
(list python-h5py
@@ -794,7 +794,8 @@ (define-public python-meshio
(list python-pytest))
(propagated-inputs
(list python-importlib-metadata
- python-numpy))
+ python-numpy
+ python-rich))
(arguments
`(#:phases
(modify-phases %standard-phases
--
2.35.1
P
P
Paul A. Patience wrote on 22 Apr 2022 14:41
[PATCH v2 5/6] gnu: Add python-scooby.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220422124118.66783-6-paul@apatience.com
* gnu/packages/python-xyz.scm (python-scooby): New variable.
---
gnu/packages/python-xyz.scm | 48 +++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)

Toggle diff (63 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9a5d311680..3a49f46555 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -119,6 +119,7 @@
;;; Copyright © 2022 Evgeny Pisemsky <evgeny@pisemsky.com>
;;; Copyright © 2022 drozdov <drozdov@portalenergy.tech>
;;; Copyright © 2022 Peter Polidoro <peter@polidoro.io>
+;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29534,3 +29535,50 @@ (define-public python-sre-yield
uses the parsed regular expression, so you get a much more accurate result
than trying to just split strings.")
(license license:asl2.0)))
+
+(define-public python-scooby
+ (package
+ (name "python-scooby")
+ (version "0.5.12")
+ (source
+ ;; The PyPI tarball does not contain the tests.
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/banesullivan/scooby")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1gkpmz8wl3jg8ylf1na35308sznw2g9wx33zqlyq5i2gpy2ml9mw"))))
+ (build-system python-build-system)
+ (native-inputs
+ (list python-beautifulsoup4
+ python-numpy
+ python-pytest
+ python-pytest-cov
+ python-scipy))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests
+ (lambda _
+ (substitute* "tests/test_scooby.py"
+ ;; The test suite uses the no-version PyPI package
+ ;; (https://pypi.org/project/no-version/),
+ ;; but it doesn't seem worth packaging in Guix just for this.
+ (("scooby\\.report\\.VERSION_NOT_FOUND")
+ "scooby.report.MODULE_NOT_FOUND")
+ (("^ +import no_version # noqa.*") "")
+ (("with pytest\\.raises\\(OSError\\):")
+ "with pytest.raises(ModuleNotFoundError):"))))
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest")))))))
+ (home-page "https://github.com/banesullivan/scooby")
+ (synopsis "Great Dane turned Python environment detective")
+ (description
+ "This is a lightweight tool for easily reporting your Python
+environment's package versions and hardware resources.")
+ (license license:expat)))
--
2.35.1
P
P
Paul A. Patience wrote on 22 Apr 2022 14:41
[PATCH v2 6/6] gnu: Add python-pyvista.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220422124118.66783-7-paul@apatience.com
* gnu/packages/python-science.scm (python-pyvista): New variable.
---
gnu/packages/python-science.scm | 56 +++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)

Toggle diff (71 lines)
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 07d713e013..c2b7a665f7 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2022 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
;;; Copyright © 2022 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1183,3 +1184,58 @@ (define-public python-numpy-groupies
"This package provides optimized tools for group-indexing operations:
aggregated sum and more.")
(license license:bsd-3)))
+
+(define-public python-pyvista
+ (package
+ (name "python-pyvista")
+ (version "0.34.0")
+ (source
+ ;; The PyPI tarball does not contain the tests.
+ ;; (However, we don't yet actually run the tests.)
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pyvista/pyvista")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0f2x2wvi5pkpv5h3jrnx8zxnaj51navfqp2fdna1l9rpjgjjf94g"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ (list python-appdirs
+ python-imageio
+ python-matplotlib
+ python-meshio
+ python-numpy
+ python-pillow
+ python-scooby
+ vtk))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; Disable tests for now because they require several modules
+ ;; currently unpackaged in Guix.
+ (delete 'check)
+ ;; Disable the sanity check, which fails with the following error:
+ ;;
+ ;; ...checking requirements: ERROR: pyvista==0.34.0 DistributionNotFound(Requirement.parse('vtk'), {'pyvista'})
+ ;;
+ ;; Probably it cannot find VTK because it isn't a Python library.
+ (delete 'sanity-check))))
+ (home-page "https://docs.pyvista.org/")
+ (synopsis "3D plotting and mesh analysis through VTK")
+ (description
+ "PyVista is...
+
+@itemize
+@item @emph{Pythonic VTK}: a high-level API to the Visualization Toolkit (VTK)
+@item mesh data structures and filtering methods for spatial datasets
+@item 3D plotting made simple and built for large/complex data geometries
+@end itemize
+
+PyVista is a helper module for the Visualization Toolkit (VTK) that wraps the
+VTK library through NumPy and direct array access through a variety of methods
+and classes. This package provides a Pythonic, well-documented interface
+exposing VTK's powerful visualization backend to facilitate rapid prototyping,
+analysis, and visual integration of spatially referenced datasets.")
+ (license license:expat)))
--
2.35.1
M
M
Maxime Devos wrote on 22 Apr 2022 19:36
Re: [bug#55060] [PATCH v2 4/6] gnu: python-meshio: Update to 5.3.4.
b602d1a0573fe31e2d60db78b2920cd2e683926e.camel@telenet.be
Paul A. Patience schreef op vr 22-04-2022 om 12:41 [+0000]:
Toggle quote (6 lines)
> +       (snippet
> +        '(begin
> +           (let ((file (open-file "setup.py" "a")))
> +             (display "from setuptools import setup\nsetup()" file)
> +             (close-port file))))))

No need to wrap it in 'begin'.

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmLnrRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7h5IAP9jRkfnIuQtlJrDKMvEhz+oMtYp
VMFeTiG/Oen60yyvKwD/Xex207BXRDUIv+Q6/b/EDjCmu2guf0CWCG8jNTlXdgY=
=MWek
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 22 Apr 2022 19:51
Re: [bug#55060] [PATCH v2 5/6] gnu: Add python-scooby.
7a8fcf2b1e8694f6778ae122b8764760fcf33c5d.camel@telenet.be
Paul A. Patience schreef op vr 22-04-2022 om 12:41 [+0000]:
Toggle quote (2 lines)
> +    (synopsis "Great Dane turned Python environment detective")

What does this package have to do with Denmark and detectives?

Looking further, ‘Great Dane’ appears to be some dog breed, and I guess
it's a pun on the package name and Scooby-Doo. However, I don't think
this is useful for users looking for packages that suit their needs.

Toggle quote (4 lines)
> +    (description
> +     "This is a lightweight tool for easily reporting your Python
> +environment's package versions and hardware resources.")

Isn't this just ‘guix package --list-installed=^python’?
What hardware resources does it report? CPU models? Disk
manufacturers?  The attached peripherals? Non-physical peripherals
like e.g. bluetooth mice? The amount of ductape holding the computer
together? Information about the printer? ...

ALso, lightweight and easy is rather subjective. Compares to lscpu,
lspci, ..., (which are simple C tools IIUC) depending on python and
python-scipy doesn't seem lightweight to me. ‘(guix)Synopses and
Descriptions’ recommends staying factual.

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmLrHhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7rbHAQC6VJbsM4/kDPYmYSHX78vmTaJg
jt+m9NZbolNSFGjudQD+M8Dgzu0Rj3TOCxjFT7mASZCaqCzTqbmlqxn6l10XJgc=
=PQss
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 22 Apr 2022 19:53
Re: [bug#55060] [PATCH 5/6] gnu: Add python-scooby.
999be63d652cfdbc1192076253925802b037e42d.camel@telenet.be
Paul A. Patience schreef op vr 22-04-2022 om 01:03 [+0000]:
Toggle quote (5 lines)
> +
> +(define-public python-scooby
> +  (package
> +    (name "python-scooby")

The 'python-' prefix is only for library-only python packages. As it
is a called tool, I assume there is some bin/scooby binary that the
user would run?

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmLrqhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7hYgAQD9OiNouaXvNA10Z0lR22mZDph2
9awa0yxred/ZoRJz4QD/bCR0gHvdgJJJQRM/CYD3aebUWvBo09A0aNrvaizyqw8=
=44sK
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 22 Apr 2022 19:55
f16fea35e3ccf2fe27b4e0e23912e80c50ecdf94.camel@telenet.be
Paul A. Patience schreef op vr 22-04-2022 om 01:03 [+0000]:
Toggle quote (8 lines)
> +    (native-inputs
> +     (list python-beautifulsoup4
> +           python-numpy
> +           python-pytest
> +           python-pytest-cov
> +           python-scipy))
> [no 'inputs' or 'propagated-inputs']

Are these sufficient? According to
there is also a dependency on 'psutil' and 'mkl'. I have also found
references to those in non-test code.

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmLsLxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7vcsAQDnatxRQsM62b/um2lLHLuopZoR
qNlV/LUw0QTc2LoDoQEAjLXnAdx5+hPa0WCvbRYHtLQAxFLJkSIRApXP7Ezg1gM=
=vnPT
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 22 Apr 2022 20:04
Re: [bug#55060] [PATCH 6/6] gnu: Add python-pyvista.
3e9933ecb1736b90c091f9733ea738e36a7d2aea.camel@telenet.be
Paul A. Patience schreef op vr 22-04-2022 om 01:03 [+0000]:
Toggle quote (9 lines)
> +         ;; Disable tests for now because they require several modules
> +         ;; currently unpackaged in Guix.
> +         (delete 'check)
> +         ;; Disable the sanity check, which fails with the following error:
> +         ;;
> +         ;;   ...checking requirements: ERROR: pyvista==0.34.0 DistributionNotFound(Requirement.parse('vtk'), {'pyvista'})
> +         ;;
> +         ;; Probably it cannot find VTK because it isn't a Python library.

vtk is (among other things) a Python library, try building vtk and
looking into lib/python3.9/site-packages/vtk.py.

As such, shouldn't 'vtk' be in propagated-inputs, such that when
dependents use 'python-pyvista', the vtk libraries will actually be
found?

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmLuExccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7tH1AQC5rb3NALeE4AasyVt0W2U9yiBf
mcFLuvT6YEhRuc7VegD+MTdETUXxutP71foRwevVpSM+pZx8LsTuWtJko+095g0=
=jDxL
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 22 Apr 2022 20:07
Re: [bug#55060] [PATCH 5/6] gnu: Add python-scooby.
0cbdfb3ef04e504737782aa368021cdad9fe9404.camel@telenet.be
Paul A. Patience schreef op vr 22-04-2022 om 01:03 [+0000]:
Toggle quote (3 lines)
> +               (("with pytest\\.raises\\(OSError\\):")
> +                "with pytest.raises(ModuleNotFoundError):"))))

What is this for?

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmLu7xccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7jp/AP9CKSlAfE/x5xxSKVUHXZKnkOtj
lPI7G5aeqM4ZphLE9AD9GTCJvfovdxfvDczDImUIie9LfprZw6Il92oOr4pDSg0=
=eNy/
-----END PGP SIGNATURE-----


P
P
Paul A. Patience wrote on 22 Apr 2022 21:26
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 55060@debbugs.gnu.org)
87a6cd6ik4.fsf@apatience.com
Hello Maxime,

I will reply to all of your comments below.

On 2022-04-22 13:53:46-04:00, Maxime Devos wrote:
Toggle quote (4 lines)
> The 'python-' prefix is only for library-only python packages. As it
> is a called tool, I assume there is some bin/scooby binary that the
> user would run?

It may be called a tool, but it is only a library, meant to be used from
other libraries.
The readme describes the basic usage as follows:

import scooby
scooby.Report()

On 2022-04-22 13:55:59-04:00, Maxime Devos wrote:
Toggle quote (14 lines)
> Paul A. Patience schreef op vr 22-04-2022 om 01:03 [+0000]:
>> +    (native-inputs
>> +     (list python-beautifulsoup4
>> +           python-numpy
>> +           python-pytest
>> +           python-pytest-cov
>> +           python-scipy))
>> [no 'inputs' or 'propagated-inputs']
>
> Are these sufficient? According to
> <https://github.com/banesullivan/scooby/blob/main/requirements.txt>,
> there is also a dependency on 'psutil' and 'mkl'. I have also found
> references to those in non-test code.

The setup.py file lists psutil and mkl in extras_require, meaning they
are optional.
mkl (https://pypi.org/project/mkl/)is released under the Intel
Simplified Software License, which I suspect is ideologically
incompatible with Guix (and therefore not already packaged for Guix), so
I didn't include it.
I omitted psutil just because I was omitting mkl, but I can add it as a
propagated input.

On 2022-04-22 14:07:43-04:00, Maxime Devos wrote:
Toggle quote (6 lines)
> Paul A. Patience schreef op vr 22-04-2022 om 01:03 [+0000]:
>> +               (("with pytest\\.raises\\(OSError\\):")
>> +                "with pytest.raises(ModuleNotFoundError):"))))
>
> What is this for?

It seems the test suite expects the import of a missing package to throw
an OSError instead of a ModuleNotFoundError, which is not the case at
least on Python 3.9.9.
I don't know if it was different before.
I can add a comment to that effect.

On 2022-04-22 13:51:26-04:00, Maxime Devos wrote:
Toggle quote (24 lines)
> Paul A. Patience schreef op vr 22-04-2022 om 12:41 [+0000]:
>> +    (synopsis "Great Dane turned Python environment detective")
>
> What does this package have to do with Denmark and detectives?
>
> Looking further, ‘Great Dane’ appears to be some dog breed, and I guess
> it's a pun on the package name and Scooby-Doo. However, I don't think
> this is useful for users looking for packages that suit their needs.
>
>> +    (description
>> +     "This is a lightweight tool for easily reporting your Python
>> +environment's package versions and hardware resources.")
>
> Isn't this just ‘guix package --list-installed=^python’?
> What hardware resources does it report? CPU models? Disk
> manufacturers?  The attached peripherals? Non-physical peripherals
> like e.g. bluetooth mice? The amount of ductape holding the computer
> together? Information about the printer? ...
>
> ALso, lightweight and easy is rather subjective. Compares to lscpu,
> lspci, ..., (which are simple C tools IIUC) depending on python and
> python-scipy doesn't seem lightweight to me. ‘(guix)Synopses and
> Descriptions’ recommends staying factual.

The synopsis and description are taken wholesale from Scooby's readme.
However, I can rewrite them.

Best regards,
Paul
P
P
Paul A. Patience wrote on 22 Apr 2022 21:36
Re: [bug#55060] [PATCH 6/6] gnu: Add python-pyvista.
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 55060@debbugs.gnu.org)
87bkws6hhn.fsf@apatience.com
On 2022-04-22 14:04:03-04:00, Maxime Devos wrote:
Toggle quote (13 lines)
> Paul A. Patience schreef op vr 22-04-2022 om 01:03 [+0000]:
>> +         ;; Disable tests for now because they require several modules
>> +         ;; currently unpackaged in Guix.
>> +         (delete 'check)
>> +         ;; Disable the sanity check, which fails with the following error:
>> +         ;;
>> +         ;;   ...checking requirements: ERROR: pyvista==0.34.0 DistributionNotFound(Requirement.parse('vtk'), {'pyvista'})
>> +         ;;
>> +         ;; Probably it cannot find VTK because it isn't a Python library.
>
> vtk is (among other things) a Python library, try building vtk and
> looking into lib/python3.9/site-packages/vtk.py.

vtk.py is indeed there.
Also, I am able to "import vtk" in a Python repl.
I'm not sure why the sanity check cannot find vtk.py, then.
This sanity check issue also plagues the python-vedo package, and I
don't know how to fix it.
(However, obviously the last line of the comment is incorrect.)

Toggle quote (4 lines)
> As such, shouldn't 'vtk' be in propagated-inputs, such that when
> dependents use 'python-pyvista', the vtk libraries will actually be
> found?

I fixed this in the v2 series.

Best regards,
Paul
M
M
Maxime Devos wrote on 22 Apr 2022 23:43
Re: [bug#55060] [PATCH 5/6] gnu: Add python-scooby.
(name . Paul A. Patience)(address . paul@apatience.com)(address . 55060@debbugs.gnu.org)
450bea08b9dfed716dc272d3271c6bc4a08422e0.camel@telenet.be
Paul A. Patience schreef op vr 22-04-2022 om 19:26 [+0000]:
Toggle quote (6 lines)
> It seems the test suite expects the import of a missing package to throw
> an OSError instead of a ModuleNotFoundError, which is not the case at
> least on Python 3.9.9.
> I don't know if it was different before.
> I can add a comment to that effect.

This version incompatibility seems like something upstream needs to
know about. I've commented upstream at

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmMhjRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qlsAP9SI2H3NhScObO2iuKUd6R8uAHD
Pj05GfEyKNFfIVHNnwEAjKKHF+sldWScS16/cfeCEGYTXKb7v1hprNDVPeJUCwU=
=3mht
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 22 Apr 2022 23:46
(name . Paul A. Patience)(address . paul@apatience.com)(address . 55060@debbugs.gnu.org)
5505fdb497836c875fc589e1b6cedc29cfbc2eb4.camel@telenet.be
Paul A. Patience schreef op vr 22-04-2022 om 19:26 [+0000]:
Toggle quote (3 lines)
> The setup.py file lists psutil and mkl in extras_require, meaning they
> are optional.

The manual has the following to say about optional dependencies:

• If a Python package has optional dependencies (‘extras_require’),
it is up to you to decide whether to add them or not, based on
their usefulness/overhead ratio (*note ‘guix size’: Submitting
Patches.).

I don't know if this changes anything here.

Toggle quote (5 lines)
> mkl (https://pypi.org/project/mkl/)is released under the Intel
> Simplified Software License, which I suspect is ideologically
> incompatible with Guix (and therefore not already packaged for Guix), so
> I didn't include it.

Ok -- the pypi.org page even says ‘proprietary license’!

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmMiRRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qNlAP9e9GFD6MnXkiS6JH/8q80ivRw/
qoa6gByOMETz7qK9gQEA25l9Xq9gv/F4wwkdov7pOt3EXs8gekR3t6v+ZcU4oQI=
=epVT
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 22 Apr 2022 23:49
Re: [bug#55060] [PATCH 6/6] gnu: Add python-pyvista.
(name . Paul A. Patience)(address . paul@apatience.com)(address . 55060@debbugs.gnu.org)
1b12a87248441cbc918adbbbb748dafa5226efdb.camel@telenet.be
Paul A. Patience schreef op vr 22-04-2022 om 19:36 [+0000]:
Toggle quote (7 lines)
> vtk.py is indeed there.
> Also, I am able to "import vtk" in a Python repl.
> I'm not sure why the sanity check cannot find vtk.py, then.
> This sanity check issue also plagues the python-vedo package, and I
> don't know how to fix it.
> (However, obviously the last line of the comment is incorrect.)

A guess: maybe whatever 'sanity-check' indirectly uses, expects the
dependencies to have an 'egg-info', which appears to be the case for
(most?) python-build-system packages, but not for whatever vtk does.

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmMi6BccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7oS4AQDy3TBqLcjzsPXCVIl0BOWmmr+R
XkKYpMoUX5ajuMJ0NwEAisMTQnwsVuCQdv7tPJKJM2WGC2s4VcHpaaZMS14c5Qo=
=MuYE
-----END PGP SIGNATURE-----


P
P
Paul A. Patience wrote on 25 Apr 2022 19:55
[PATCH v3 0/6] gnu: Add python-pyvista.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220425175515.54516-1-paul@apatience.com
Updated patch series taking into account Maxime Devos's comments on package
synopses and descriptions (particularly for python-scooby, but I also updated
python-pyvista's description).

Paul A. Patience (6):
gnu: python-meshio: Remove input labels.
gnu: python-meshio: Remove trailing booleans.
gnu: python-meshio: Honor #:tests? flag.
gnu: python-meshio: Update to 5.3.4.
gnu: Add python-scooby.
gnu: Add python-pyvista.

gnu/packages/python-science.scm | 53 ++++++++++++++++++++++++++
gnu/packages/python-xyz.scm | 67 +++++++++++++++++++++++++++++++++
gnu/packages/simulation.scm | 43 +++++++++++----------
3 files changed, 141 insertions(+), 22 deletions(-)

--
2.35.1
P
P
Paul A. Patience wrote on 25 Apr 2022 19:55
[PATCH v3 1/6] gnu: python-meshio: Remove input labels.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220425175515.54516-2-paul@apatience.com
* gnu/packages/simulation.scm (python-meshio)[inputs, native-inputs,
propagated-inputs]: Remove labels.
---
gnu/packages/simulation.scm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 3f2d8e136d..c8309761d2 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -789,13 +789,13 @@ (define-public python-meshio
#t))))
(build-system python-build-system)
(inputs
- `(("h5py" ,python-h5py)
- ("netcdf4" ,python-netcdf4)))
+ (list python-h5py
+ python-netcdf4))
(native-inputs
- `(("pytest" ,python-pytest)))
+ (list python-pytest))
(propagated-inputs
- `(("importlib-metadata" ,python-importlib-metadata)
- ("numpy" ,python-numpy)))
+ (list python-importlib-metadata
+ python-numpy))
(arguments
`(#:phases
(modify-phases %standard-phases
--
2.35.1
P
P
Paul A. Patience wrote on 25 Apr 2022 19:55
[PATCH v3 2/6] gnu: python-meshio: Remove trailing booleans.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220425175515.54516-3-paul@apatience.com
* gnu/packages/simulation.scm (python-meshio)[snippet]: Remove trailing
boolean (and therefore the 'begin').
[arguments]: Remove trailing boolean.
---
gnu/packages/simulation.scm | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

Toggle diff (29 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index c8309761d2..42383bf486 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -782,11 +782,9 @@ (define-public python-meshio
(base32
"0kv832s2vyff30zz8yqypw5jifwdanvh5x56d2bzkvy94h4jlddy"))
(snippet
- '(begin
- (let ((file (open-file "setup.py" "a")))
- (display "from setuptools import setup\nsetup()" file)
- (close-port file))
- #t))))
+ '(let ((file (open-file "setup.py" "a")))
+ (display "from setuptools import setup\nsetup()" file)
+ (close-port file)))))
(build-system python-build-system)
(inputs
(list python-h5py
@@ -802,8 +800,7 @@ (define-public python-meshio
(replace 'check
(lambda* (#:key outputs inputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs)
- (invoke "python" "-m" "pytest" "-v" "tests")
- #t)))))
+ (invoke "python" "-m" "pytest" "-v" "tests"))))))
(home-page "https://github.com/nschloe/meshio")
(synopsis "I/O for mesh files")
(description "There are various file formats available for
--
2.35.1
P
P
Paul A. Patience wrote on 25 Apr 2022 19:55
[PATCH v3 3/6] gnu: python-meshio: Honor #:tests? flag.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220425175515.54516-4-paul@apatience.com
* gnu/packages/simulation.scm (python-meshio)[arguments]: Adjust custom
'check' phase to honor the #:tests? flag.
---
gnu/packages/simulation.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 42383bf486..1b4016e316 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -798,9 +798,10 @@ (define-public python-meshio
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key outputs inputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (invoke "python" "-m" "pytest" "-v" "tests"))))))
+ (lambda* (#:key tests? outputs inputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "-m" "pytest" "-v" "tests")))))))
(home-page "https://github.com/nschloe/meshio")
(synopsis "I/O for mesh files")
(description "There are various file formats available for
--
2.35.1
P
P
Paul A. Patience wrote on 25 Apr 2022 19:55
[PATCH v3 4/6] gnu: python-meshio: Update to 5.3.4.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220425175515.54516-5-paul@apatience.com
* gnu/packages/simulation.scm (python-meshio): Update to 5.3.4.
[source]: Reindent.
[propagated-inputs]: Add python-rich.
---
gnu/packages/simulation.scm | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)

Toggle diff (44 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 1b4016e316..e829f8cd7d 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -773,18 +773,18 @@ (define-public fullswof-2d
(define-public python-meshio
(package
(name "python-meshio")
- (version "4.4.6")
+ (version "5.3.4")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "meshio" version))
- (sha256
- (base32
- "0kv832s2vyff30zz8yqypw5jifwdanvh5x56d2bzkvy94h4jlddy"))
- (snippet
- '(let ((file (open-file "setup.py" "a")))
- (display "from setuptools import setup\nsetup()" file)
- (close-port file)))))
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "meshio" version))
+ (sha256
+ (base32
+ "1w39qcg0rw5kb04j7sa45fnqd6k20fsdgrf62cmw2ygjgwnnjh72"))
+ (snippet
+ '(let ((file (open-file "setup.py" "a")))
+ (display "from setuptools import setup\nsetup()" file)
+ (close-port file)))))
(build-system python-build-system)
(inputs
(list python-h5py
@@ -793,7 +793,8 @@ (define-public python-meshio
(list python-pytest))
(propagated-inputs
(list python-importlib-metadata
- python-numpy))
+ python-numpy
+ python-rich))
(arguments
`(#:phases
(modify-phases %standard-phases
--
2.35.1
P
P
Paul A. Patience wrote on 25 Apr 2022 19:55
[PATCH v3 5/6] gnu: Add python-scooby.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220425175515.54516-6-paul@apatience.com
* gnu/packages/python-xyz.scm (python-scooby): New variable.
---
gnu/packages/python-xyz.scm | 67 +++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)

Toggle diff (82 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9a5d311680..1eeec2564e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -119,6 +119,7 @@
;;; Copyright © 2022 Evgeny Pisemsky <evgeny@pisemsky.com>
;;; Copyright © 2022 drozdov <drozdov@portalenergy.tech>
;;; Copyright © 2022 Peter Polidoro <peter@polidoro.io>
+;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29534,3 +29535,69 @@ (define-public python-sre-yield
uses the parsed regular expression, so you get a much more accurate result
than trying to just split strings.")
(license license:asl2.0)))
+
+(define-public python-scooby
+ (package
+ (name "python-scooby")
+ (version "0.5.12")
+ (source
+ ;; The PyPI tarball does not contain the tests.
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/banesullivan/scooby")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1gkpmz8wl3jg8ylf1na35308sznw2g9wx33zqlyq5i2gpy2ml9mw"))))
+ (build-system python-build-system)
+ (native-inputs
+ (list python-beautifulsoup4
+ python-numpy
+ python-pytest
+ python-pytest-cov
+ python-scipy))
+ (propagated-inputs
+ (list python-psutil))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests
+ (lambda _
+ (substitute* "tests/test_scooby.py"
+ ;; The test suite uses the no-version PyPI package
+ ;; (https://pypi.org/project/no-version/),
+ ;; but it doesn't seem worth packaging in Guix just for this.
+ (("scooby\\.report\\.VERSION_NOT_FOUND")
+ "scooby.report.MODULE_NOT_FOUND")
+ (("^ +import no_version # noqa.*") "")
+ ;; The test suite expects an OSError when importing a missing
+ ;; module.
+ ;; However, a ModuleNotFoundError is thrown.
+ (("with pytest\\.raises\\(OSError\\):")
+ "with pytest.raises(ModuleNotFoundError):"))))
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest")))))))
+ (home-page "https://github.com/banesullivan/scooby")
+ (synopsis "Report hardware information and Python package versions")
+ (description
+ "The Scooby package reports the following information about the currently
+running system:
+
+@itemize
+@item operating system name;
+@item hardware information including machine type (e.g., @samp{i386},
+@samp{x86_64}, etc.), CPU count and total RAM;
+@item Python environment (e.g., Python, IPython, etc.);
+@item file system name;
+@item Python version;
+@item versions of specified Python packages.
+@end itemize
+
+It can generate reports as HTML tables or plain text lists.
+
+Scooby has no required dependencies, and only few optional dependencies.")
+ (license license:expat)))
--
2.35.1
P
P
Paul A. Patience wrote on 25 Apr 2022 19:55
[PATCH v3 6/6] gnu: Add python-pyvista.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220425175515.54516-7-paul@apatience.com
* gnu/packages/python-science.scm (python-pyvista): New variable.
---
gnu/packages/python-science.scm | 53 +++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)

Toggle diff (68 lines)
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 07d713e013..4205bdc425 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2022 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
;;; Copyright © 2022 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1183,3 +1184,55 @@ (define-public python-numpy-groupies
"This package provides optimized tools for group-indexing operations:
aggregated sum and more.")
(license license:bsd-3)))
+
+(define-public python-pyvista
+ (package
+ (name "python-pyvista")
+ (version "0.34.0")
+ (source
+ ;; The PyPI tarball does not contain the tests.
+ ;; (However, we don't yet actually run the tests.)
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pyvista/pyvista")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0f2x2wvi5pkpv5h3jrnx8zxnaj51navfqp2fdna1l9rpjgjjf94g"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ (list python-appdirs
+ python-imageio
+ python-matplotlib
+ python-meshio
+ python-numpy
+ python-pillow
+ python-scooby
+ vtk))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; Disable tests for now because they require several modules
+ ;; currently unpackaged in Guix.
+ (delete 'check)
+ ;; Disable the sanity check, which fails with the following error:
+ ;;
+ ;; ...checking requirements: ERROR: pyvista==0.34.0 DistributionNotFound(Requirement.parse('vtk'), {'pyvista'})
+ (delete 'sanity-check))))
+ (home-page "https://docs.pyvista.org/")
+ (synopsis "3D plotting and mesh analysis through VTK")
+ (description
+ "PyVista is...
+
+@itemize
+@item @emph{Pythonic VTK}: a high-level API to the Visualization
+Toolkit (VTK);
+@item mesh data structures and filtering methods for spatial datasets;
+@item 3D plotting made simple and built for large/complex data geometries.
+@end itemize
+
+This package provides a Pythonic, well-documented interface exposing VTK's
+powerful visualization backend to facilitate rapid prototyping, analysis, and
+visual integration of spatially referenced datasets.")
+ (license license:expat)))
--
2.35.1
M
M
Maxime Devos wrote on 29 Apr 2022 22:52
Re: [bug#55060] [PATCH 5/6] gnu: Add python-scooby.
(name . Paul A. Patience)(address . paul@apatience.com)(address . 55060@debbugs.gnu.org)
7e7b69f23148674b8fd003e5868c4a05e5acd364.camel@telenet.be
Paul A. Patience schreef op vr 22-04-2022 om 19:26 [+0000]:
Toggle quote (6 lines)
> It seems the test suite expects the import of a missing package to throw
> an OSError instead of a ModuleNotFoundError, which is not the case at
> least on Python 3.9.9.
> I don't know if it was different before.
> I can add a comment to that effect.

Upstream says we need to add 'pyvips' as listed in
test_requirements.txt.

Greetings,
MAxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmxQChccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7tP7AQDO6T/ADBkcU1khPpIt2QfNP8MH
LmHvWIjPp3jKOWFbYwEAhfCB2WJI9yN81SwoGK7Sdy7QWZCtxN2rjiy0LHAL8Ac=
=Ibw2
-----END PGP SIGNATURE-----


P
P
Paul A. Patience wrote on 2 May 2022 17:00
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 55060@debbugs.gnu.org)
877d74t20s.fsf@apatience.com
On 2022-04-29 16:52:26-04:00, Maxime Devos wrote:
Toggle quote (3 lines)
> Upstream says we need to add 'pyvips' as listed in
> test_requirements.txt.

How would I add a python-pyvips native input that doesn't actually
depend on the vips package?
From my understanding of banesullivan's explanation [1], the test checks
for the presence of pyvips in the absence of vips.

I suppose a python-pyvips-for-python-scooby that inherits from
python-pyvips while removing its propagated inputs would do.

Best regards,
Paul

M
M
Maxime Devos wrote on 2 May 2022 17:06
(name . Paul A. Patience)(address . paul@apatience.com)(address . 55060@debbugs.gnu.org)
e0a3e833e1a6e310b3bb3aa2f94d36920208cb88.camel@telenet.be
Paul A. Patience schreef op ma 02-05-2022 om 15:00 [+0000]:
Toggle quote (3 lines)
> I suppose a python-pyvips-for-python-scooby that inherits from
> python-pyvips while removing its propagated inputs would do.

AFAICT, python-pyvips does not currently exist, at least according to
"guix show python-pyvips". That said, maybe it could be depropagated
(maybe there's no need for a package variant)?

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYm/zjBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7oihAQCiRPjjqDVq4V+Lxtbyu9jSDx3+
UmrlxRsbN4ejVMphrAD/bfWJxBuxGOADzfvqxF0QEOuZ9ETkE2VOJQwrRwkuYAE=
=qlbQ
-----END PGP SIGNATURE-----


P
P
Paul A. Patience wrote on 2 May 2022 17:33
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 55060@debbugs.gnu.org)
87v8uorltd.fsf@apatience.com
On 2022-05-02 11:06:52-04:00, Maxime Devos wrote:
Toggle quote (7 lines)
> Paul A. Patience schreef op ma 02-05-2022 om 15:00 [+0000]:
>> I suppose a python-pyvips-for-python-scooby that inherits from
>> python-pyvips while removing its propagated inputs would do.
>
> AFAICT, python-pyvips does not currently exist, at least according to
> "guix show python-pyvips".

I would have to package it (I'm currently doing so).

Toggle quote (3 lines)
> That said, maybe it could be depropagated
> (maybe there's no need for a package variant)?

Do you mean with a package transformation directly in python-scooby's
native inputs?

Best regards,
Paul
M
M
Maxime Devos wrote on 2 May 2022 18:18
(name . Paul A. Patience)(address . paul@apatience.com)(address . 55060@debbugs.gnu.org)
1d47ff656220d4a2a56988dc7cef88532f5e8a07.camel@telenet.be
Paul A. Patience schreef op ma 02-05-2022 om 15:33 [+0000]:
Toggle quote (6 lines)
> > That said, maybe it could be depropagated
> > (maybe there's no need for a package variant)?
>
> Do you mean with a package transformation directly in python-scooby's
> native inputs?

No, I mean modifying the python-pyvips package definition to move
'vips' from 'propagated-inputs' to 'inputs' (as-is, this might cause
problems as 'python-pyvips' might then not find 'vips', but such things
can often be resolved by sufficient application of 'substitute*').

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYnAEVxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7nQDAP91hC1X4bDgHf8nmgUo6xUrf1MU
L8Blr73A4I8Mw7ZrZQEAwcJcxF548eXdENtm87wp87IRGrJUrJaDFt1QIg4m1As=
=E9hJ
-----END PGP SIGNATURE-----


P
P
Paul A. Patience wrote on 2 May 2022 23:16
[PATCH v4 0/8] gnu: Add python-pyvista.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220502211624.689372-1-paul@apatience.com
Fixed Scooby's pyvips test.
Scooby actually requires a pyvips package that is completely missing its VIPS
dependency, so I don't think there is a way around having a pyvips variant
just for Scooby.

I couldn't figure out how to build the C extension for pyvips, but that's not
relevant for Scooby; I added the package just to inherit from it in Scooby's
pyvips variant.
It could be changed in the future.
For now what's installed is the CFFI version.

I also couldn't figure out how to get some tests to pass with pyperf.
It seems like it should be easy to fix, though.

Paul A. Patience (8):
gnu: python-meshio: Remove input labels.
gnu: python-meshio: Remove trailing booleans.
gnu: python-meshio: Honor #:tests? flag.
gnu: python-meshio: Update to 5.3.4.
gnu: Add python-pyperf.
gnu: Add python-pyvips.
gnu: Add python-scooby.
gnu: Add python-pyvista.

gnu/packages/python-science.scm | 53 +++++++++
gnu/packages/python-xyz.scm | 188 ++++++++++++++++++++++++++++++++
gnu/packages/simulation.scm | 44 ++++----
3 files changed, 262 insertions(+), 23 deletions(-)

--
2.36.0
P
P
Paul A. Patience wrote on 2 May 2022 23:16
[PATCH v4 1/8] gnu: python-meshio: Remove input labels.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220502211624.689372-2-paul@apatience.com
* gnu/packages/simulation.scm (python-meshio)[inputs, native-inputs,
propagated-inputs]: Remove labels.
---
gnu/packages/simulation.scm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 3f2d8e136d..c8309761d2 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -789,13 +789,13 @@ (define-public python-meshio
#t))))
(build-system python-build-system)
(inputs
- `(("h5py" ,python-h5py)
- ("netcdf4" ,python-netcdf4)))
+ (list python-h5py
+ python-netcdf4))
(native-inputs
- `(("pytest" ,python-pytest)))
+ (list python-pytest))
(propagated-inputs
- `(("importlib-metadata" ,python-importlib-metadata)
- ("numpy" ,python-numpy)))
+ (list python-importlib-metadata
+ python-numpy))
(arguments
`(#:phases
(modify-phases %standard-phases
--
2.36.0
P
P
Paul A. Patience wrote on 2 May 2022 23:16
[PATCH v4 2/8] gnu: python-meshio: Remove trailing booleans.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220502211624.689372-3-paul@apatience.com
* gnu/packages/simulation.scm (python-meshio)[snippet]: Remove trailing
boolean (and therefore the 'begin').
[arguments]: Remove trailing boolean.
---
gnu/packages/simulation.scm | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

Toggle diff (29 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index c8309761d2..42383bf486 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -782,11 +782,9 @@ (define-public python-meshio
(base32
"0kv832s2vyff30zz8yqypw5jifwdanvh5x56d2bzkvy94h4jlddy"))
(snippet
- '(begin
- (let ((file (open-file "setup.py" "a")))
- (display "from setuptools import setup\nsetup()" file)
- (close-port file))
- #t))))
+ '(let ((file (open-file "setup.py" "a")))
+ (display "from setuptools import setup\nsetup()" file)
+ (close-port file)))))
(build-system python-build-system)
(inputs
(list python-h5py
@@ -802,8 +800,7 @@ (define-public python-meshio
(replace 'check
(lambda* (#:key outputs inputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs)
- (invoke "python" "-m" "pytest" "-v" "tests")
- #t)))))
+ (invoke "python" "-m" "pytest" "-v" "tests"))))))
(home-page "https://github.com/nschloe/meshio")
(synopsis "I/O for mesh files")
(description "There are various file formats available for
--
2.36.0
P
P
Paul A. Patience wrote on 2 May 2022 23:16
[PATCH v4 3/8] gnu: python-meshio: Honor #:tests? flag.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220502211624.689372-4-paul@apatience.com
* gnu/packages/simulation.scm (python-meshio)[arguments]: Adjust custom
'check' phase to honor the #:tests? flag. Remove unnecessary
'add-installed-pythonpath' call.
---
gnu/packages/simulation.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (21 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 42383bf486..b927392263 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -795,12 +795,12 @@ (define-public python-meshio
(list python-importlib-metadata
python-numpy))
(arguments
- `(#:phases
+ '(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key outputs inputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (invoke "python" "-m" "pytest" "-v" "tests"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "pytest" "-v" "tests")))))))
(home-page "https://github.com/nschloe/meshio")
(synopsis "I/O for mesh files")
(description "There are various file formats available for
--
2.36.0
P
P
Paul A. Patience wrote on 2 May 2022 23:17
[PATCH v4 4/8] gnu: python-meshio: Update to 5.3.4.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220502211624.689372-5-paul@apatience.com
* gnu/packages/simulation.scm (python-meshio): Update to 5.3.4.
[source]: Reindent.
[propagated-inputs]: Add python-rich.
---
gnu/packages/simulation.scm | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)

Toggle diff (44 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index b927392263..19e41b0591 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -773,18 +773,18 @@ (define-public fullswof-2d
(define-public python-meshio
(package
(name "python-meshio")
- (version "4.4.6")
+ (version "5.3.4")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "meshio" version))
- (sha256
- (base32
- "0kv832s2vyff30zz8yqypw5jifwdanvh5x56d2bzkvy94h4jlddy"))
- (snippet
- '(let ((file (open-file "setup.py" "a")))
- (display "from setuptools import setup\nsetup()" file)
- (close-port file)))))
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "meshio" version))
+ (sha256
+ (base32
+ "1w39qcg0rw5kb04j7sa45fnqd6k20fsdgrf62cmw2ygjgwnnjh72"))
+ (snippet
+ '(let ((file (open-file "setup.py" "a")))
+ (display "from setuptools import setup\nsetup()" file)
+ (close-port file)))))
(build-system python-build-system)
(inputs
(list python-h5py
@@ -793,7 +793,8 @@ (define-public python-meshio
(list python-pytest))
(propagated-inputs
(list python-importlib-metadata
- python-numpy))
+ python-numpy
+ python-rich))
(arguments
'(#:phases
(modify-phases %standard-phases
--
2.36.0
P
P
Paul A. Patience wrote on 2 May 2022 23:17
[PATCH v4 5/8] gnu: Add python-pyperf.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220502211624.689372-6-paul@apatience.com
* gnu/packages/python-xyz.scm (python-pyperf): New variable.
---
gnu/packages/python-xyz.scm | 47 +++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9a5d311680..84f8b991e5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -29534,3 +29534,50 @@ (define-public python-sre-yield
uses the parsed regular expression, so you get a much more accurate result
than trying to just split strings.")
(license license:asl2.0)))
+
+(define-public python-pyperf
+ (package
+ (name "python-pyperf")
+ (version "2.3.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyperf" version))
+ (sha256
+ (base32 "189qf9wdbig0fk4n3bavx8acgdbay5lllfvw48jvbfaafb7y5hja"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests
+ (lambda _
+ ;; Some of these tests fail with:
+ ;;
+ ;; ModuleNotFoundError: No module named 'pyperf'
+ ;;
+ ;; even when calling ‘add-installed-pythonpath’ in the ‘check’
+ ;; phase.
+ (delete-file "pyperf/tests/test_examples.py")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; From tox.ini's ‘testenv.commands’.
+ (invoke "python" "-bb" "-Wd"
+ "-m" "unittest" "discover"
+ "-s" "pyperf/tests/" "-v")))))))
+ (native-inputs
+ (list python-psutil))
+ (home-page "https://github.com/psf/pyperf")
+ (synopsis "Toolkit for running Python benchmarks")
+ (description "The Python @code{pyperf} module is a toolkit for writing,
+running and analyzing benchmarks. It features a simple API that can:
+
+@itemize
+@item automatically calibrate a benchmark for a time budget;
+@item spawn multiple worker processes;
+@item compute the mean and standard deviation;
+@item detect if a benchmark result seems unstable;
+@item store benchmark results in JSON format;
+@item support multiple units: seconds, bytes and integer.
+@end itemize")
+ (license license:expat)))
--
2.36.0
P
P
Paul A. Patience wrote on 2 May 2022 23:17
[PATCH v4 6/8] gnu: Add python-pyvips.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220502211624.689372-7-paul@apatience.com
* gnu/packages/python-xyz.scm (python-pyvips): New variable.
---
gnu/packages/python-xyz.scm | 60 +++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)

Toggle diff (78 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 84f8b991e5..c70379a056 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -172,6 +172,7 @@ (define-module (gnu packages python-xyz)
#:use-module (gnu packages haskell-xyz)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
+ #:use-module (gnu packages image-processing)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages jupyter)
#:use-module (gnu packages kerberos)
@@ -7582,6 +7583,65 @@ (define-public python-imageio
data, and scientific formats.")
(license license:bsd-2)))

+(define-public python-pyvips
+ (package
+ (name "python-pyvips")
+ (version "2.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyvips" version))
+ (sha256
+ (base32 "0lq71iiic4pc8qhxr60gi141w25pjnn4vsh05d5l0fjkgjsv137b"))))
+ (build-system python-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ ;; Maybe switch to API mode (i.e., build the C extension)?
+ ;; It is advertised as faster to start up and run.
+ ;; However, even with ‘pkg-config’ and ‘python-pkgconfig’ in
+ ;; ‘native-inputs’, the API mode build fails with:
+ ;;
+ ;; Falling back to ABI mode. Details: unable to find pkg-config package "vips"
+ ;;
+ ;; The build doesn't actually fail without the below
+ ;; substitution, it's just slower because ‘setup.py’ tries
+ ;; (unsuccessfully) to download the Python ‘pkgconfig’ module.
+ (add-after 'unpack 'fix-build
+ (lambda _
+ (substitute* "setup.py"
+ (("^( +setup_)API\\(\\)\n" _ prefix)
+ (string-append prefix "ABI()\n")))))
+ (add-after 'unpack 'fix-paths
+ (lambda _
+ (substitute* "pyvips/__init__.py"
+ (("^( +_vips_libname) = '(libvips.so.42)'"
+ _ var libname)
+ (format #f "~a = '~a/lib/~a'"
+ var #$(this-package-input "vips") libname))
+ (("^( +_gobject_libname) = '(libgobject-2.0.so.0)'"
+ _ var libname)
+ (format #f "~a = '~a/lib/~a'"
+ var #$(this-package-input "glib") libname)))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "setup.py" "test")))))))
+ (native-inputs
+ (list python-pyperf
+ python-pytest
+ python-pytest-flake8
+ python-pytest-runner))
+ (inputs
+ (list glib vips))
+ (propagated-inputs
+ (list python-cffi))
+ (home-page "https://github.com/libvips/pyvips")
+ (synopsis "Python bindings for VIPS")
+ (description "The @code{pyvips} package provides Python bindings for VIPS,
+a multithreaded image-processing system with low memory needs.")
+ (license license:expat)))
+
(define-public python-pycparser
(package
(name "python-pycparser")
--
2.36.0
P
P
Paul A. Patience wrote on 2 May 2022 23:17
[PATCH v4 7/8] gnu: Add python-scooby.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220502211624.689372-8-paul@apatience.com
* gnu/packages/python-xyz.scm (python-pyvips-for-python-scooby,
python-scooby): New variables.
---
gnu/packages/python-xyz.scm | 81 +++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)

Toggle diff (96 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c70379a056..20dbcefde0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -119,6 +119,7 @@
;;; Copyright © 2022 Evgeny Pisemsky <evgeny@pisemsky.com>
;;; Copyright © 2022 drozdov <drozdov@portalenergy.tech>
;;; Copyright © 2022 Peter Polidoro <peter@polidoro.io>
+;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29641,3 +29642,83 @@ (define-public python-pyperf
@item support multiple units: seconds, bytes and integer.
@end itemize")
(license license:expat)))
+
+;; Scooby requires for its test suite a ‘pyvips’ package that is missing its
+;; VIPS dependency.
+(define python-pyvips-for-python-scooby
+ (package
+ (inherit python-pyvips)
+ (name "python-pyvips-for-python-scooby")
+ (arguments
+ (substitute-keyword-arguments (package-arguments python-pyvips)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (delete 'fix-paths)
+ ;; The checks won't succeed without VIPS.
+ (delete 'check)
+ (delete 'sanity-check)))))
+ (inputs
+ (modify-inputs (package-inputs python-pyvips)
+ (delete "vips")))
+ (synopsis "pyvips for Scooby's test suite")))
+
+(define-public python-scooby
+ (package
+ (name "python-scooby")
+ (version "0.5.12")
+ (source
+ ;; The PyPI tarball does not contain the tests.
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/banesullivan/scooby")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1gkpmz8wl3jg8ylf1na35308sznw2g9wx33zqlyq5i2gpy2ml9mw"))))
+ (build-system python-build-system)
+ (native-inputs
+ (list python-beautifulsoup4
+ python-numpy
+ python-pytest
+ python-pytest-cov
+ python-pyvips-for-python-scooby
+ python-scipy))
+ (propagated-inputs
+ (list python-psutil))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests
+ (lambda _
+ (substitute* "tests/test_scooby.py"
+ ;; The test suite uses the no-version PyPI package
+ ;; (https://pypi.org/project/no-version/),
+ ;; but it doesn't seem worth packaging in Guix just for this.
+ (("scooby\\.report\\.VERSION_NOT_FOUND")
+ "scooby.report.MODULE_NOT_FOUND")
+ (("^ +import no_version # noqa.*") ""))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest")))))))
+ (home-page "https://github.com/banesullivan/scooby")
+ (synopsis "Report hardware information and Python package versions")
+ (description
+ "The Scooby package reports the following information about the currently
+running system:
+
+@itemize
+@item operating system name;
+@item hardware information including machine type (e.g., @samp{i386},
+@samp{x86_64}, etc.), CPU count and total RAM;
+@item Python environment (e.g., Python, IPython, etc.);
+@item file system name;
+@item Python version;
+@item versions of specified Python packages.
+@end itemize
+
+It can generate reports as HTML tables or plain text lists.
+
+Scooby has no required dependencies, and only few optional dependencies.")
+ (license license:expat)))
--
2.36.0
P
P
Paul A. Patience wrote on 2 May 2022 23:17
[PATCH v4 8/8] gnu: Add python-pyvista.
(address . 55060@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220502211624.689372-9-paul@apatience.com
* gnu/packages/python-science.scm (python-pyvista): New variable.
---
gnu/packages/python-science.scm | 53 +++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)

Toggle diff (68 lines)
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 07d713e013..a62de1e5a0 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2022 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
;;; Copyright © 2022 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1183,3 +1184,55 @@ (define-public python-numpy-groupies
"This package provides optimized tools for group-indexing operations:
aggregated sum and more.")
(license license:bsd-3)))
+
+(define-public python-pyvista
+ (package
+ (name "python-pyvista")
+ (version "0.34.0")
+ (source
+ ;; The PyPI tarball does not contain the tests.
+ ;; (However, we don't yet actually run the tests.)
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pyvista/pyvista")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0f2x2wvi5pkpv5h3jrnx8zxnaj51navfqp2fdna1l9rpjgjjf94g"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ (list python-appdirs
+ python-imageio
+ python-matplotlib
+ python-meshio
+ python-numpy
+ python-pillow
+ python-scooby
+ vtk))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ ;; Disable tests for now because they require several modules
+ ;; currently unpackaged in Guix.
+ (delete 'check)
+ ;; Disable the sanity check, which fails with the following error:
+ ;;
+ ;; ...checking requirements: ERROR: pyvista==0.34.0 DistributionNotFound(Requirement.parse('vtk'), {'pyvista'})
+ (delete 'sanity-check))))
+ (home-page "https://docs.pyvista.org/")
+ (synopsis "3D plotting and mesh analysis through VTK")
+ (description
+ "PyVista is...
+
+@itemize
+@item @emph{Pythonic VTK}: a high-level API to the Visualization
+Toolkit (VTK);
+@item mesh data structures and filtering methods for spatial datasets;
+@item 3D plotting made simple and built for large/complex data geometries.
+@end itemize
+
+This package provides a Pythonic, well-documented interface exposing VTK's
+powerful visualization backend to facilitate rapid prototyping, analysis, and
+visual integration of spatially referenced datasets.")
+ (license license:expat)))
--
2.36.0
L
L
Ludovic Courtès wrote on 23 May 2022 15:56
Re: bug#55060: [PATCH 0/6] gnu: Add python-pyvista.
(name . Paul A. Patience)(address . paul@apatience.com)(address . 55060-done@debbugs.gnu.org)
87o7zo5p4w.fsf_-_@gnu.org
Hi,

"Paul A. Patience" <paul@apatience.com> skribis:

Toggle quote (14 lines)
> Fixed Scooby's pyvips test.
> Scooby actually requires a pyvips package that is completely missing its VIPS
> dependency, so I don't think there is a way around having a pyvips variant
> just for Scooby.
>
> I couldn't figure out how to build the C extension for pyvips, but that's not
> relevant for Scooby; I added the package just to inherit from it in Scooby's
> pyvips variant.
> It could be changed in the future.
> For now what's installed is the CFFI version.
>
> I also couldn't figure out how to get some tests to pass with pyperf.
> It seems like it should be easy to fix, though.

OK. Looks like future-work items to me, not blockers.

Toggle quote (10 lines)
> Paul A. Patience (8):
> gnu: python-meshio: Remove input labels.
> gnu: python-meshio: Remove trailing booleans.
> gnu: python-meshio: Honor #:tests? flag.
> gnu: python-meshio: Update to 5.3.4.
> gnu: Add python-pyperf.
> gnu: Add python-pyvips.
> gnu: Add python-scooby.
> gnu: Add python-pyvista.

Applied, thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 55060
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