diff mbox series

[bug#64258,1/2] gnu: Add python-daft.

Message ID f0de7856fd062eb3854607d9305fce8a504008a3.1687554529.git.felgru@posteo.net
State New
Headers show
Series Add pgmpy library for Bayesian Networks. | expand

Commit Message

Felix Gruber June 23, 2023, 9:12 p.m. UTC
* gnu/packages/python-xyz.scm (python-daft): New variable.
---
 gnu/packages/python-xyz.scm | 49 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 48 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b650b71f3b..7ccf2d352b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -108,7 +108,7 @@ 
 ;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
 ;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
 ;;; Copyright © 2021, 2022 Pradana Aumars <paumars@courrier.dev>
-;;; Copyright © 2021, 2022 Felix Gruber <felgru@posteo.net>
+;;; Copyright © 2021, 2022, 2023 Felix Gruber <felgru@posteo.net>
 ;;; Copyright © 2021 Sébastien Lerique <sl@eauchat.org>
 ;;; Copyright © 2021 Raphaël Mélotte <raphael.melotte@mind.be>
 ;;; Copyright © 2021 ZmnSCPxj <ZmnSCPxj@protonmail.com>
@@ -3962,6 +3962,53 @@  (define-public python-pomegranate
 Cython for speed.")
     (license license:expat)))
 
+(define-public python-daft
+  (package
+    (name "python-daft")
+    (version "0.1.2")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "daft" version))
+              (sha256
+               (base32
+                "1r8jsfavd624q2q61f863lk6has6mv5csswh39saafd5khwf0xry"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:test-flags
+      '(list "-k"
+             (string-append
+               ;; The following tests compare matplotlib output with
+               ;; previously generated images.  They fail due to minor
+               ;; differences in where matplotlib places labels.
+               "not test_bca[png]"
+               " and not test_classic[png]"
+               " and not test_deconvolution[png]"
+               " and not test_exoplanets[png]"
+               " and not test_fixed[png]"
+               " and not test_gaia[png]"
+               " and not test_galex[png]"
+               " and not test_huey_p_newton[png]"
+               " and not test_logo[png]"
+               " and not test_no_circles[png]"
+               " and not test_no_gray[png]"
+               " and not test_recursive[png]"
+               " and not test_thick_lines[png]"
+               " and not test_weaklensing[png]"
+               " and not test_wordy[png]"))))
+    (propagated-inputs (list python-matplotlib python-numpy))
+    (native-inputs (list python-pytest))
+    (home-page "http://daft-pgm.org")
+    (synopsis "PGM rendering library")
+    (description "Daft is a Python package that uses matplotlib to
+render pixel-perfect probabilistic graphical models for publication in
+a journal or on the internet. With a short Python script and an
+intuitive model-building syntax you can design directed (Bayesian
+Networks, directed acyclic graphs) and undirected (Markov random fields)
+models and save them in any formats that matplotlib supports (including
+PDF, PNG, EPS and SVG).")
+    (license license:expat)))
+
 (define-public python-portalocker
   (package
     (name "python-portalocker")