(address . guix-patches@gnu.org)
Hi,
this patch series adds Jupyter’s JupyterLab, which is the new frontend for
Jupyter Notebooks. The software works fine, but there are a few caveats
1) it comes with bundled pre-compiled JavaScript, which cannot be removed until
we have proper support for importing from NPM
2) it contains an extension manager, that downloads arbitrary packages from NPM
(`jupyter lab build`). This works, but is less than optimal imo. We should
figure out how to package extensions in guix.
3) also it is required to install the package `jupyter`, otherwise installed
kernels cannot be found and the `jupyter` command does not work.
Cheers,
Lars
From 4a5862e2add1d537770a5ea466dbb8a4851afad9 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <ldb@leibniz-psychology.org>
Date: Fri, 7 Feb 2020 08:38:32 +0100
Subject: [PATCH 1/5] gnu: Add package python-pytest-check-links
* gnu/packages/python-xyz.scm (python-pytest-check-links): New variable.
---
gnu/packages/python-xyz.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
Toggle diff (38 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 84b70954bd..902ca5030b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17570,3 +17570,31 @@ sequences.")
(define-public python2-fuzzywuzzy
(package-with-python2 python-fuzzywuzzy))
+
+(define-public python-pytest-check-links
+ (package
+ (name "python-pytest-check-links")
+ (version "0.3.0")
+ (source
+ (origin
+ (method url-fetch)
+ ;; URI uses underscores
+ (uri (pypi-uri "pytest_check_links" version))
+ (sha256
+ (base32
+ "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-docutils" ,python-docutils)
+ ("python-html5lib" ,python-html5lib)
+ ("python-nbconvert" ,python-nbconvert)
+ ("python-nbformat" ,python-nbformat)
+ ("python-pytest" ,python-pytest)
+ ("python-six" ,python-six)))
+ (native-inputs
+ `(("python-pbr-minimal" ,python-pbr-minimal)))
+ (home-page
+ "https://github.com/minrk/pytest-check-links")
+ (synopsis "Check links in files")
+ (description "Plugin for pytest that checks URLs for HTML-containing files")
+ (license license:bsd-3)))
--
2.20.1
From 690d45cba7d1a21fa6ae97fbe4fec6e1abae3635 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <ldb@leibniz-psychology.org>
Date: Fri, 7 Feb 2020 08:39:55 +0100
Subject: [PATCH 2/5] gnu: Add package python-json5
* gnu/packages/python-xyz.scm (python-json5): New variable.
---
gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
Toggle diff (34 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 902ca5030b..ad1cd5fbd4 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17598,3 +17598,27 @@ sequences.")
(synopsis "Check links in files")
(description "Plugin for pytest that checks URLs for HTML-containing files")
(license license:bsd-3)))
+
+(define-public python-json5
+ (package
+ (name "python-json5")
+ (version "0.8.5")
+ (source
+ (origin
+ ;; sample.json5 is missing from PyPi source tarball
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dpranke/pyjson5.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/dpranke/pyjson5")
+ (synopsis
+ "Python implementation of the JSON5 data format")
+ (description
+ "JSON5 extends the JSON data interchange format to make it slightly more
+usable as a configuration language. This Python package implements parsing and
+dumping of JSON5 data structures.")
+ (license license:asl2.0)))
--
2.20.1
From a4535f6002a618444171d5a92146fb7a7e7e8243 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <ldb@leibniz-psychology.org>
Date: Fri, 7 Feb 2020 08:40:41 +0100
Subject: [PATCH 3/5] gnu: Add package python-jupyterlab-server
* gnu/packages/python-xyz.scm (python-jupyterlab-server): New variable.
---
gnu/packages/python-xyz.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
Toggle diff (44 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ad1cd5fbd4..92ee53fe6f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17622,3 +17622,37 @@ sequences.")
usable as a configuration language. This Python package implements parsing and
dumping of JSON5 data structures.")
(license license:asl2.0)))
+
+(define-public python-jupyterlab-server
+ (package
+ (name "python-jupyterlab-server")
+ (version "1.0.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "jupyterlab_server" version))
+ (sha256
+ (base32
+ "1bax8iqwcc5p02h5ysdc48zvx7ll5jfzfsybhb3lfvyfpwkpb5yh"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-jinja2" ,python-jinja2)
+ ("python-json5" ,python-json5)
+ ("python-jsonschema" ,python-jsonschema)
+ ("python-notebook" ,python-notebook)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)
+ ("python-requests" ,python-requests)
+ ("python-ipykernel" ,python-ipykernel)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; python setup.py test does not invoke pytest?
+ (replace 'check
+ (lambda _
+ (invoke "pytest" "-vv"))))))
+ (home-page "https://jupyter.org")
+ (synopsis "JupyterLab Server")
+ (description "A set of server components for JupyterLab and JupyterLab like
+applications")
+ (license license:bsd-3)))
--
2.20.1