Archived
1
0
Fork 0

gnu: python-nbformat: Enable tests.

* gnu/packages/python-xyz.scm (python-nbformat) [source]: Use git
repository, which has more complete test data.
[arguments]: Run pytest during 'check.
[native-inputs]: Add dependencies required to do that.
This commit is contained in:
Lars-Dominik Braun 2021-04-20 09:15:42 +02:00
parent 2bcaf11d7c
commit 7f06ab7fc0
No known key found for this signature in database
GPG key ID: F663943E08D8092A

View file

@ -10415,21 +10415,35 @@ drafts 04, 06 and 07.")
(package (package
(name "python-nbformat") (name "python-nbformat")
(version "5.1.3") (version "5.1.3")
(source ;; The PyPi release tarball lacks some test cases and test data.
(origin (source (origin
(method url-fetch) (method git-fetch)
(uri (pypi-uri "nbformat" version)) (uri (git-reference
(url "https://github.com/jupyter/nbformat.git")
(commit version)))
(sha256 (sha256
(base32 (base32
"1j6idwsw59cslsssvlkg2bkfpvd6ri7kghbp14jwcw87sy57h5mm")))) "033v16cfmxzh3jn5phnil4p3silr49iwh9wiigzhv0crc6sanvwz"))
(file-name (git-file-name name version))))
(build-system python-build-system) (build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
(when tests?
(invoke "pytest" "-vv")))))))
(propagated-inputs (propagated-inputs
`(("python-ipython-genutils" ,python-ipython-genutils) `(("python-ipython-genutils" ,python-ipython-genutils)
("python-jsonschema" ,python-jsonschema) ("python-jsonschema" ,python-jsonschema)
("python-jupyter-core" ,python-jupyter-core) ("python-jupyter-core" ,python-jupyter-core)
("python-traitlets" ,python-traitlets))) ("python-traitlets" ,python-traitlets)))
(native-inputs (native-inputs
`(("python-pytest" ,python-pytest))) `(("python-pytest" ,python-pytest)
("python-fastjsonschema" ,python-fastjsonschema) ; This is only active
; when setting NBFORMAT_VALIDATOR="fastjsonschema", so include it for
; testing only.
("python-testpath" ,python-testpath)))
(home-page "https://jupyter.org") (home-page "https://jupyter.org")
(synopsis "Jupyter Notebook format") (synopsis "Jupyter Notebook format")
(description "This package provides the reference implementation of the (description "This package provides the reference implementation of the