From patchwork Fri Apr 4 19:16:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 41298 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BE45327BBEA; Fri, 4 Apr 2025 20:19:52 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 22D4F27BBE2 for ; Fri, 4 Apr 2025 20:19:52 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u0mZE-000779-98; Fri, 04 Apr 2025 15:19:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0mZD-00075O-31 for guix-patches@gnu.org; Fri, 04 Apr 2025 15:19:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u0mZC-0007wB-Nk for guix-patches@gnu.org; Fri, 04 Apr 2025 15:19:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=3TkHtLDjxOYACiJqk8Wpz7yH+X5EdOKRVdzlXVs1/lg=; b=Fw+yhsfJ8FeXQ496+9HwlyaoUIt5vRpSNq4AhupVpENqPsbgJozz/Wg1XE1+ocK601D/DPObUs7aryCTAHhoI0skf0xAMv1Xk6SHBLAzOb05m1O4eyBzBHx9W2S5ma2rk/GJFYxC1Cuk6nmIeCmgR/IjOH2yKwdbkvGCxXQFAgohksXPTRhtIrlgh/CDg2nPd1QRJcV0wCPxVbGEJxzznywE2n6Rziu7cJ/efjr1aR4kazEIl9GmCmdl9XR5bNKeJpb1k5ct0DPY4f+JW/2R3u20Voiy7+szYRPPYd7fGgR4oUSTXLVdNP/HoOGORpGuNRun9RGp+87dcQIzjI8wrg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u0mZC-0007Qg-GM for guix-patches@gnu.org; Fri, 04 Apr 2025 15:19:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77541] [PATCH 24/38] gnu: python-pysnptools: Fix build and enable tests. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 04 Apr 2025 19:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77541 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77541@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 77541-submit@debbugs.gnu.org id=B77541.174379429328339 (code B ref 77541); Fri, 04 Apr 2025 19:19:02 +0000 Received: (at 77541) by debbugs.gnu.org; 4 Apr 2025 19:18:13 +0000 Received: from localhost ([127.0.0.1]:40110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u0mYP-0007N0-5i for submit@debbugs.gnu.org; Fri, 04 Apr 2025 15:18:13 -0400 Received: from 6.mo562.mail-out.ovh.net ([46.105.48.43]:58969) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u0mXu-0007Gt-SF for 77541@debbugs.gnu.org; Fri, 04 Apr 2025 15:17:43 -0400 Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net [79.137.60.37]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 4ZTpK16HKfz1YGT; Fri, 4 Apr 2025 19:17:41 +0000 (UTC) Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net. [127.0.0.1]) by director4.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <77541@debbugs.gnu.org>; Fri, 4 Apr 2025 19:17:41 +0000 (UTC) Received: from mta11.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.109.148.152]) by director4.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4ZTpK15zgMzy98; Fri, 4 Apr 2025 19:17:41 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.0]) by mta11.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 7406D263921; Fri, 4 Apr 2025 19:17:41 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-103G005e9187ad1-3804-4eb8-9557-f0a5c790f03a, 5C763BAE2B049B0552D0CEA89988AE409CD35AAA) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.92.117.144 Date: Fri, 4 Apr 2025 21:16:56 +0200 Message-ID: <20250404191717.32747-24-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250404191717.32747-1-ngraves@ngraves.fr> References: <20250404191717.32747-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 3482689888511255266 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduledvvdeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhephedvtdffvdduudeluefhffdufeehleeffeevuefhjeevleelkeehkeeljeeiveevnecuffhomhgrihhnpehgihhthhhusgdrtghomhdpghhithhhuhgsuhhsvghrtghonhhtvghnthdrtghomhenucfkphepuddvjedrtddrtddruddpledtrdelvddruddujedrudeggeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjeejheegudesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpoffvtefjohhsthepmhhoheeivdgmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=3TkHtLDjxOYACiJqk8Wpz7yH+X5EdOKRVdzlXVs1/lg=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1743794262; v=1; b=Ly29Au8RSM/TuNwz48z2y/yCSBTKEJXYiR/JqiI/O3teRgPlgWGJz4XzSQQ7tfa5++rlcF0f /5VHSs6gsaq426i3Srt6wEaU7I8URU5Jl0g258cr9rtoDmRadzs9F+Mx5QWseONBGAPLD1XJrKl 6/M8pk4qDzRD5G14ArC9xh4m1LUW/Ib6xmAlwRpOPBFpqfstZUQdPWwUc87fiXe5mR0LV6oKfNM /iJ2WqgzCxzBUzVUWMLgtkQpierpDboumUeWFa8SRvNd9l9YRCPyJG0H3muCBexLH5boyyxLqun 3doYSrGKgTU32wCIpBO1//kf/ZaGSvvpeCuXrZ45Ss+bw== 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: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/bioinformatics.scm (python-pysnptools): Fix build and enable tests. [arguments]{test-flags}: Ignore failing tests. {phases}: Add 'patch-data-path and 'loosen-requirements phases. (pysnptools-examples-files): Add origin. (bgen-sample-files): Add origin. --- gnu/packages/bioinformatics.scm | 80 ++++++++++++++++++++++++++++++--- 1 file changed, 75 insertions(+), 5 deletions(-) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index c5fe295f6c..3f612fd701 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -3715,6 +3715,49 @@ (define-public python-pygam familiar to anyone with experience of scikit-learn or scipy.") (license license:asl2.0))) +(define bgen-sample-files + (let* ((name "bgen-sample-files") + (commit "7b1bc74f58b326ca19606fa5f3c6093d48367993") + (revision "0") + (version (git-version "0.0.0" revision commit))) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/fastlmm/bgen-sample-files") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1b8jkscccyspfr3y1b66xvwnljcha08r2i24v9d6hcm5zii0l54w"))))) + +(define pynsptools-examples-files + (let* ((name "pysnptools-examples-files") + ;; taken from pysnptools/util/pysnptools.hashdown.json + (commit "ed14e050b2b75e7f4ddb73d512fbe928bbdb2b85") + (revision "0") + (version (git-version "0.0.0" revision commit))) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/fastlmm/PySnpTools") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0hznpj15kx2sla16wlmcqz21n2vi2qb1493v30vz75hnm1m4iwm1")) + (modules '((guix build utils) + (ice-9 ftw))) + (snippet + #~(begin + ;; Delete everything except for examples directory: + (define (delete-except exceptions) + (lambda (file) + (unless (member file `("." ".." ,@exceptions)) + (delete-file-recursively file)))) + (for-each (delete-except '("pysnptools" "tests")) (scandir ".")) + (with-directory-excursion "pysnptools" + (for-each (delete-except '("examples")) (scandir "."))) + (with-directory-excursion "tests" + (for-each (delete-except '("datasets")) (scandir ".")))))))) + (define-public python-pysnptools (package (name "python-pysnptools") @@ -3724,12 +3767,39 @@ (define-public python-pysnptools (method url-fetch) (uri (pypi-uri "pysnptools" version)) (sha256 - (base32 - "1babnyky5fk93as1ybdvpz9x3x5099gkgscxflngzfswin23mspk")))) + (base32 "1babnyky5fk93as1ybdvpz9x3x5099gkgscxflngzfswin23mspk")))) (build-system pyproject-build-system) - ;; Tests require test data from python-bed-reader, which fetches data with - ;; python-pooch. - (arguments (list #:tests? #f)) + (arguments + (list + #:test-flags + #~(list + ;; These tests require the bgen feature and an additional input. + "--ignore" "pysnptools/distreader/bgen.py" + "--ignore" "pysnptools/distreader/test_bgen2.py" + "--ignore" "pysnptools/distreader/distreader.py" + "-k" "not pysnptools.distreader.distdata.DistData.val \ +and not pysnptools.distreader.disthdf5.DistHdf5.write \ +and not pysnptools.distreader.distmemmap.DistMemMap.write" + ;; These tests require network connection. + "--ignore" "pysnptools/util/_example_file.py" + "--ignore" "pysnptools/util/filecache/hashdown.py") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-data-path + (lambda _ + (substitute* "pysnptools/util/pysnptools.hashdown.json" + (("https://github\\.com/fastlmm/PySnpTools/\ +raw/ed14e050b2b75e7f4ddb73d512fbe928bbdb2b85") + (string-append "file://" #+pynsptools-examples-files))) + (substitute* "pysnptools/util/bgen.hashdown.json" + (("https://raw\\.githubusercontent\\.com\ +/fastlmm/bgen-sample-files/7b1bc74f58b326ca19606fa5f3c6093d48367993") + (string-append "file://" #+bgen-sample-files))))) + (add-after 'unpack 'loosen-requirements + (lambda _ + (substitute* "pyproject.toml" + (("(h5py|psutil|wheel)>=[0-9.]*" all target) + target))))))) (propagated-inputs (list python-bed-reader python-cloudpickle