unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#42564] [PATCH] gnu: Add python-nbval.
@ 2020-07-27 20:42 Vinicius Monego
  2020-07-29  5:17 ` bug#42564: " Oleg Pykhalov
  0 siblings, 1 reply; 2+ messages in thread
From: Vinicius Monego @ 2020-07-27 20:42 UTC (permalink / raw)
  To: 42564; +Cc: Vinicius Monego

* gnu/packages/python-check.scm (python-nbval): New variable.
---
 gnu/packages/python-check.scm | 47 +++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index e96ce9e666..cf765e8106 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -650,6 +650,53 @@ service processes for your tests with pytest.")
     (description "This package provides a pytest plugin for aiohttp support.")
     (license license:asl2.0)))
 
+(define-public python-nbval
+  (package
+    (name "python-nbval")
+    (version "0.9.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "nbval" version))
+       (sha256
+        (base32 "1xh2p7g5s5g06caaraf3dsz69bpj7dgw2h3ss67kci789aspnwp8"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'fix-test
+           (lambda _
+             ;; This test fails because of a mismatch in the output of LaTeX
+             ;; equation environments.  Seems OK to skip.
+             (delete-file "tests/ipynb-test-samples/test-latex-pass-correctouput.ipynb")
+             #t))
+         (replace 'check
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (add-installed-pythonpath inputs outputs)
+             (invoke "pytest" "-vv" "-k"
+                     (string-append
+                     ;; This only works with Pytest < 5.
+                      "not nbdime_reporter"
+                     ;; https://github.com/computationalmodelling/nbval/pull/148.
+                      " and not test_timeouts")))))))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-pytest-cov" ,python-pytest-cov)
+       ("python-sympy" ,python-sympy)))
+    (propagated-inputs
+     `(("python-ipykernel" ,python-ipykernel)
+       ("python-jupyter-client" ,python-jupyter-client)
+       ("python-nbformat" ,python-nbformat)
+       ("python-six" ,python-six)))
+    (home-page "https://github.com/computationalmodelling/nbval")
+    (synopsis "Pytest plugin to validate Jupyter notebooks")
+    (description
+     "This plugin adds functionality to Pytest to recognise and collect Jupyter
+notebooks.  The intended purpose of the tests is to determine whether execution
+of the stored inputs match the stored outputs of the @file{.ipynb} file.  Whilst
+also ensuring that the notebooks are running without errors.")
+    (license license:bsd-3)))
+
 (define-public python-pytest-flask
   (package
     (name "python-pytest-flask")
-- 
2.20.1





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#42564: [PATCH] gnu: Add python-nbval.
  2020-07-27 20:42 [bug#42564] [PATCH] gnu: Add python-nbval Vinicius Monego
@ 2020-07-29  5:17 ` Oleg Pykhalov
  0 siblings, 0 replies; 2+ messages in thread
From: Oleg Pykhalov @ 2020-07-29  5:17 UTC (permalink / raw)
  To: Vinicius Monego; +Cc: 42564-done

[-- Attachment #1: Type: text/plain, Size: 556 bytes --]

Hi,

Vinicius Monego <monego@posteo.net> writes:

> * gnu/packages/python-check.scm (python-nbval): New variable.
> ---
>  gnu/packages/python-check.scm | 47 +++++++++++++++++++++++++++++++++++
>  1 file changed, 47 insertions(+)
>
> diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
> index e96ce9e666..cf765e8106 100644
> --- a/gnu/packages/python-check.scm
> +++ b/gnu/packages/python-check.scm
> @@ -650,6 +650,53 @@ service processes for your tests with pytest.")

[…]

Pushed to master.

Thanks,
Oleg.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-29  5:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 20:42 [bug#42564] [PATCH] gnu: Add python-nbval Vinicius Monego
2020-07-29  5:17 ` bug#42564: " Oleg Pykhalov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).