diff mbox series

[bug#63619,6/9] gnu: Add python-arviz.

Message ID 20230520231241.962799-6-monego@posteo.net
State New
Headers show
Series Add PyMC. | expand

Commit Message

Vinicius Monego May 20, 2023, 11:12 p.m. UTC
* gnu/packages/statistics.scm (python-arviz): New variable.
---
 gnu/packages/statistics.scm | 41 +++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 574790731e..c39cf9c0ac 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -2151,6 +2151,47 @@  (define-public python-hdmedians
 machine learning, computer vision, and high-dimensional statistics.")
     (license license:asl2.0)))
 
+(define-public python-arviz
+  (package
+    (name "python-arviz")
+    (version "0.15.1")
+    (source (origin
+              (method git-fetch)        ; PyPI misses some test files
+              (uri (git-reference
+                    (url "https://github.com/arviz-devs/arviz")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0nqr4v927r9kc50z7rwlk2m8nw3dnnmmwmwcfijzd93gbg53wc4f"))))
+    (build-system pyproject-build-system)
+    (arguments
+     ;; FIXME: matplotlib tests fail because of the "--save" test flag.
+     (list #:test-flags #~'("--ignore"
+                            "arviz/tests/base_tests/test_plots_matplotlib.py")
+           #:phases #~(modify-phases %standard-phases
+                        (add-before 'check 'write-permission
+                          (lambda _
+                            ;; 3 tests require write permission.
+                            (setenv "HOME" "/tmp"))))))
+    (native-inputs (list python-cloudpickle python-pytest))
+    (propagated-inputs (list python-h5netcdf
+                             python-matplotlib
+                             python-numpy
+                             python-packaging
+                             python-pandas
+                             python-scipy
+                             python-typing-extensions
+                             python-xarray
+                             python-xarray-einstats))
+    (home-page "https://github.com/arviz-devs/arviz")
+    (synopsis "Exploratory analysis of Bayesian models")
+    (description
+     "ArviZ is a Python package for exploratory analysis of Bayesian models.
+It includes functions for posterior analysis, data storage, model checking,
+comparison and diagnostics.")
+    (license license:asl2.0)))
+
 (define-public python-patsy
   (package
     (name "python-patsy")