diff mbox series

[bug#55060,v2,5/6] gnu: Add python-scooby.

Message ID 20220422124118.66783-6-paul@apatience.com
State Accepted
Headers show
Series gnu: Add python-pyvista. | expand

Checks

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

Commit Message

Paul A. Patience April 22, 2022, 12:41 p.m. UTC
* gnu/packages/python-xyz.scm (python-scooby): New variable.
---
 gnu/packages/python-xyz.scm | 48 +++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

--
2.35.1

Comments

M April 22, 2022, 5:51 p.m. UTC | #1
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.

Greetings,
Maxime.
diff mbox series

Patch

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)))