From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WOMrFtT9qWKlFwEAbAwnHQ (envelope-from ) for ; Wed, 15 Jun 2022 17:42:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id IfVcFdT9qWLhkgAAG6o9tA (envelope-from ) for ; Wed, 15 Jun 2022 17:42:12 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D6886107AF for ; Wed, 15 Jun 2022 17:42:10 +0200 (CEST) Received: from localhost ([::1]:46696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1V9l-00060x-Vq for larch@yhetil.org; Wed, 15 Jun 2022 11:42:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1V8h-0004KJ-1J for guix-patches@gnu.org; Wed, 15 Jun 2022 11:41:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45702) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1V8g-0000EW-Op for guix-patches@gnu.org; Wed, 15 Jun 2022 11:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1V8g-0003I3-Ly for guix-patches@gnu.org; Wed, 15 Jun 2022 11:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55989] [PATCH 1/2] gnu: Add python-pydicom. References: <20220615012714.1414-1-antero@mailbox.org> In-Reply-To: <20220615012714.1414-1-antero@mailbox.org> Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Jun 2022 15:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55989 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55989@debbugs.gnu.org Received: via spool by 55989-submit@debbugs.gnu.org id=B55989.165530762412582 (code B ref 55989); Wed, 15 Jun 2022 15:41:02 +0000 Received: (at 55989) by debbugs.gnu.org; 15 Jun 2022 15:40:24 +0000 Received: from localhost ([127.0.0.1]:39598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1V7u-0003Gj-Db for submit@debbugs.gnu.org; Wed, 15 Jun 2022 11:40:24 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:41248) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1V7n-0003Ff-NF for 55989@debbugs.gnu.org; Wed, 15 Jun 2022 11:40:11 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4LNTyR0fjdz9sXS for <55989@debbugs.gnu.org>; Wed, 15 Jun 2022 17:39:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1655307599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zn7xmpin7P2y+57d03yzbD6AOkkVH+dbXnarrMwGSD4=; b=MOnicyvcelbB+wR7FfSio71+IWlcT7z0cvHkwXsnruWEJucEAVnwflAbBIEVWl0vXqqeHa lbJhoX4tu/9pbFrpq4GvAXMzQ2hMR1Sk9+LNDWJaN9D/i8GwdkI1OHrSOrnuDhJ+Ljzmhg NtflYoskX31BbIH6oeZqjJSRs3znJUtz8JE7tyBA94y7NTaKdrKlUi5Z34ZKmlYgMezWoL GprGPVCUPvmrhlrx1T6+EH8F5Gw3ap7ZREr6KZM8QDPuWNxrpPODcDi93b3X4Mi2LH6526 gRky3t57IwaZahiGDf+8eQkghabIim7YHcF12BhIOqu79pqZ4T4hHX1/vXnVMw== Date: Wed, 15 Jun 2022 15:39:52 +0000 Message-Id: <20220615153953.32070-1-antero@mailbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MBO-RS-ID: b183259b34ff8b3c37d X-MBO-RS-META: ryqs7scme5zbp4jmjgicsprrodncyxba X-Rspamd-Queue-Id: 4LNTyR0fjdz9sXS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Antero Mejr X-ACL-Warn: , Antero Mejr via Guix-patches From: Antero Mejr via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655307732; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Zn7xmpin7P2y+57d03yzbD6AOkkVH+dbXnarrMwGSD4=; b=ChMScRI230ngsbHZ7uCMEvSb3Bflt5H+RVAbcIfXqZvs3KQ83RFNEQT5RPlKb1nVuI9jPk Y67QD1a5ziMDDSNTknNvvMh2EG1VLHzsmtyVcLE91W8f9WJIBl7hisSMb507P0SLPaTEEV bJ0tHgQ12kHsdNVYN2J632jPUovDo/b11eAyapuz+99LjTh3vxqFX+JgmEHTN7J/VuYN+4 wvUYTS2HU+/YJrNFiyRFwG9wnLOGKm/oxVZwak1FmevPID0+TZ12h0PmYpko5K3HElC7Zc Hgz8pYuSm9KW9Le1sZv6JnQUfmUXlfbzoPL9iLlcvpnoGBM6HBWFqsMknIFG7A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655307732; a=rsa-sha256; cv=none; b=OKMFRYxmDn9iICKH1DPvW+A87LhygSyKUCKxX/hlgboj7JY9nr5eV4ERxxhprJ1jwzcWf3 2u/nV/3wlXF8F+MQqMuc8EOJUCqL949NN0t1L2NfuQ68ExbZFV8KcnV920yRmp6vFT5NDn 6kRI54hod3wyO4De4YpP7ECBDDZ3GE006wb488bXeHWb7JLbzimcyg8z5NDsFal+yuj7zw cPm7g3BiHgcxBtzghhNgEtd53ofOOlulF5CODadNQLMgpyf9ZSrxoFn0m7xVTL06bqkXKR 9NIbEh45Dy1LGfcVvkF1YU0GpIZ0+QndepmjI+IGZ6lE8N0oh4pFv7UydEFZag== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=MOnicyvc; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.09 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=MOnicyvc; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D6886107AF X-Spam-Score: -5.09 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1J8sXzKXyh/j 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 ;;; Copyright © 2022 Wiktor Żelazny ;;; Copyright © 2022 Eric Bavier +;;; Copyright © 2022 Antero Mejr ;;; ;;; 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