From patchwork Tue Mar 9 15:51:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 27562 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 E896827BC51; Tue, 9 Mar 2021 16:37:44 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 616C127BC50 for ; Tue, 9 Mar 2021 16:37:44 +0000 (GMT) Received: from localhost ([::1]:34146 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJfMd-0005Tu-Gx for patchwork@mira.cbaines.net; Tue, 09 Mar 2021 11:37:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJefO-0004Pe-77 for guix-patches@gnu.org; Tue, 09 Mar 2021 10:53:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:36201) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJefN-0001A3-TG for guix-patches@gnu.org; Tue, 09 Mar 2021 10:53:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lJefN-00009d-QH for guix-patches@gnu.org; Tue, 09 Mar 2021 10:53:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#47022] [PATCH v2 3/3] gnu: python-scikit-image: Enable tests. References: <20210309141209.1651-1-monego@posteo.net> In-Reply-To: <20210309141209.1651-1-monego@posteo.net> Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 09 Mar 2021 15:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47022 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47022@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 47022-submit@debbugs.gnu.org id=B47022.1615305126532 (code B ref 47022); Tue, 09 Mar 2021 15:53:01 +0000 Received: (at 47022) by debbugs.gnu.org; 9 Mar 2021 15:52:06 +0000 Received: from localhost ([127.0.0.1]:47747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJeeT-00008W-MR for submit@debbugs.gnu.org; Tue, 09 Mar 2021 10:52:05 -0500 Received: from mout01.posteo.de ([185.67.36.65]:60739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJeeR-00007l-Ne for 47022@debbugs.gnu.org; Tue, 09 Mar 2021 10:52:04 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id EE88C160061 for <47022@debbugs.gnu.org>; Tue, 9 Mar 2021 16:51:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1615305117; bh=lOqaWSlh0493vUKiSTjItH1i5UKZZN7oTjA4eavjpBM=; h=From:To:Cc:Subject:Date:From; b=S79kBoqGgppTlmf85BmLquVQ7+peMHeRXxFhDDsCuKsm/TK49M6RTV7HWKAs1BNYk 7fjT9RG+Wp9CXYx5FM1oB1GS9un1sOs/Kd56UfEncxbhKqcmdCrpz1aRetPnOG2i6I OkDMYKzYDHlG6v+khdikEhmgLpxYCMG50jc9eGq+iVf2+SWT0v7uUYtjCm63wfBuhg hj4RbkL4Z4xXta/VCKJVximSQ9TZiOVwYD5FzMPR/lTXxt/ZkKD6oe8Q/SBcaPKd0s 1iqjJZxqhspfyBcgsB2dC/KX1nY8NoueWMP1pfLzywFp6wqk1YE/zdgoJUbYE+JEkn 35oztwVPpZRZA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Dw07s50R0z6tm8; Tue, 9 Mar 2021 16:51:53 +0100 (CET) From: Vinicius Monego Date: Tue, 9 Mar 2021 12:51:14 -0300 Message-Id: <20210309155114.5517-1-monego@posteo.net> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-science.scm (python-scikit-image)[arguments]: Add phases related to tests. [native-inputs]: Add python-codecov, python-flake8, python-pytest, python-pytest-cov, python-pytest-localserver, python-wheel. --- Same patch, only changed commit message. gnu/packages/python-science.scm | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 250ab4a192..552c4c50cd 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -36,6 +36,8 @@ #:use-module (gnu packages maths) #:use-module (gnu packages perl) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) + #:use-module (gnu packages python-check) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages sphinx) @@ -249,9 +251,25 @@ logic, also known as grey logic.") (base32 "0wgisa03smhrphcjnhq7waa5vyyd32b67hblapjbqrqqj751idpv")))) (build-system python-build-system) (arguments - ;; TODO: Some tests require running X11 server. Disable them? - '(#:tests? #f)) + `(#:phases + (modify-phases %standard-phases + (add-before 'build 'change-home-dir + (lambda _ + ;; Change from /homeless-shelter to /tmp for write permission. + (setenv "HOME" "/tmp") + #t)) + (replace 'build + (lambda _ + (invoke "make"))) + (replace 'check + (lambda _ + ;; The following tests require online data. + (invoke "python" "-m" "pytest" "skimage" "--doctest-modules" "-k" + (string-append "not test_ndim" + " and not test_skin"))))))) ;; See requirements/ for the list of build and run time requirements. + ;; NOTE: scikit-image has an optional dependency on python-pooch, however + ;; propagating it would enable many more tests that require online data. (propagated-inputs `(("python-cloudpickle" ,python-cloudpickle) ("python-dask" ,python-dask) @@ -264,7 +282,13 @@ logic, also known as grey logic.") ("python-scipy" ,python-scipy) ("python-tifffile" ,python-tifffile))) (native-inputs - `(("python-cython" ,python-cython))) + `(("python-codecov" ,python-codecov) + ("python-cython" ,python-cython) + ("python-flake8" ,python-flake8) + ("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-localserver" ,python-pytest-localserver) + ("python-wheel" ,python-wheel))) (home-page "https://scikit-image.org/") (synopsis "Image processing in Python") (description