aboutsummaryrefslogtreecommitdiff
path: root/gn/packages
diff options
context:
space:
mode:
authorEfraim Flashner2021-05-24 17:28:05 +0300
committerEfraim Flashner2021-05-24 17:28:05 +0300
commit8d8ad7f84236afaf5ae1d4b4bd9d51489da65301 (patch)
tree9cf99c3be5e8a5724d5b539c7174bbf90766b89e /gn/packages
parent26807fb1fe7199fb8062cef339195c4f5e12f1de (diff)
downloadguix-bioinformatics-8d8ad7f84236afaf5ae1d4b4bd9d51489da65301.tar.gz
gn: visuals webservice proof-of-concept
Diffstat (limited to 'gn/packages')
-rw-r--r--gn/packages/julia.scm71
-rw-r--r--gn/packages/python.scm170
2 files changed, 241 insertions, 0 deletions
diff --git a/gn/packages/julia.scm b/gn/packages/julia.scm
index e2ac956..355a498 100644
--- a/gn/packages/julia.scm
+++ b/gn/packages/julia.scm
@@ -17,6 +17,77 @@
#:use-module (gnu packages video)
#:use-module (ice-9 match))
+(define-public julia-visuals
+ (let ((commit "e7d670eb045a9f8e3a839476dc166318da7fe9dc")
+ (revision "1"))
+ (package
+ (name "julia-visuals")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/sens/visuals")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "15hshm5qrig5qbj02xy4ji79kfc72n93nna5nvxkhvb8gw3vvx07"))))
+ (build-system julia-build-system)
+ (arguments
+ `(#:tests? #f ; no test suite
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-source
+ (lambda* (#:key inputs #:allow-other-keys)
+ (chmod "runpluto.sh" #o755) ; it starts as #o444
+ (substitute* "runpluto.sh"
+ ;(("julia")
+ ; (string-append (assoc-ref inputs "julia") "/bin/julia"))
+ ;(("basename")
+ ; (string-append (assoc-ref inputs "coreutils") "/bin/basename"))
+ ;; The arguments don't pass through the wrapper
+ (("\\$\\{1\\}") "4343")
+ )
+ #t))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (copy-recursively "." (assoc-ref outputs "out"))
+ #t))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (wrap-script (string-append out "/runpluto.sh")
+ `("PATH" ":" prefix (,(string-append (assoc-ref inputs "julia") "/bin")
+ ,(string-append (assoc-ref inputs "coreutils") "/bin")))
+ `("JULIA_LOAD_PATH" ":" prefix (,(getenv "JULIA_LOAD_PATH"))))
+ #t)))
+ (replace 'precompile
+ (lambda _
+ (invoke "julia" "-e" "\"import Pkg; Pkg.instantiate(); Pkg.status(); Pkg.precompile()\"")
+ #t))
+ )
+ ))
+ (propagated-inputs
+ `(
+ ("julia" ,(@ (gnu packages julia) julia))
+ ("julia-latexstrings" ,julia-latexstrings)
+ ("julia-optim" ,julia-optim)
+ ("julia-plots" ,julia-plots)
+ ("julia-pluto" ,julia-pluto)
+ ("julia-plutoui" ,julia-plutoui)
+ ;; Additional packages in generate.jl
+ ;("julia-markdown" ,julia-markdown)
+ ;("julia-interactiveutils" ,julia-interactiveutils)
+ ;("julia-distributions" ,julia-distributions)
+ ;; and from setup.py
+ ("python-jupyter-server-proxy" ,(@ (gn packages python) python-jupyter-server-proxy-1))
+ ))
+ (inputs
+ `(("guile" ,(@ (gnu packages guile) guile-3.0)))) ; for wrap-script
+ (home-page "https://github.com/senresearch/LiteQTL.jl")
+ (synopsis "Visualizations using Pluto.jl notebooks")
+ (description "Visualizations using Pluto.jl notebooks.")
+ (license #f))))
+
(define-public julia-liteqtl
(let ((commit "321a9e0aa87fb4524bec8278e64de76d1a4072b0")
(revision "1"))
diff --git a/gn/packages/python.scm b/gn/packages/python.scm
index bf22ead..2146931 100644
--- a/gn/packages/python.scm
+++ b/gn/packages/python.scm
@@ -9,6 +9,7 @@
#:use-module (gnu packages image)
#:use-module (gnu packages libffi)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages monitoring)
#:use-module (gnu packages pcre)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
@@ -1669,3 +1670,172 @@ sorted order.")
(sha256
(base32
"0l4fvm58fyz044hxpaw3a8w1nlki1n8iikrg9bdd7imz04kqd671"))))))
+
+(define-public python-jupyter-server-proxy
+ (package
+ (name "python-jupyter-server-proxy")
+ (version "3.0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "jupyter-server-proxy" version))
+ (sha256
+ (base32 "0vglj7v7wq73a9dya60q2vrxxpglg11w66l7crkzzrfpbblr814p"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-aiohttp" ,python-aiohttp)
+ ("python-jupyter-server" ,python-jupyter-server)
+ ("python-simpervisor" ,python-simpervisor)))
+ (home-page "https://jupyter-server-proxy.readthedocs.io/")
+ (synopsis "Jupyter server extension to supervise and proxy web services")
+ (description
+ "Jupyter Server Proxy lets you run arbitrary external processes (such as RStudio, Shiny Server, Syncthing, PostgreSQL, Code Server, etc) alongside your notebook server and provide authenticated web access to them using a path like @code{/rstudio} next to others like @code{/lab}. Alongside the python package that provides the main functionality, the JupyterLab extension (@code{@@jupyterlab/server-proxy}) provides buttons in the JupyterLab launcher window to get to RStudio for example.")
+ (license license:bsd-3)))
+
+(define-public python-jupyter-server-proxy-1
+ (package
+ (inherit python-jupyter-server-proxy)
+ (name "python-jupyter-server-proxy")
+ (version "1.6.0")
+ (source
+ (origin
+ ;(method url-fetch)
+ ;(uri (pypi-uri "jupyter-server-proxy" version))
+ ;(sha256
+ ; (base32 "0sdiywnymdqsmdddj1gszb8fj1z3p1njy419q0i921ib4rmdc22y"))))
+ ;; Tests not included in release.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jupyterhub/jupyter-server-proxy")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "03yry0jz6xlvy28h3w514pw0q9w51lnr1lpcigqmhnf5x7g9bfyy"))))
+ (arguments
+ `(#:tests? #f ; Running the test suite isn't fully documented.
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (setenv "JUPYTER_TOKEN" "secret")
+ (setenv "HOME" (getcwd))
+ (system "jupyter-notebook --config=./tests/resources/jupyter_server_config.py &")
+ (sleep 5)
+ (invoke "pytest" "--verbose"))
+ #t)))))
+ (propagated-inputs
+ `(("python-aiohttp" ,python-aiohttp)
+ ("python-notebook" ,python-notebook)
+ ("python-simpervisor" ,python-simpervisor)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))))
+
+(define-public python-simpervisor ; upstream ready
+ (package
+ (name "python-simpervisor")
+ (version "0.4")
+ (source
+ (origin
+ ;; Tests not included in release.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/yuvipanda/simpervisor")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1brsisx7saf4ic0dih1n5y7rbdbwn1ywv9pl32bch3061r46prvv"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f ; Test suite can't find aiohttp.
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "--maxfail" "3" "--verbose"))
+ #t)))))
+ (native-inputs
+ `(("python-aiohttp" ,python-aiohttp)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-asyncio" ,python-pytest-asyncio)))
+ (home-page "https://github.com/yuvipanda/simpervisor")
+ (synopsis "Simple async process supervisor")
+ (description
+ "This package provides a simple async process supervisor in Python.")
+ (license license:bsd-3)))
+
+(define-public python-jupyter-server
+ (package
+ (name "python-jupyter-server")
+ (version "1.8.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "jupyter-server" version))
+ (sha256
+ (base32
+ "0dqj51fj5ikklbl0gnb939pp80ngnzml5932mljn2lvplph7a34g"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-anyio" ,python-anyio)
+ ("python-argon2-cffi" ,python-argon2-cffi)
+ ("python-ipython-genutils" ,python-ipython-genutils)
+ ("python-jinja2" ,python-jinja2)
+ ("python-jupyter-client" ,python-jupyter-client)
+ ("python-jupyter-core" ,python-jupyter-core)
+ ("python-nbconvert" ,python-nbconvert)
+ ("python-nbformat" ,python-nbformat)
+ ("python-prometheus-client" ,python-prometheus-client)
+ ("python-pyzmq" ,python-pyzmq)
+ ("python-send2trash" ,python-send2trash)
+ ("python-terminado" ,python-terminado)
+ ("python-tornado" ,python-tornado)
+ ("python-traitlets" ,python-traitlets)
+ ("python-websocket-client" ,python-websocket-client)))
+ (native-inputs
+ `(("python-coverage" ,python-coverage)
+ ("python-ipykernel" ,python-ipykernel)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-console-scripts" ,python-pytest-console-scripts)
+ ("python-pytest-cov" ,python-pytest-cov)
+ ("python-pytest-mock" ,python-pytest-mock)
+ ("python-pytest-tornasync" ,python-pytest-tornasync)
+ ("python-requests" ,python-requests)))
+ (home-page "https://jupyter.org")
+ (synopsis
+ "The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications.")
+ (description
+ "The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications.")
+ (license #f)))
+
+(define-public python-anyio
+ (package
+ (name "python-anyio")
+ (version "3.1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "anyio" version))
+ (sha256
+ (base32 "03mdklsgm4ik7hqr0lnc7k085as4vib27hclsrcdh0yhm48hgqj3"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-idna" ,python-idna)
+ ("python-sniffio" ,python-sniffio)))
+ (native-inputs
+ `(("python-coverage" ,python-coverage)
+ ("python-hypothesis" ,python-hypothesis)
+ ("python-mock" ,python-mock)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-mock" ,python-pytest-mock)
+ ("python-trustme" ,python-trustme)
+ ("python-uvloop" ,python-uvloop)))
+ (home-page "")
+ (synopsis
+ "High level compatibility layer for multiple asynchronous event loop implementations")
+ (description
+ "High level compatibility layer for multiple asynchronous event loop implementations")
+ (license license:expat)))