From patchwork Tue Apr 20 09:49:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lars-Dominik Braun X-Patchwork-Id: 28712 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 8461827BC79; Tue, 20 Apr 2021 10:50:15 +0100 (BST) 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_H4,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 89EFA27BC77 for ; Tue, 20 Apr 2021 10:50:11 +0100 (BST) Received: from localhost ([::1]:37392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYn1G-00076M-QO for patchwork@mira.cbaines.net; Tue, 20 Apr 2021 05:50:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYn18-00076B-Tv for guix-patches@gnu.org; Tue, 20 Apr 2021 05:50:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41459) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYn18-0000qD-EY for guix-patches@gnu.org; Tue, 20 Apr 2021 05:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lYn18-0005rI-C1 for guix-patches@gnu.org; Tue, 20 Apr 2021 05:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47907] [PATCHES] Jupyter Notebook: Enable tests. Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 20 Apr 2021 09:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47907 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47907@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161891218322487 (code B ref -1); Tue, 20 Apr 2021 09:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Apr 2021 09:49:43 +0000 Received: from localhost ([127.0.0.1]:53005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYn0d-0005qQ-M4 for submit@debbugs.gnu.org; Tue, 20 Apr 2021 05:49:43 -0400 Received: from lists.gnu.org ([209.51.188.17]:39000) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYn0Z-0005qB-3N for submit@debbugs.gnu.org; Tue, 20 Apr 2021 05:49:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYn0Y-00074M-Rx for guix-patches@gnu.org; Tue, 20 Apr 2021 05:49:26 -0400 Received: from mout-p-201.mailbox.org ([2001:67c:2050::465:201]:29918) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1lYn0S-0000M3-J2 for guix-patches@gnu.org; Tue, 20 Apr 2021 05:49:26 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (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 4FPf5t74jZzQk2Z for ; Tue, 20 Apr 2021 11:49:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1618912144; 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=eIfcbFULilkkjfM2YKa6QIvdoD0I4REsGzOoPVI9fqw=; b=MLoDbdcnC0EGdfbhtcrLES3vuL8EmbWTz3vUSeL0zkyOcNS/Gghog2YDbjTB+N/F/AngyL mK5+pZ/pmDi8KB4CbmgXQcOaU6e3u0Aj8UdRGOI4MfJGmJT+2PCkVFVfSaM2/j9BagsEri GMO51wM5W/eMFM/N1zxma/85Ud1hDtE0CpU+lfaDn/F2PNTy/t0dAQld1zd9lsDi40diqK +g0nKY4WORmfO16inFtm1VkdlTMdynNX9ordyJ4VfbizxzWAWIoAyplbHYZvCxxSQaQPeg GrKLDAQhjS8ExSy/jEISN6r/R5/Jl2om07/StWduR9XwxK4MzJW7G/g1zMrIAw== Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id 2OfO-mUsORAk for ; Tue, 20 Apr 2021 11:49:02 +0200 (CEST) Date: Tue, 20 Apr 2021 11:49:00 +0200 From: Lars-Dominik Braun Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-MBO-SPAM-Probability: X-Rspamd-Score: -6.94 / 15.00 / 15.00 X-Rspamd-Queue-Id: 8CB781888 X-Rspamd-UID: a87d15 Received-SPF: pass client-ip=2001:67c:2050::465:201; envelope-from=lars@6xq.net; helo=mout-p-201.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 Hi, this patch series is mostly a QA patchset and enables tests on most of Jupyter Notebook’s components. There are also two possibly controversial changes: - It moves the definition of JUPYTER_PATH to jupyter-core. I’d argue this is the more correct approach, because that package actually deals with this search path and installing any Jupyter package makes it work out of the box without installing the strange jupyter meta-package. - It enables pandoc/LaTeX for nbconvert. The Notebook lists PDF output in its “Export as” menu and I feel both are useful, even though they increase the closure. You can also pull the patchset here: https://github.com/PromyLOPh/guix/tree/work-merge-jupyter Cheers, Lars Lars-Dominik Braun (12): gnu: Move search path JUPYTER_PATH. gnu: python-jupyter-core: Enable tests. gnu: Add python-json-spec. gnu: Add python-fastjsonschema. gnu: python-nbformat: Enable tests. gnu: Add python-jupyter-client-bootstrap. gnu: Add python-ipykernel-bootstrap. gnu: python-jupyter-client: Enable tests. gnu: python-ipykernel: Add missing inputs. gnu: Add python-pytest-dependency. gnu: python-nbconvert: Enable more tests. gnu: python-notebook: Fix tests. gnu/packages/check.scm | 23 +++ gnu/packages/python-xyz.scm | 281 ++++++++++++++++++++++++++++++------ 2 files changed, 256 insertions(+), 48 deletions(-) From 936b8ad14e8d1ef1b5939a42c5ed8f2b44abd1f1 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 20 Apr 2021 09:51:25 +0200 Subject: [PATCH 08/12] gnu: python-jupyter-client: Enable tests. * gnu/packages/python-xyz.scm (python-jupyter-client) [arguments]: Enable tests. Run pytest during 'check. [native-inputs]: Add missing test inputs. --- gnu/packages/python-xyz.scm | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 83d1b956ca..62c61e1c21 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -7437,19 +7437,23 @@ without using the configuration machinery.") (base32 "10p7fcgvv9hvz9zical9wk68ks5ssak2ykbzx65wm1k1hk8a3g64")))) (build-system python-build-system) - ;; Tests fail because of missing native python kernel which I assume is - ;; provided by the ipython package, which we cannot use because it would - ;; cause a dependency cycle. (arguments - `(#:tests? #f - #:phases (modify-phases %standard-phases - (add-after 'unpack 'set-tool-file-names - (lambda* (#:key inputs #:allow-other-keys) - (let ((iproute (assoc-ref inputs "iproute"))) - (substitute* "jupyter_client/localinterfaces.py" - (("'ip'") - (string-append "'" iproute "/sbin/ip'"))) - #t)))))) + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'set-tool-file-names + (lambda* (#:key inputs #:allow-other-keys) + (let ((iproute (assoc-ref inputs "iproute"))) + (substitute* "jupyter_client/localinterfaces.py" + (("'ip'") + (string-append "'" iproute "/sbin/ip'"))) + #t))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (begin + ;; Some tests try to write to $HOME. + (setenv "HOME" "/tmp") + (invoke "pytest" "-vv")))))))) (inputs `(("iproute" ,iproute))) (propagated-inputs @@ -7459,7 +7463,14 @@ without using the configuration machinery.") ("python-tornado" ,python-tornado-6) ("python-traitlets" ,python-traitlets))) (native-inputs - `(("python-pytest" ,python-pytest))) + `(("python-pytest" ,python-pytest) + ("python-pytest-asyncio" ,python-pytest-asyncio) + ("python-pytest-timeout" ,python-pytest-timeout) + ("python-async-generator" ,python-async-generator) + ("python-mock" ,python-mock) + ("python-msgpack" ,python-msgpack) + ("python-ipython" ,python-ipython) + ("python-ipykernel" ,python-ipykernel-bootstrap))) (home-page "https://jupyter.org/") (synopsis "Jupyter protocol implementation and client libraries") (description -- 2.26.3