From patchwork Tue Mar 9 14:15:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 27559 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 E591527BC51; Tue, 9 Mar 2021 14:24:02 +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 4675427BC50 for ; Tue, 9 Mar 2021 14:24:02 +0000 (GMT) Received: from localhost ([::1]:60466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJdHF-0008VM-Dt for patchwork@mira.cbaines.net; Tue, 09 Mar 2021 09:24:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJdCQ-00030K-PP for guix-patches@gnu.org; Tue, 09 Mar 2021 09:19:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34541) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJdCQ-0002LP-Fv for guix-patches@gnu.org; Tue, 09 Mar 2021 09:19:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lJdCQ-0005oR-Ck for guix-patches@gnu.org; Tue, 09 Mar 2021 09:19:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#47022] [PATCH 3/3] gnu: scikit-image: Enable tests. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 09 Mar 2021 14:19:02 +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.161529953922318 (code B ref 47022); Tue, 09 Mar 2021 14:19:02 +0000 Received: (at 47022) by debbugs.gnu.org; 9 Mar 2021 14:18:59 +0000 Received: from localhost ([127.0.0.1]:46082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJdCF-0005nd-BH for submit@debbugs.gnu.org; Tue, 09 Mar 2021 09:18:59 -0500 Received: from mout02.posteo.de ([185.67.36.66]:56019) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJdCC-0005ma-7W for 47022@debbugs.gnu.org; Tue, 09 Mar 2021 09:18:49 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 816A22400FE for <47022@debbugs.gnu.org>; Tue, 9 Mar 2021 15:18:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1615299521; bh=YJy8tmFkk2p7yODONa5Zq3oSY51xs/dQk0VzNvxFfxw=; h=From:To:Cc:Subject:Date:From; b=QgAKDsqNFpmXrNlbjHkXYX9F05nUyKlkOKkTxCieu+CqhJbrSOUTxVtsCRsng5iHo Tpxl76vR+Vt0WHTyZV78L/hrgeC13q4MP5KkhEfeB+FnRJ7/WbKorm8w0fIl2bSIQ5 R6W1U4+4UyWhlBOmgChcKIRNxsajN9j80VKjKtlhLGX3v1yV6N7qvqypDTkqudKqIT pzOuOReqP5PKJIXMvAOZ8PIZDJiuJdckBUlSQQUZ7sJYSEhtGev4Ua+mqiw4PKgE4L cofVeyuzLtG3gMKe1R20pvJhlANC/+Vw6xi7G0cXkIjppHfxJr3zzflPYRdIbSrN++ dpSJBGizrNLJA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Dvy4H3jQbz9rxQ; Tue, 9 Mar 2021 15:18:39 +0100 (CET) From: Vinicius Monego Date: Tue, 9 Mar 2021 11:15:55 -0300 Message-Id: <20210309141555.1892-2-monego@posteo.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210309141555.1892-1-monego@posteo.net> References: <20210309141555.1892-1-monego@posteo.net> 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 (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. --- 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