GNU bug report logs - #67643
[PATCH 0/2] Add python-bambi.

Previous Next

Package: guix-patches;

Reported by: Vinicius Monego <monego <at> posteo.net>

Date: Tue, 5 Dec 2023 15:29:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 67643 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#67643; Package guix-patches. (Tue, 05 Dec 2023 15:29:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vinicius Monego <monego <at> posteo.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 05 Dec 2023 15:29:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH 0/2] Add python-bambi.
Date: Tue,  5 Dec 2023 15:28:01 +0000
Bambi is a high-level Bayesian model-building interface for PyMC.

Vinicius Monego (2):
  gnu: Add python-formulae.
  gnu: Add python-bambi.

 gnu/packages/statistics.scm | 107 +++++++++++++++++++++++++++++++++---
 1 file changed, 100 insertions(+), 7 deletions(-)


base-commit: c15a1cd88f80a90437f4b0159f22dfc84b9e6851
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#67643; Package guix-patches. (Tue, 05 Dec 2023 15:31:02 GMT) Full text and rfc822 format available.

Message #8 received at 67643 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: 67643 <at> debbugs.gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH 2/2] gnu: Add python-bambi.
Date: Tue,  5 Dec 2023 15:30:19 +0000
* gnu/packages/statistics.scm: Sort modules alphabetically.
(python-bambi): New variable.

Change-Id: I54931227310e3ad3b8d5c9272dcc641877b78bfb
---
 gnu/packages/statistics.scm | 77 +++++++++++++++++++++++++++++++++----
 1 file changed, 70 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 30c6a9483e..c9a9672a35 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -35,25 +35,26 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages statistics)
-  #:use-module (guix gexp)
   #:use-module ((guix licenses) #:prefix license:)
-  #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix hg-download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
+  #:use-module (guix hg-download)
+  #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system emacs)
   #:use-module (guix build-system gnu)
-  #:use-module (guix build-system r)
   #:use-module (guix build-system pyproject)
   #:use-module (guix build-system python)
-  #:use-module (guix build-system trivial)
+  #:use-module (guix build-system r)
   #:use-module (guix build-system ruby)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
@@ -66,9 +67,10 @@ (define-module (gnu packages statistics)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gcc)
-  #:use-module (gnu packages gtk)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
@@ -100,7 +102,6 @@ (define-module (gnu packages statistics)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
-  #:use-module (gnu packages base)
   #:use-module (gnu packages uglifyjs)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages web)
@@ -2266,6 +2267,68 @@ (define-public python-formulae
 for mixed-effects models.")
     (license license:expat)))
 
+(define-public python-bambi
+  (package
+    (name "python-bambi")
+    (version "0.13.0")
+    (source
+     (origin
+       (method git-fetch) ;PyPI is missing files required by tests
+       (uri (git-reference
+             (url "https://github.com/bambinos/bambi")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1hkkw65nbxg15rzp9rc8zxxwsg454hfa5mq853752hp6bp4r7szp"))))
+    (build-system pyproject-build-system)
+    (arguments
+     ;; The tests below use the network, and there's no configuration to
+     ;; skip the network tests.
+     (list
+      #:test-flags
+      #~(list "--ignore"
+              "tests/test_aliases.py"
+              "--ignore"
+              "tests/test_plots.py"
+              "-k"
+              (string-append
+               "not "
+               (string-join
+                (list
+                 "test_logistic_regression_categoric_alternative_samplers"
+                 "test_regression_alternative_samplers"
+                 "test_predict_new_groups"
+                 "test_predict_new_groups_fail"
+                 "test_censored_response"
+                 "test_data_is_copied"
+                 "test_extra_namespace"
+                 "test_predict_offset"
+                 "test_custom_prior"
+                 "test_normal_with_splines"
+                 "test_gamma_with_splines")
+                " and not ")))
+      #:phases #~(modify-phases %standard-phases
+                   (add-before 'check 'pre-check
+                     (lambda _
+                       ;; Some tests require write permission.
+                       (setenv "HOME" "/tmp"))))))
+    (propagated-inputs (list python-arviz python-formulae python-graphviz
+                             python-pandas python-pymc))
+    (native-inputs (list python-black
+                         python-ipython
+                         python-pylint
+                         python-pytest
+                         python-pytest-cov
+                         python-seaborn))
+    (home-page "https://bambinos.github.io/bambi/")
+    (synopsis "Bayesian Model Building Interface in Python")
+    (description
+     "Bambi is a high-level Bayesian model-building interface written in Python.
+It's built on top of the PyMC probabilistic programming framework, and is
+designed to make it extremely easy to fit mixed-effects models common in
+social sciences settings using a Bayesian approach.")
+    (license license:expat)))
+
 (define-public python-chaospy
   (package
     (name "python-chaospy")
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#67643; Package guix-patches. (Tue, 05 Dec 2023 15:31:02 GMT) Full text and rfc822 format available.

Message #11 received at 67643 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: 67643 <at> debbugs.gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH 1/2] gnu: Add python-formulae.
Date: Tue,  5 Dec 2023 15:30:18 +0000
* gnu/packages/statistics.scm (python-formulae): New variable.

Change-Id: I65f5c71fd30679b11fe370372d6992df54d86f19
---
 gnu/packages/statistics.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 95cc948d9f..30c6a9483e 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -2236,6 +2236,36 @@ (define-public python-pymc
 inference (VI) algorithms.")
     (license license:asl2.0)))
 
+(define-public python-formulae
+  (package
+    (name "python-formulae")
+    (version "0.5.1")
+    (source (origin
+              (method git-fetch)     ; PyPI is missing files required by tests
+              (uri (git-reference
+                    (url "https://github.com/bambinos/formulae")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0s22ggsss1zrz3bdw1zm3kwbm07bdlp0v1af8xhw8ymcg9sqcsly"))))
+    (build-system pyproject-build-system)
+    (arguments
+     ;; AssertionError: approx() is not supported in a boolean context.
+     (list #:test-flags #~(list "-k" "not test_basic and not test_degree")))
+    (propagated-inputs (list python-numpy python-pandas python-scipy))
+    (native-inputs (list python-black
+                         python-ipython
+                         python-pylint
+                         python-pytest
+                         python-pytest-cov))
+    (home-page "https://bambinos.github.io/formulae/")
+    (synopsis "Formulas for mixed-effects models in Python")
+    (description
+     "@code{formulae} is a Python library that implements Wilkinson’s formulas
+for mixed-effects models.")
+    (license license:expat)))
+
 (define-public python-chaospy
   (package
     (name "python-chaospy")
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#67643; Package guix-patches. (Fri, 02 Feb 2024 20:32:01 GMT) Full text and rfc822 format available.

Message #14 received at 67643 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 67643 <at> debbugs.gnu.org
Subject: [PATCH 0/2] Add python-bambi.
Date: Fri, 2 Feb 2024 20:30:41 +0000
[Message part 1 (text/plain, inline)]
Hi,

Thank you for the patches!

From a quick glance they look good,  I am about to check
upstream license(s) and any hidden bundled code/libraries.

One neat pick. You combined adding new package with module
house keeping changes (sorting use-module alphabetically), to
make a review smoother may you split it into 3 please, with house
keeping part as separate patch?

Looking forward for v2!

Thanks,
Oleg
[Message part 2 (text/html, inline)]

This bug report was last modified 91 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.