GNU bug report logs - #55989
[PATCH 1/2] gnu: Add python-pydicom.

Previous Next

Package: guix-patches;

Reported by: Antero Mejr <antero <at> mailbox.org>

Date: Wed, 15 Jun 2022 01:28:02 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 55989 in the body.
You can then email your comments to 55989 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#55989; Package guix-patches. (Wed, 15 Jun 2022 01:28:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Antero Mejr <antero <at> mailbox.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 15 Jun 2022 01:28:03 GMT) Full text and rfc822 format available.

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

From: Antero Mejr <antero <at> mailbox.org>
To: guix-patches <at> gnu.org
Subject: [PATCH 1/2] gnu: Add python-pydicom.
Date: Wed, 15 Jun 2022 01:27:13 +0000
* gnu/packages/python-science.scm (python-pydicom): New variable.
---
 gnu/packages/python-science.scm | 37 +++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 0684826a6c..08359515d5 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2022 Paul A. Patience <paul <at> apatience.com>
 ;;; Copyright © 2022 Wiktor Żelazny <wzelazny <at> vurv.cz>
 ;;; Copyright © 2022 Eric Bavier <bavier <at> posteo.net>
+;;; Copyright © 2022 Antero Mejr <antero <at> mailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -46,6 +47,7 @@ (define-module (gnu packages python-science)
   #:use-module (gnu packages cpp)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages image)
   #:use-module (gnu packages image-processing)
   #:use-module (gnu packages machine-learning)
   #:use-module (gnu packages maths)
@@ -1367,3 +1369,38 @@ (define-public python-gpy
 Python, from the Sheffield machine learning group.  GPy implements a range of
 machine learning algorithms based on GPs.")
     (license license:bsd-3)))
+
+(define-public python-pydicom
+  (package
+    (name "python-pydicom")
+    (version "2.3.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/pydicom/pydicom")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "18l26s53yf5j9yh2zwq83n74qq4f2iq0cfblamsw4y9k35l1c108"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      ;; 181 failed, 2235 pass. Pulls test datasets off the web, no-go for Guix
+      #:tests? #f
+      #:phases
+      #~(modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (chdir "pydicom/tests")
+               (invoke "python3" "-m" "pytest")))))))
+    (native-inputs (list python-pytest))
+    (inputs (list gdcm libjpeg-turbo))
+    (propagated-inputs (list python-numpy python-pillow))
+    (home-page "https://github.com/pydicom/pydicom")
+    (synopsis "Pure Python package for reading and writing DICOM data")
+    (description "pydicom provides a pure Python package for reading and
+writing DICOM medical imaging data. It lets developers read, modify and write
+DICOM data in a pythonic way.")
+    (license license:expat)))
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55989; Package guix-patches. (Wed, 15 Jun 2022 08:01:01 GMT) Full text and rfc822 format available.

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

From: Maxime Devos <maximedevos <at> telenet.be>
To: Antero Mejr <antero <at> mailbox.org>, 55989 <at> debbugs.gnu.org
Subject: Re: [bug#55989] [PATCH 1/2] gnu: Add python-pydicom.
Date: Wed, 15 Jun 2022 09:59:56 +0200
[Message part 1 (text/plain, inline)]
Antero Mejr via Guix-patches via schreef op wo 15-06-2022 om 01:27
[+0000]:
> +      ;; 181 failed, 2235 pass. Pulls test datasets off the web, no-go for Guix
> +      #:tests? #f

How about only disabling tests that download from the web?
Are all of these test failures due to downloading from the web or are
there some other tests too?

> +    (synopsis "Pure Python package for reading and writing DICOM data")

Unlike some language-specific package managers, Guix supports using dependents
from other languages without any complications, so no need to mention ‘Pure’
here.

> + pydicom provides a pure Python package

It doesn't provide a Python package, it is a Python package, especially if pydicom
is replaced by @code{python-pydicom}.

Greetings,
Maxime.
 
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55989; Package guix-patches. (Wed, 15 Jun 2022 15:41:02 GMT) Full text and rfc822 format available.

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

From: Antero Mejr <antero <at> mailbox.org>
To: 55989 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: Add gdcm.
Date: Wed, 15 Jun 2022 15:39:53 +0000
Here's the updated GDCM patch, which is a dependency.

* gnu/packages/bioinformatics.scm (gdcm): New variable.
---
 gnu/packages/bioinformatics.scm | 37 +++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 87df6c3515..2c9f3b4a6f 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -23,6 +23,7 @@
 ;;; Copyright © 2021 Hong Li <hli <at> mdc-berlin.de>
 ;;; Copyright © 2021, 2022 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 Felix Gruber <felgru <at> posteo.net>
+;;; Copyright © 2022 Antero Mejr <antero <at> mailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -15745,3 +15746,39 @@ (define-public wfmash
 module capable of computing base-level alignments for very large sequences.")
     (home-page "https://github.com/ekg/wfmash")
     (license license:expat)))
+
+(define-public gdcm
+  (package
+    (name "gdcm")
+    (version "2.8.9")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/malaterre/gdcm")
+                    (commit (string-append "v" version))
+                    (recursive? #t)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0v8ggym2kz26rwyvsyy3mg7j5jbvd1pz5cwchh29iyclagf0l9ry"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags
+      #~(list "-DGDCM_BUILD_TESTING=true"
+              (string-append "-DCMAKE_CTEST_ARGUMENTS=-E;"
+                             "'TestFileMetaInformation"
+                             "|TestElement2"
+                             "|TestSCUValidation"
+                             "|TestEcho"
+                             "|TestFind'"))))
+    (home-page "http://gdcm.sourceforge.net/wiki/index.php/Main_Page")
+    (synopsis "Grassroots DICOM library")
+    (description
+     "Grassroots DICOM (GDCM) is an implementation of the DICOM
+standard designed to be open source so that researchers may access clinical
+data directly. GDCM includes a file format definition and a network
+communications protocol, both of which should be extended to provide a full set
+of tools for a researcher or small medical imaging vendor to interface with an
+existing medical database.")
+    (license license:bsd-2)))
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55989; Package guix-patches. (Wed, 15 Jun 2022 15:41:02 GMT) Full text and rfc822 format available.

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

From: Antero Mejr <antero <at> mailbox.org>
To: 55989 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: Add python-pydicom.
Date: Wed, 15 Jun 2022 15:39:52 +0000
Updated to add tests that don't use web resources.
Tested using the example code, reading/writing a dicom file and accessing
the pixel_array using numpy.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 0684826a6c..d26d3bc9b4 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2022 Paul A. Patience <paul <at> apatience.com>
 ;;; Copyright © 2022 Wiktor Żelazny <wzelazny <at> vurv.cz>
 ;;; Copyright © 2022 Eric Bavier <bavier <at> posteo.net>
+;;; Copyright © 2022 Antero Mejr <antero <at> mailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -46,6 +47,7 @@ (define-module (gnu packages python-science)
   #:use-module (gnu packages cpp)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages image)
   #:use-module (gnu packages image-processing)
   #:use-module (gnu packages machine-learning)
   #:use-module (gnu packages maths)
@@ -1367,3 +1369,52 @@ (define-public python-gpy
 Python, from the Sheffield machine learning group.  GPy implements a range of
 machine learning algorithms based on GPs.")
     (license license:bsd-3)))
+
+(define-public python-pydicom
+  (package
+    (name "python-pydicom")
+    (version "2.3.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/pydicom/pydicom")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "18l26s53yf5j9yh2zwq83n74qq4f2iq0cfblamsw4y9k35l1c108"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (chdir "pydicom/tests")
+               (invoke "python3" "-m" "pytest" "-k" ;skip tests using web data
+                       (string-append
+                        "not test_jpeg_ls_pixel_data.py"
+                        " and not test_gdcm_pixel_data.py"
+                        " and not test_pillow_pixel_data.py"
+                        " and not test_rle_pixel_data.py"
+                        " and not Test_JPEG_LS_Lossless_transfer_syntax"
+                        " and not test_numpy_pixel_data.py"
+                        " and not test_data_manager.py"
+                        " and not test_handler_util.py"
+                        " and not test_overlay_np.py"
+                        " and not test_encoders_pydicom.py"
+                        " and not test_encaps.py"
+                        " and not test_reading_ds_with_known_tags_with_UN_VR"
+                        " and not TestDatasetOverlayArray"
+                        " and not TestReader"
+                        " and not test_filewriter.py"))))))))
+    (native-inputs (list python-pytest))
+    (inputs (list gdcm libjpeg-turbo))
+    (propagated-inputs (list python-numpy python-pillow))
+    (home-page "https://github.com/pydicom/pydicom")
+    (synopsis "Python library for reading and writing DICOM data")
+    (description "@code{python-pydicom} is a Python library for reading
+and writing DICOM medical imaging data. It lets developers read, modify and
+write DICOM data in a pythonic way.")
+    (license license:expat)))
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55989; Package guix-patches. (Wed, 15 Jun 2022 15:46:02 GMT) Full text and rfc822 format available.

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

From: Antero Mejr <antero <at> mailbox.org>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 55989 <at> debbugs.gnu.org
Subject: Re: [bug#55989] [PATCH 1/2] gnu: Add python-pydicom.
Date: Wed, 15 Jun 2022 15:40:52 +0000
Maxime Devos <maximedevos <at> telenet.be> writes:

> How about only disabling tests that download from the web?
> Are all of these test failures due to downloading from the web or are
> there some other tests too?

Sure, see updated patch. I looked through the error log to confirm
that the tests were failing due to missing data. I also did an
end-to-end test of pydicom by importing it, then reading/writing
a DICOM file.

>
>> +    (synopsis "Pure Python package for reading and writing DICOM data")
>
> Unlike some language-specific package managers, Guix supports using dependents
> from other languages without any complications, so no need to mention ‘Pure’
> here.
>

OK, updated.

>> + pydicom provides a pure Python package
>
> It doesn't provide a Python package, it is a Python package, especially if pydicom
> is replaced by @code{python-pydicom}.
>

Updated.




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sun, 08 Jan 2023 15:07:02 GMT) Full text and rfc822 format available.

Notification sent to Antero Mejr <antero <at> mailbox.org>:
bug acknowledged by developer. (Sun, 08 Jan 2023 15:07:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Antero Mejr <antero <at> mailbox.org>
Cc: 55989-done <at> debbugs.gnu.org
Subject: Re: bug#55989: [PATCH 1/2] gnu: Add python-pydicom.
Date: Sun, 08 Jan 2023 16:06:31 +0100
Hi,

Antero Mejr <antero <at> mailbox.org> skribis:

> Here's the updated GDCM patch, which is a dependency.
>
> * gnu/packages/bioinformatics.scm (gdcm): New variable.

I had to adjust the hash of the GDCM source (a typo?), but after that I
applied both the GDCM and pydicom patches.

Thanks, and apologies for the delay!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 06 Feb 2023 12:24:14 GMT) Full text and rfc822 format available.

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

Previous Next


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