~ruther/guix-local

f5888342ab8015618259f22bea47b4bb5e42c146 — Ricardo Wurmus 2 years ago 5748c80
gnu: Add python-pytest-jupyter.

* gnu/packages/jupyter.scm (python-pytest-jupyter): New variable.

Change-Id: Id8d59a3981c5c46adbfee7d369692cba32e27d70
1 files changed, 47 insertions(+), 1 deletions(-)

M gnu/packages/jupyter.scm
M gnu/packages/jupyter.scm => gnu/packages/jupyter.scm +47 -1
@@ 1,6 1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019, 2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2021, 2022, 2023 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021-2024 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>


@@ 169,6 169,52 @@ tests kernels for successful code execution and conformance with the
Messaging Protocol}.")
    (license license:bsd-3)))

(define-public python-pytest-jupyter
  (package
    (name "python-pytest-jupyter")
    (version "0.10.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pytest_jupyter" version))
       (sha256
        (base32 "114y9py29j6p2iymhc3vj55x65gg1ncbhwal5mads0g2z7p59pq0"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:test-flags
      ;; This requires python-jupyter-server, which itself requires this
      ;; package.
      '(list "--ignore=tests/test_jupyter_server.py")
      #:phases
      '(modify-phases %standard-phases
         ;; The jupyter_server tests requires python-jupyter-server, which
         ;; itself requires this package.
         (add-after 'unpack 'disable-tests
           (lambda _
             (substitute* "tests/conftest.py"
               (("\"pytest_jupyter.jupyter_server\",") ""))))
         ;; Some tests require a writable HOME
         (add-before 'check 'set-HOME
           (lambda _ (setenv "HOME" "/tmp")))
         (add-after 'unpack 'ignore-deprecation-warnings
           (lambda _
             (substitute* "pyproject.toml"
               (("  \"module:datetime.*" m)
                (string-append m "\n\"ignore:zmq.eventloop.ioloop is deprecated:DeprecationWarning\","))))))))
    (propagated-inputs (list python-jupyter-core python-nbformat))
    (native-inputs (list python-hatchling
                         python-ipykernel
                         python-pytest
                         python-pytest-timeout
                         python-tornado-6))
    (home-page "https://jupyter.org")
    (synopsis "Pytest plugin for testing Jupyter libraries and extensions.")
    (description
     "This package provides a pytest plugin for testing Jupyter libraries and
extensions.")
    (license license:bsd-4)))

(define-public xeus
  (package
    (name "xeus")