rekado pushed a commit to branch master
in repository guix.

commit 4e50474ff49dcfebc4b5430011897166f676ee44
Author: Jonas Freimuth <[email protected]>
AuthorDate: Sat Jan 11 20:11:02 2025 +0000

    gnu: Add python-radian.
    
    * gnu/packages/statistics.scm (python-radian): New variable.
    
    Change-Id: Ibb4c642387591c14a0744cc52c57dbafa2f7f015
    Signed-off-by: Ricardo Wurmus <[email protected]>
---
 gnu/packages/statistics.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 6861cf417b..d6ad9fdff9 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -103,6 +103,7 @@
   #:use-module (gnu packages swig)
   #:use-module (gnu packages tbb)
   #:use-module (gnu packages tcl)
+  #:use-module (gnu packages terminals)
   #:use-module (gnu packages tex)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages time)
@@ -7186,6 +7187,56 @@ functions.")
 main use is as the driver for radian, the R console.")
     (license license:expat)))
 
+(define-public python-radian
+  (package
+    (name "python-radian")
+    (version "0.6.13")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/randy3k/radian";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0nnwgvifhsxdac7rr9d2zspc97xx0vyzxn1v9g4bnm9061rragc3"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (add-before 'check 'set-home
+                     (lambda _
+                       ;; During tests radian wants to write history files to
+                       ;; $HOME which causes tests to fail when that does not
+                       ;; exist. Test fails then look like
+                       ;; "Exception: value is " with the value being empty.
+                       (setenv "HOME" "/tmp"))))))
+    (propagated-inputs (list python-prompt-toolkit python-pygments
+                             python-rchitect))
+    (native-inputs (list python-coverage
+                         python-pexpect
+                         python-ptyprocess
+                         python-pyte
+                         python-pytest
+                         python-setuptools
+                         python-wheel
+                         ;; Needed afaict only for
+                         ;; `tests/test_reticulate.py::test_completion`.
+                         python-jedi
+                         ;; R dependencies needed only for testing.
+                         r-askpass
+                         r-minimal
+                         r-reticulate
+                         ;; Needed for sh tests.
+                         git-minimal))
+    (home-page "https://github.com/randy3k/radian";)
+    (synopsis "R console")
+    (description
+     "Radian is an alternative console for the R program with multiline
+editing and rich syntax highlight.  One would consider Radian as a IPython
+clone for R, though its design is more aligned to Julia.")
+    (license license:expat)))
+
 (define-public java-jdistlib
   (package
     (name "java-jdistlib")

Reply via email to