all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#63619] [PATCH 0/9] Add PyMC.
@ 2023-05-20 23:10 Vinicius Monego
  2023-05-20 23:12 ` [bug#63619] [PATCH 1/9] gnu: Add python-vega-datasets Vinicius Monego
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-05-20 23:10 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

This patchset adds the PyMC probabilistic programming package.

Vinicius Monego (9):
  gnu: Add python-vega-datasets.
  gnu: Add python-altair.
  gnu: Add python-einops.
  gnu: python-xarray: Update to 2023.5.0.
  gnu: Add python-xarray-einstats.
  gnu: Add python-arviz.
  gnu: Add python-fastprogress.
  gnu: Add python-pytensor.
  gnu: Add python-pymc.

 gnu/packages/python-science.scm | 150 +++++++++++++++++++++++++++++---
 gnu/packages/python-xyz.scm     |  26 ++++++
 gnu/packages/statistics.scm     | 140 +++++++++++++++++++++++++++++
 3 files changed, 306 insertions(+), 10 deletions(-)

-- 
2.34.1





^ permalink raw reply	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH 1/9] gnu: Add python-vega-datasets.
  2023-05-20 23:10 [bug#63619] [PATCH 0/9] Add PyMC Vinicius Monego
@ 2023-05-20 23:12 ` Vinicius Monego
  2023-05-20 23:12   ` [bug#63619] [PATCH 2/9] gnu: Add python-altair Vinicius Monego
                     ` (7 more replies)
  2023-06-05 13:01 ` [bug#63619] [PATCH 0/9] Add PyMC Ludovic Courtès
  2023-06-09  3:49 ` [bug#63619] [PATCH v2 1/9] gnu: Add python-vega-datasets Vinicius Monego
  2 siblings, 8 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-05-20 23:12 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/statistics.scm (python-vega-datasets): New variable.
---
 gnu/packages/statistics.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 13232a00e3..d42c6baed6 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -2062,6 +2062,26 @@ (define-public r-xtable
      "This package provides tools to export R data as LaTeX and HTML tables.")
     (license license:gpl2+)))
 
+(define-public python-vega-datasets
+  (package
+    (name "python-vega-datasets")
+    (version "0.9.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "vega_datasets" version))
+              (sha256
+               (base32
+                "1h1zv607mars2j73v8fdwihjh479blqxyw29nhmc73lf40s9iglx"))))
+    (build-system pyproject-build-system)
+    (arguments
+     `(#:tests? #f))                ; this is a data-only package, so no tests
+    (propagated-inputs (list python-pandas))
+    (home-page "https://github.com/altair-viz/vega_datasets")
+    (synopsis "Example datasets used by Vega-related projects")
+    (description "This package provides a collection of datasets used in Vega
+and Vega-Lite examples.")
+    (license license:expat)))
+
 (define-public python-hdmedians
   (package
     (name "python-hdmedians")
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH 2/9] gnu: Add python-altair.
  2023-05-20 23:12 ` [bug#63619] [PATCH 1/9] gnu: Add python-vega-datasets Vinicius Monego
@ 2023-05-20 23:12   ` Vinicius Monego
  2023-05-20 23:12   ` [bug#63619] [PATCH 3/9] gnu: Add python-einops Vinicius Monego
                     ` (6 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-05-20 23:12 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/statistics.scm (python-altair): New variable.
---
 gnu/packages/statistics.scm | 39 +++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index d42c6baed6..574790731e 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -85,6 +85,7 @@ (define-module (gnu packages statistics)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-science)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages readline)
@@ -2082,6 +2083,44 @@ (define-public python-vega-datasets
 and Vega-Lite examples.")
     (license license:expat)))
 
+(define-public python-altair
+  (package
+    (name "python-altair")
+    (version "5.0.0")
+    (source (origin
+              (method git-fetch)        ; no tests in PyPI
+              (uri (git-reference
+                    (url "https://github.com/altair-viz/altair")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "11j7v2s25xwz3qdjbbps3ma2dd68cr87vxn22x9fyfzgbs9pc7mx"))))
+    (build-system pyproject-build-system)
+    (arguments
+     ;; test_render_examples_to_chart opens an external connection.
+     ;; test_save_html introduces a circular dependency on altair-viewer.
+     (list #:test-flags #~(list "-k" (string-append
+                                      "not test_render_examples_to_chart"
+                                      " and not test_save_html"))))
+    (propagated-inputs (list python-jinja2
+                             python-jsonschema
+                             python-numpy
+                             python-pandas
+                             python-toolz
+                             python-typing-extensions))
+    (native-inputs (list python-black
+                         python-hatchling
+                         python-ipython
+                         python-m2r
+                         python-pytest
+                         python-vega-datasets))
+    (home-page "https://altair-viz.github.io/")
+    (synopsis "Declarative statistical visualization library for Python")
+    (description
+     "Vega-Altair is a declarative statistical visualization library for Python.")
+    (license license:expat)))
+
 (define-public python-hdmedians
   (package
     (name "python-hdmedians")
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH 3/9] gnu: Add python-einops.
  2023-05-20 23:12 ` [bug#63619] [PATCH 1/9] gnu: Add python-vega-datasets Vinicius Monego
  2023-05-20 23:12   ` [bug#63619] [PATCH 2/9] gnu: Add python-altair Vinicius Monego
@ 2023-05-20 23:12   ` Vinicius Monego
  2023-05-20 23:12   ` [bug#63619] [PATCH 4/9] gnu: python-xarray: Update to 2023.5.0 Vinicius Monego
                     ` (5 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-05-20 23:12 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/python-science.scm (python-einops): New variable.
---
 gnu/packages/python-science.scm | 34 +++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 7d3319e367..91c3904783 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -669,6 +669,40 @@ (define-public python-geosketch
 necessary for reproducing the experiments in the paper.")
     (license license:expat)))
 
+(define-public python-einops
+  (package
+    (name "python-einops")
+    (version "0.6.1")
+    (source (origin
+              (method git-fetch) ;PyPI misses .ipynb files required for tests
+              (uri (git-reference
+                    (url "https://github.com/arogozhnikov/einops")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1h8p39kd7ylg99mh620xr20hg7v78x1jnj6vxwk31rlw2dmv2dpr"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'set-backend
+                          (lambda _
+                            ;; Einops supports different backends, but we test
+                            ;; only NumPy for availability and simplicity.
+                            (setenv "EINOPS_TEST_BACKENDS" "numpy"))))))
+    (native-inputs (list jupyter
+                         python-hatchling
+                         python-nbconvert
+                         python-nbformat
+                         python-parameterized
+                         python-pytest))
+    (propagated-inputs (list python-numpy))
+    (home-page "https://einops.rocks/")
+    (synopsis "Tensor operations for different backends")
+    (description "Einops provides a set of tensor operations for NumPy and
+multiple deep learning frameworks.")
+    (license license:expat)))
+
 (define-public python-xarray
   (package
     (name "python-xarray")
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH 4/9] gnu: python-xarray: Update to 2023.5.0.
  2023-05-20 23:12 ` [bug#63619] [PATCH 1/9] gnu: Add python-vega-datasets Vinicius Monego
  2023-05-20 23:12   ` [bug#63619] [PATCH 2/9] gnu: Add python-altair Vinicius Monego
  2023-05-20 23:12   ` [bug#63619] [PATCH 3/9] gnu: Add python-einops Vinicius Monego
@ 2023-05-20 23:12   ` Vinicius Monego
  2023-05-20 23:12   ` [bug#63619] [PATCH 5/9] gnu: Add python-xarray-einstats Vinicius Monego
                     ` (4 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-05-20 23:12 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/python-science.scm (python-xarray): Update to 2023.5.0.
[build-system]: Switch to pyproject-build-system.
[arguments]: Don't override the check phase.
---
 gnu/packages/python-science.scm | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 91c3904783..468da66a2b 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2019, 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
-;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020, 2021, 2022, 2023 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
 ;;; Copyright © 2021 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
@@ -706,24 +706,18 @@ (define-public python-einops
 (define-public python-xarray
   (package
     (name "python-xarray")
-    (version "0.15.1")
+    (version "2023.5.0")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "xarray" version))
               (sha256
                (base32
-                "1yx8j66b7rn10m2l6gmn8yr9cn38pi5cj0x0wwpy4hdnhy6i7qv4"))))
-    (build-system python-build-system)
+                "1s05ykxbhid8q0wbdns3kksdbbmxv47asmqwgp5wxfc284gnb2ii"))))
+    (build-system pyproject-build-system)
     (native-inputs
      (list python-setuptools-scm python-pytest))
     (propagated-inputs
      (list python-numpy python-pandas))
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda _
-             (invoke "pytest"))))))
     (home-page "https://github.com/pydata/xarray")
     (synopsis "N-D labeled arrays and datasets")
     (description "Xarray (formerly xray) makes working with labelled
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH 5/9] gnu: Add python-xarray-einstats.
  2023-05-20 23:12 ` [bug#63619] [PATCH 1/9] gnu: Add python-vega-datasets Vinicius Monego
                     ` (2 preceding siblings ...)
  2023-05-20 23:12   ` [bug#63619] [PATCH 4/9] gnu: python-xarray: Update to 2023.5.0 Vinicius Monego
@ 2023-05-20 23:12   ` Vinicius Monego
  2023-05-20 23:12   ` [bug#63619] [PATCH 6/9] gnu: Add python-arviz Vinicius Monego
                     ` (3 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-05-20 23:12 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/python-science.scm (python-xarray-einstats): New variable.
---
 gnu/packages/python-science.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 468da66a2b..d076c877fc 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -730,6 +730,30 @@ (define-public python-xarray
 and visualization with these data structures.")
     (license license:asl2.0)))
 
+(define-public python-xarray-einstats
+  (package
+    (name "python-xarray-einstats")
+    (version "0.5.1")
+    (source (origin
+              (method git-fetch) ; no tests in PyPI
+              (uri (git-reference
+                    (url "https://github.com/arviz-devs/xarray-einstats")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1gg7p2lq7zxic64nbr6a8ynizs8rjzb29fnqib7hw3lmp13wsfm0"))))
+    (build-system pyproject-build-system)
+    (native-inputs (list python-einops python-flit-core python-numba
+                         python-pytest))
+    (propagated-inputs (list python-numpy python-scipy python-xarray))
+    (home-page "https://einstats.python.arviz.org/en/latest/")
+    (synopsis "Stats, linear algebra and einops for xarray")
+    (description
+     "@code{xarray_einstats} provides wrappers around some NumPy and SciPy
+functions and around einops with an API and features adapted to xarray.")
+    (license license:asl2.0)))
+
 (define-public python-msgpack-numpy
   (package
     (name "python-msgpack-numpy")
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH 6/9] gnu: Add python-arviz.
  2023-05-20 23:12 ` [bug#63619] [PATCH 1/9] gnu: Add python-vega-datasets Vinicius Monego
                     ` (3 preceding siblings ...)
  2023-05-20 23:12   ` [bug#63619] [PATCH 5/9] gnu: Add python-xarray-einstats Vinicius Monego
@ 2023-05-20 23:12   ` Vinicius Monego
  2023-05-20 23:12   ` [bug#63619] [PATCH 7/9] gnu: Add python-fastprogress Vinicius Monego
                     ` (2 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-05-20 23:12 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/statistics.scm (python-arviz): New variable.
---
 gnu/packages/statistics.scm | 41 +++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

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")
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH 7/9] gnu: Add python-fastprogress.
  2023-05-20 23:12 ` [bug#63619] [PATCH 1/9] gnu: Add python-vega-datasets Vinicius Monego
                     ` (4 preceding siblings ...)
  2023-05-20 23:12   ` [bug#63619] [PATCH 6/9] gnu: Add python-arviz Vinicius Monego
@ 2023-05-20 23:12   ` Vinicius Monego
  2023-05-20 23:12   ` [bug#63619] [PATCH 8/9] gnu: Add python-pytensor Vinicius Monego
  2023-05-20 23:12   ` [bug#63619] [PATCH 9/9] gnu: Add python-pymc Vinicius Monego
  7 siblings, 0 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-05-20 23:12 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/python-xyz.scm (python-fastprogress): New variable.
---
 gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f061fb4cfd..9ee45ab525 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -3002,6 +3002,32 @@ (define-public python-capturer
 for additional processing.")
     (license license:expat)))
 
+(define-public python-fastprogress
+  (package
+    (name "python-fastprogress")
+    (version "1.0.3")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/fastai/fastprogress")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "01h8f786wgmmd3fj98wk1n5id67nsp19gs8bbgims04aciwhvj21"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list #:tests? #f                  ;there are no tests
+           #:phases #~(modify-phases %standard-phases
+                        ;; XXX: Fails with: "In procedure utime: No such file
+                        ;; or directory".
+                        (delete 'ensure-no-mtimes-pre-1980))))
+    (home-page "https://github.com/fastai/fastprogress")
+    (synopsis "Progress bar for Jupyter Notebook and console")
+    (description
+     "Fastprogress is a progress bar for Jupyter Notebook and console.")
+    (license license:asl2.0)))
+
 (define-public python-case
   (package
     (name "python-case")
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH 8/9] gnu: Add python-pytensor.
  2023-05-20 23:12 ` [bug#63619] [PATCH 1/9] gnu: Add python-vega-datasets Vinicius Monego
                     ` (5 preceding siblings ...)
  2023-05-20 23:12   ` [bug#63619] [PATCH 7/9] gnu: Add python-fastprogress Vinicius Monego
@ 2023-05-20 23:12   ` Vinicius Monego
  2023-05-20 23:12   ` [bug#63619] [PATCH 9/9] gnu: Add python-pymc Vinicius Monego
  7 siblings, 0 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-05-20 23:12 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/python-science.scm (python-pytensor): New variable.
---
 gnu/packages/python-science.scm | 78 +++++++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index d076c877fc..a419f4d023 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -754,6 +754,84 @@ (define-public python-xarray-einstats
 functions and around einops with an API and features adapted to xarray.")
     (license license:asl2.0)))
 
+(define-public python-pytensor
+  (package
+    (name "python-pytensor")
+    (version "2.11.3")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/pymc-devs/pytensor")
+                    (commit (string-append "rel-" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1qg38jv1244v5lzjgnb116jpz1gj8p3c5pjxr2nvkx7qpjwzxvk6"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'write-permissions
+                          (lambda _
+                            (setenv "HOME" "/tmp")))
+                        (add-after 'unpack 'versioneer
+                          (lambda _
+                            ;; Our version of versioneer needs setup.cfg.
+                            ;; This is adapted from pyproject.toml.
+                            (with-output-to-file "setup.cfg"
+                              (lambda ()
+                                (display
+                                 "[versioneer]
+VCS = git
+style = pep440
+versionfile_source = pytensor/_version.py
+versionfile_build = pytensor/_version.py
+tag_prefix = rel-
+")))
+                            (invoke "versioneer" "install")
+                            (substitute* "setup.py"
+                              (("versioneer.get_version\\(\\)")
+                               (string-append "\""
+                                              #$version "\"")))))
+                        (replace 'check
+                          (lambda* (#:key tests? #:allow-other-keys)
+                            (when tests?
+                              ;; Test discovery fails, have to call pytest by hand
+                              ;; test_tensor_basic.py file requires JAX.
+                              (invoke "python" "-m" "pytest" "-vv"
+                                      "--ignore"
+                                      "tests/link/jax/test_tensor_basic.py"
+                                      ;; Skip benchmark tests.
+                                      "-k"
+                                      (string-append "not test_elemwise_speed"
+                                       " and not test_logsumexp_benchmark"
+                                       " and not test_fused_elemwise_benchmark"
+                                       " and not test_scan_multiple_output"
+                                       " and not test_vector_taps_benchmark"
+                                       " and not test_cython_performance")
+                                      ;; Skip computationally intensive tests.
+                                      "--ignore" "tests/scan/"
+                                      "--ignore" "tests/tensor/"
+                                      "--ignore" "tests/sandbox/"
+                                      "--ignore" "tests/sparse/sandbox/")))))))
+    (native-inputs (list python-cython python-pytest python-versioneer))
+    (propagated-inputs (list python-cons
+                             python-etuples
+                             python-filelock
+                             python-logical-unification
+                             python-minikanren
+                             python-numba
+                             python-numpy
+                             python-scipy
+                             python-typing-extensions))
+    (home-page "https://pytensor.readthedocs.io/en/latest/")
+    (synopsis
+     "Library for mathematical expressions in multi-dimensional arrays")
+    (description
+     "PyTensor is a Python library that allows one to define,
+optimize, and efficiently evaluate mathematical expressions involving
+multi-dimensional arrays.  It is a fork of the Aesara library.")
+    (license license:bsd-3)))
+
 (define-public python-msgpack-numpy
   (package
     (name "python-msgpack-numpy")
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH 9/9] gnu: Add python-pymc.
  2023-05-20 23:12 ` [bug#63619] [PATCH 1/9] gnu: Add python-vega-datasets Vinicius Monego
                     ` (6 preceding siblings ...)
  2023-05-20 23:12   ` [bug#63619] [PATCH 8/9] gnu: Add python-pytensor Vinicius Monego
@ 2023-05-20 23:12   ` Vinicius Monego
  7 siblings, 0 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-05-20 23:12 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/statistics.scm (python-pymc): New variable.
---
 gnu/packages/statistics.scm | 40 +++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index c39cf9c0ac..4aac3369ad 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -2192,6 +2192,46 @@ (define-public python-arviz
 comparison and diagnostics.")
     (license license:asl2.0)))
 
+(define-public python-pymc
+  (package
+    (name "python-pymc")
+    (version "5.3.1")
+    (source (origin
+              (method git-fetch)        ; no tests in PyPI
+              (uri (git-reference
+                    (url "https://github.com/pymc-devs/pymc")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1295b0d1zgnpy2hgm0i9jhnnqgzkya7cwcyhq45fdrz65mi9b65h"))))
+    (build-system pyproject-build-system)
+    (arguments
+     ;; Tests are computationally intensive and around 130 tests out of ~2800
+     ;; fail due to a missing .cc file in PyTensor.
+     (list #:tests? #f
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'write-permissions
+                          (lambda _
+                            (setenv "HOME" "/tmp"))))))
+    (native-inputs (list python-pytest-cov))
+    (propagated-inputs (list python-arviz
+                             python-cachetools
+                             python-cloudpickle
+                             python-fastprogress
+                             python-numpy
+                             python-pandas
+                             python-pytensor
+                             python-scipy
+                             python-typing-extensions))
+    (home-page "https://github.com/pymc-devs/pymc")
+    (synopsis "Library for probabilistic programming in Python")
+    (description
+     "PyMC (formerly PyMC3) is a Python package for Bayesian
+statistical modeling focusing on advanced Markov chain Monte Carlo (MCMC) and
+variational inference (VI) algorithms.")
+    (license license:asl2.0)))
+
 (define-public python-patsy
   (package
     (name "python-patsy")
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH 0/9] Add PyMC.
  2023-05-20 23:10 [bug#63619] [PATCH 0/9] Add PyMC Vinicius Monego
  2023-05-20 23:12 ` [bug#63619] [PATCH 1/9] gnu: Add python-vega-datasets Vinicius Monego
@ 2023-06-05 13:01 ` Ludovic Courtès
  2023-06-09  4:10   ` Vinicius Monego
  2023-06-09  3:49 ` [bug#63619] [PATCH v2 1/9] gnu: Add python-vega-datasets Vinicius Monego
  2 siblings, 1 reply; 25+ messages in thread
From: Ludovic Courtès @ 2023-06-05 13:01 UTC (permalink / raw)
  To: Vinicius Monego; +Cc: 63619

Vinicius Monego <monego@posteo.net> skribis:

> This patchset adds the PyMC probabilistic programming package.
>
> Vinicius Monego (9):
>   gnu: Add python-vega-datasets.
>   gnu: Add python-altair.
>   gnu: Add python-einops.
>   gnu: python-xarray: Update to 2023.5.0.
>   gnu: Add python-xarray-einstats.
>   gnu: Add python-arviz.
>   gnu: Add python-fastprogress.
>   gnu: Add python-pytensor.
>   gnu: Add python-pymc.

Hi!  From a quick glance it LGTM.

<https://qa.guix.gnu.org/issue/63619> is still lagging behind though.

Ludo’.




^ permalink raw reply	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH v2 1/9] gnu: Add python-vega-datasets.
  2023-05-20 23:10 [bug#63619] [PATCH 0/9] Add PyMC Vinicius Monego
  2023-05-20 23:12 ` [bug#63619] [PATCH 1/9] gnu: Add python-vega-datasets Vinicius Monego
  2023-06-05 13:01 ` [bug#63619] [PATCH 0/9] Add PyMC Ludovic Courtès
@ 2023-06-09  3:49 ` Vinicius Monego
  2023-06-09  3:49   ` [bug#63619] [PATCH v2 2/9] gnu: Add python-altair Vinicius Monego
                     ` (7 more replies)
  2 siblings, 8 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-06-09  3:49 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/statistics.scm (python-vega-datasets): New variable.
---
 gnu/packages/statistics.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 42ee83d161..7f6dae1d67 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -2062,6 +2062,26 @@ (define-public r-xtable
      "This package provides tools to export R data as LaTeX and HTML tables.")
     (license license:gpl2+)))
 
+(define-public python-vega-datasets
+  (package
+    (name "python-vega-datasets")
+    (version "0.9.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "vega_datasets" version))
+              (sha256
+               (base32
+                "1h1zv607mars2j73v8fdwihjh479blqxyw29nhmc73lf40s9iglx"))))
+    (build-system pyproject-build-system)
+    (arguments
+     `(#:tests? #f))                ; this is a data-only package, so no tests
+    (propagated-inputs (list python-pandas))
+    (home-page "https://github.com/altair-viz/vega_datasets")
+    (synopsis "Example datasets used by Vega-related projects")
+    (description "This package provides a collection of datasets used in Vega
+and Vega-Lite examples.")
+    (license license:expat)))
+
 (define-public python-hdmedians
   (package
     (name "python-hdmedians")
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH v2 2/9] gnu: Add python-altair.
  2023-06-09  3:49 ` [bug#63619] [PATCH v2 1/9] gnu: Add python-vega-datasets Vinicius Monego
@ 2023-06-09  3:49   ` Vinicius Monego
  2023-06-09  3:49   ` [bug#63619] [PATCH v2 3/9] gnu: Add python-einops Vinicius Monego
                     ` (6 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-06-09  3:49 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/statistics.scm (python-altair): New variable.
---
 gnu/packages/statistics.scm | 40 +++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 7f6dae1d67..4952e16384 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -85,6 +85,7 @@ (define-module (gnu packages statistics)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-science)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages readline)
@@ -2082,6 +2083,45 @@ (define-public python-vega-datasets
 and Vega-Lite examples.")
     (license license:expat)))
 
+(define-public python-altair
+  (package
+    (name "python-altair")
+    (version "5.0.1")
+    (source (origin
+              (method git-fetch)        ; no tests in PyPI
+              (uri (git-reference
+                    (url "https://github.com/altair-viz/altair")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1r74v5n51br9pjhxdzrr62cdgnwkapci93aifnl8dqmfpizfpd7d"))))
+    (build-system pyproject-build-system)
+    (arguments
+     ;; First two open an external connection.
+     ;; Last introduces a circular dependency on altair-viewer.
+     (list #:test-flags #~(list "-k" (string-append
+                                      "not test_from_and_to_json_roundtrip"
+                                      " and not test_render_examples_to_chart"
+                                      " and not test_save_html"))))
+    (propagated-inputs (list python-jinja2
+                             python-jsonschema
+                             python-numpy
+                             python-pandas
+                             python-toolz
+                             python-typing-extensions))
+    (native-inputs (list python-black
+                         python-hatchling
+                         python-ipython
+                         python-m2r
+                         python-pytest
+                         python-vega-datasets))
+    (home-page "https://altair-viz.github.io/")
+    (synopsis "Declarative statistical visualization library for Python")
+    (description
+     "Vega-Altair is a declarative statistical visualization library for Python.")
+    (license license:expat)))
+
 (define-public python-hdmedians
   (package
     (name "python-hdmedians")
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH v2 3/9] gnu: Add python-einops.
  2023-06-09  3:49 ` [bug#63619] [PATCH v2 1/9] gnu: Add python-vega-datasets Vinicius Monego
  2023-06-09  3:49   ` [bug#63619] [PATCH v2 2/9] gnu: Add python-altair Vinicius Monego
@ 2023-06-09  3:49   ` Vinicius Monego
  2023-06-09  3:49   ` [bug#63619] [PATCH v2 4/9] gnu: python-xarray: Update to 2023.5.0 Vinicius Monego
                     ` (5 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-06-09  3:49 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/python-science.scm (python-einops): New variable.
---
 gnu/packages/python-science.scm | 34 +++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 7d3319e367..91c3904783 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -669,6 +669,40 @@ (define-public python-geosketch
 necessary for reproducing the experiments in the paper.")
     (license license:expat)))
 
+(define-public python-einops
+  (package
+    (name "python-einops")
+    (version "0.6.1")
+    (source (origin
+              (method git-fetch) ;PyPI misses .ipynb files required for tests
+              (uri (git-reference
+                    (url "https://github.com/arogozhnikov/einops")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1h8p39kd7ylg99mh620xr20hg7v78x1jnj6vxwk31rlw2dmv2dpr"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'set-backend
+                          (lambda _
+                            ;; Einops supports different backends, but we test
+                            ;; only NumPy for availability and simplicity.
+                            (setenv "EINOPS_TEST_BACKENDS" "numpy"))))))
+    (native-inputs (list jupyter
+                         python-hatchling
+                         python-nbconvert
+                         python-nbformat
+                         python-parameterized
+                         python-pytest))
+    (propagated-inputs (list python-numpy))
+    (home-page "https://einops.rocks/")
+    (synopsis "Tensor operations for different backends")
+    (description "Einops provides a set of tensor operations for NumPy and
+multiple deep learning frameworks.")
+    (license license:expat)))
+
 (define-public python-xarray
   (package
     (name "python-xarray")
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH v2 4/9] gnu: python-xarray: Update to 2023.5.0.
  2023-06-09  3:49 ` [bug#63619] [PATCH v2 1/9] gnu: Add python-vega-datasets Vinicius Monego
  2023-06-09  3:49   ` [bug#63619] [PATCH v2 2/9] gnu: Add python-altair Vinicius Monego
  2023-06-09  3:49   ` [bug#63619] [PATCH v2 3/9] gnu: Add python-einops Vinicius Monego
@ 2023-06-09  3:49   ` Vinicius Monego
  2023-06-09  3:49   ` [bug#63619] [PATCH v2 5/9] gnu: Add python-xarray-einstats Vinicius Monego
                     ` (4 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-06-09  3:49 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/python-science.scm (python-xarray): Update to 2023.5.0.
[build-system]: Switch to pyproject-build-system.
[arguments]: Don't override the check phase.
---
 gnu/packages/python-science.scm | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 91c3904783..468da66a2b 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2019, 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
-;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020, 2021, 2022, 2023 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
 ;;; Copyright © 2021 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
@@ -706,24 +706,18 @@ (define-public python-einops
 (define-public python-xarray
   (package
     (name "python-xarray")
-    (version "0.15.1")
+    (version "2023.5.0")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "xarray" version))
               (sha256
                (base32
-                "1yx8j66b7rn10m2l6gmn8yr9cn38pi5cj0x0wwpy4hdnhy6i7qv4"))))
-    (build-system python-build-system)
+                "1s05ykxbhid8q0wbdns3kksdbbmxv47asmqwgp5wxfc284gnb2ii"))))
+    (build-system pyproject-build-system)
     (native-inputs
      (list python-setuptools-scm python-pytest))
     (propagated-inputs
      (list python-numpy python-pandas))
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda _
-             (invoke "pytest"))))))
     (home-page "https://github.com/pydata/xarray")
     (synopsis "N-D labeled arrays and datasets")
     (description "Xarray (formerly xray) makes working with labelled
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH v2 5/9] gnu: Add python-xarray-einstats.
  2023-06-09  3:49 ` [bug#63619] [PATCH v2 1/9] gnu: Add python-vega-datasets Vinicius Monego
                     ` (2 preceding siblings ...)
  2023-06-09  3:49   ` [bug#63619] [PATCH v2 4/9] gnu: python-xarray: Update to 2023.5.0 Vinicius Monego
@ 2023-06-09  3:49   ` Vinicius Monego
  2023-06-09  3:49   ` [bug#63619] [PATCH v2 6/9] gnu: Add python-arviz Vinicius Monego
                     ` (3 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-06-09  3:49 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/python-science.scm (python-xarray-einstats): New variable.
---
 gnu/packages/python-science.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 468da66a2b..d076c877fc 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -730,6 +730,30 @@ (define-public python-xarray
 and visualization with these data structures.")
     (license license:asl2.0)))
 
+(define-public python-xarray-einstats
+  (package
+    (name "python-xarray-einstats")
+    (version "0.5.1")
+    (source (origin
+              (method git-fetch) ; no tests in PyPI
+              (uri (git-reference
+                    (url "https://github.com/arviz-devs/xarray-einstats")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1gg7p2lq7zxic64nbr6a8ynizs8rjzb29fnqib7hw3lmp13wsfm0"))))
+    (build-system pyproject-build-system)
+    (native-inputs (list python-einops python-flit-core python-numba
+                         python-pytest))
+    (propagated-inputs (list python-numpy python-scipy python-xarray))
+    (home-page "https://einstats.python.arviz.org/en/latest/")
+    (synopsis "Stats, linear algebra and einops for xarray")
+    (description
+     "@code{xarray_einstats} provides wrappers around some NumPy and SciPy
+functions and around einops with an API and features adapted to xarray.")
+    (license license:asl2.0)))
+
 (define-public python-msgpack-numpy
   (package
     (name "python-msgpack-numpy")
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH v2 6/9] gnu: Add python-arviz.
  2023-06-09  3:49 ` [bug#63619] [PATCH v2 1/9] gnu: Add python-vega-datasets Vinicius Monego
                     ` (3 preceding siblings ...)
  2023-06-09  3:49   ` [bug#63619] [PATCH v2 5/9] gnu: Add python-xarray-einstats Vinicius Monego
@ 2023-06-09  3:49   ` Vinicius Monego
  2023-06-09  3:49   ` [bug#63619] [PATCH v2 7/9] gnu: Add python-fastprogress Vinicius Monego
                     ` (2 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-06-09  3:49 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/statistics.scm (python-arviz): New variable.
---
 gnu/packages/statistics.scm | 41 +++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 4952e16384..0a2ca7ced2 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -2152,6 +2152,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")
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH v2 7/9] gnu: Add python-fastprogress.
  2023-06-09  3:49 ` [bug#63619] [PATCH v2 1/9] gnu: Add python-vega-datasets Vinicius Monego
                     ` (4 preceding siblings ...)
  2023-06-09  3:49   ` [bug#63619] [PATCH v2 6/9] gnu: Add python-arviz Vinicius Monego
@ 2023-06-09  3:49   ` Vinicius Monego
  2023-06-09  3:49   ` [bug#63619] [PATCH v2 8/9] gnu: Add python-pytensor Vinicius Monego
  2023-06-09  3:49   ` [bug#63619] [PATCH v2 9/9] gnu: Add python-pymc Vinicius Monego
  7 siblings, 0 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-06-09  3:49 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/python-xyz.scm (python-fastprogress): New variable.
---
 gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index efac1130a9..7798bf20ce 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -3041,6 +3041,32 @@ (define-public python-capturer
 for additional processing.")
     (license license:expat)))
 
+(define-public python-fastprogress
+  (package
+    (name "python-fastprogress")
+    (version "1.0.3")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/fastai/fastprogress")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "01h8f786wgmmd3fj98wk1n5id67nsp19gs8bbgims04aciwhvj21"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list #:tests? #f                  ;there are no tests
+           #:phases #~(modify-phases %standard-phases
+                        ;; XXX: Fails with: "In procedure utime: No such file
+                        ;; or directory".
+                        (delete 'ensure-no-mtimes-pre-1980))))
+    (home-page "https://github.com/fastai/fastprogress")
+    (synopsis "Progress bar for Jupyter Notebook and console")
+    (description
+     "Fastprogress is a progress bar for Jupyter Notebook and console.")
+    (license license:asl2.0)))
+
 (define-public python-case
   (package
     (name "python-case")
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH v2 8/9] gnu: Add python-pytensor.
  2023-06-09  3:49 ` [bug#63619] [PATCH v2 1/9] gnu: Add python-vega-datasets Vinicius Monego
                     ` (5 preceding siblings ...)
  2023-06-09  3:49   ` [bug#63619] [PATCH v2 7/9] gnu: Add python-fastprogress Vinicius Monego
@ 2023-06-09  3:49   ` Vinicius Monego
  2023-06-09  3:49   ` [bug#63619] [PATCH v2 9/9] gnu: Add python-pymc Vinicius Monego
  7 siblings, 0 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-06-09  3:49 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/python-science.scm (python-pytensor): New variable.
---
 gnu/packages/python-science.scm | 76 +++++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index d076c877fc..fb2ea0c3b5 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -754,6 +754,82 @@ (define-public python-xarray-einstats
 functions and around einops with an API and features adapted to xarray.")
     (license license:asl2.0)))
 
+(define-public python-pytensor
+  (package
+    (name "python-pytensor")
+    (version "2.12.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/pymc-devs/pytensor")
+                    (commit (string-append "rel-" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1yrzc6idbpvxs7xfmrpbnawz854yq73l7nc6yxdyg0l273ip3jsz"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; Replace version manually because pytensor uses
+          ;; versioneer, which requires git metadata.
+          (add-after 'unpack 'versioneer
+            (lambda _
+              (with-output-to-file "setup.cfg"
+                (lambda ()
+                  (display "\
+[versioneer]
+VCS = git
+style = pep440
+versionfile_source = pytensor/_version.py
+versionfile_build = pytensor/_version.py
+tag_prefix =
+parentdir_prefix = pytensor-
+")))
+              (invoke "versioneer" "install")
+              (substitute* "setup.py"
+                (("versioneer.get_version\\(\\)")
+                 (string-append "\"" #$version "\"")))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                ;; Test discovery fails, have to call pytest by hand.
+                ;; test_tensor_basic.py file requires JAX.
+                (invoke "python" "-m" "pytest" "-vv"
+                        "--ignore" "tests/link/jax/test_tensor_basic.py"
+                        ;; Skip benchmark tests.
+                        "-k" (string-append
+                              "not test_elemwise_speed"
+                              " and not test_logsumexp_benchmark"
+                              " and not test_fused_elemwise_benchmark"
+                              " and not test_scan_multiple_output"
+                              " and not test_vector_taps_benchmark"
+                              " and not test_cython_performance")
+                        ;; Skip computationally intensive tests.
+                        "--ignore" "tests/scan/"
+                        "--ignore" "tests/tensor/"
+                        "--ignore" "tests/sandbox/"
+                        "--ignore" "tests/sparse/sandbox/")))))))
+    (native-inputs (list python-cython python-pytest python-versioneer))
+    (propagated-inputs (list python-cons
+                             python-etuples
+                             python-filelock
+                             python-logical-unification
+                             python-minikanren
+                             python-numba
+                             python-numpy
+                             python-scipy
+                             python-typing-extensions))
+    (home-page "https://pytensor.readthedocs.io/en/latest/")
+    (synopsis
+     "Library for mathematical expressions in multi-dimensional arrays")
+    (description
+     "PyTensor is a Python library that allows one to define,
+optimize, and efficiently evaluate mathematical expressions involving
+multi-dimensional arrays.  It is a fork of the Aesara library.")
+    (license license:bsd-3)))
+
 (define-public python-msgpack-numpy
   (package
     (name "python-msgpack-numpy")
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH v2 9/9] gnu: Add python-pymc.
  2023-06-09  3:49 ` [bug#63619] [PATCH v2 1/9] gnu: Add python-vega-datasets Vinicius Monego
                     ` (6 preceding siblings ...)
  2023-06-09  3:49   ` [bug#63619] [PATCH v2 8/9] gnu: Add python-pytensor Vinicius Monego
@ 2023-06-09  3:49   ` Vinicius Monego
  7 siblings, 0 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-06-09  3:49 UTC (permalink / raw)
  To: 63619; +Cc: Vinicius Monego

* gnu/packages/statistics.scm (python-pymc): New variable.
---
 gnu/packages/statistics.scm | 57 +++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 0a2ca7ced2..c2dbfbb64a 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -2193,6 +2193,63 @@ (define-public python-arviz
 comparison and diagnostics.")
     (license license:asl2.0)))
 
+(define-public python-pymc
+  (package
+    (name "python-pymc")
+    (version "5.4.1")
+    (source (origin
+              (method git-fetch)        ; no tests in PyPI
+              (uri (git-reference
+                    (url "https://github.com/pymc-devs/pymc")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1ihx4r7z2lllcakl63dfgskhyk6kns5qp6fi1xf9bhzdy1wbwfls"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list #:tests? #f ; tests are too computationally intensive
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'versioneer
+                          (lambda _
+                            (with-output-to-file "setup.cfg"
+                (lambda ()
+                  (display "\
+[versioneer]
+VCS = git
+style = pep440
+versionfile_source = pymc/_version.py
+versionfile_build = pymc/_version.py
+tag_prefix =
+parentdir_prefix = pymc-
+")))
+              (invoke "versioneer" "install")
+              (substitute* "setup.py"
+                (("versioneer.get_version\\(\\)")
+                 (string-append "\"" #$version "\"")))))
+                        ;; To create the compiledir for tests.
+                        (add-before 'check 'write-permissions
+                          (lambda* (#:key tests? #:allow-other-keys)
+                            (when tests?
+                              (setenv "HOME" "/tmp")))))))
+    (native-inputs (list python-pytest-cov python-versioneer))
+    (propagated-inputs (list python-arviz
+                             python-cachetools
+                             python-cloudpickle
+                             python-fastprogress
+                             python-numpy
+                             python-pandas
+                             python-pytensor
+                             python-scipy
+                             python-typing-extensions))
+    (home-page "https://github.com/pymc-devs/pymc")
+    (synopsis "Library for probabilistic programming in Python")
+    (description
+     "PyMC (formerly PyMC3) is a Python package for Bayesian
+statistical modeling focusing on advanced Markov chain Monte Carlo (MCMC) and
+variational inference (VI) algorithms.")
+    (license license:asl2.0)))
+
 (define-public python-patsy
   (package
     (name "python-patsy")
-- 
2.34.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH 0/9] Add PyMC.
  2023-06-05 13:01 ` [bug#63619] [PATCH 0/9] Add PyMC Ludovic Courtès
@ 2023-06-09  4:10   ` Vinicius Monego
  2023-06-14 21:05     ` Ludovic Courtès
  0 siblings, 1 reply; 25+ messages in thread
From: Vinicius Monego @ 2023-06-09  4:10 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 63619

Em seg, 2023-06-05 às 15:01 +0200, Ludovic Courtès escreveu:

[...]


> Hi!  From a quick glance it LGTM.
> 
> <https://qa.guix.gnu.org/issue/63619> is still lagging behind though.
> 
> Ludo’.

Hi,

I finally understood Versioneer, and fixed the version reporting in
pytensor and pymc. I also updated some of the packages and now pytensor
correctly installs "Faddeeva.h".

My last question would be about the python-vega-datasets package. The
dataset licenses must be "MIT compatible", I'm not sure whether that
implies FSDG compatibility. Some of them do not mention the license:

https://github.com/altair-viz/vega_datasets/blob/master/vega_datasets/dataset_info.json

Developer acknowledges that the provenance of the datasets is difficult
to trace:
https://github.com/altair-viz/vega_datasets/issues/1#issue-288302709

If it's not a problem, then I can push it soon. And I just noticed that
there are tests in this package, they will be enabled before pushing.




^ permalink raw reply	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH 0/9] Add PyMC.
  2023-06-09  4:10   ` Vinicius Monego
@ 2023-06-14 21:05     ` Ludovic Courtès
  2023-06-14 22:46       ` Vinicius Monego
  0 siblings, 1 reply; 25+ messages in thread
From: Ludovic Courtès @ 2023-06-14 21:05 UTC (permalink / raw)
  To: Vinicius Monego; +Cc: 63619

Hi,

Vinicius Monego <monego@posteo.net> skribis:

> My last question would be about the python-vega-datasets package. The
> dataset licenses must be "MIT compatible", I'm not sure whether that
> implies FSDG compatibility. Some of them do not mention the license:
>
> https://github.com/altair-viz/vega_datasets/blob/master/vega_datasets/dataset_info.json
>
> Developer acknowledges that the provenance of the datasets is difficult
> to trace:
> https://github.com/altair-viz/vega_datasets/issues/1#issue-288302709
>
> If it's not a problem, then I can push it soon. And I just noticed that
> there are tests in this package, they will be enabled before pushing.

Lack of licensing and provenance information is usually not a good
sign.  What did Debian do, for example?

Note that FSDG is more lax than Debian when it comes to “Non-functional
data”¹.

Thanks,
Ludo’.

¹ https://www.gnu.org/distros/free-system-distribution-guidelines.html




^ permalink raw reply	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH 0/9] Add PyMC.
  2023-06-14 21:05     ` Ludovic Courtès
@ 2023-06-14 22:46       ` Vinicius Monego
  2023-06-21 21:48         ` Ludovic Courtès
  0 siblings, 1 reply; 25+ messages in thread
From: Vinicius Monego @ 2023-06-14 22:46 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 63619

Em qua, 2023-06-14 às 23:05 +0200, Ludovic Courtès escreveu:


[...]

> Lack of licensing and provenance information is usually not a good
> sign.  What did Debian do, for example?
> 
> Note that FSDG is more lax than Debian when it comes to “Non-
> functional
> data”¹.
> 
> Thanks,
> Ludo’.
> 
> ¹
> https://www.gnu.org/distros/free-system-distribution-guidelines.html

Debian has a patch to remove the "L.A. Riots" dataset with the
following justification:

> vega_datasets/_data/la-riots.csv is removed since the license is not
> clear and the file is not currently available from Los Angeles Times
> for European users.

So they don't seem to have a problem with the licenses of the other
datasets.

Vinicius




^ permalink raw reply	[flat|nested] 25+ messages in thread

* [bug#63619] [PATCH 0/9] Add PyMC.
  2023-06-14 22:46       ` Vinicius Monego
@ 2023-06-21 21:48         ` Ludovic Courtès
  2023-06-25 14:01           ` bug#63619: " Vinicius Monego
  0 siblings, 1 reply; 25+ messages in thread
From: Ludovic Courtès @ 2023-06-21 21:48 UTC (permalink / raw)
  To: Vinicius Monego; +Cc: 63619

Hi,

Vinicius Monego <monego@posteo.net> skribis:

> Debian has a patch to remove the "L.A. Riots" dataset with the
> following justification:
>
>> vega_datasets/_data/la-riots.csv is removed since the license is not
>> clear and the file is not currently available from Los Angeles Times
>> for European users.
>
> So they don't seem to have a problem with the licenses of the other
> datasets.

OK, good to know.  So I’d say you can keep them, adding links to the
relevant discussions for future reference.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#63619: [PATCH 0/9] Add PyMC.
  2023-06-21 21:48         ` Ludovic Courtès
@ 2023-06-25 14:01           ` Vinicius Monego
  0 siblings, 0 replies; 25+ messages in thread
From: Vinicius Monego @ 2023-06-25 14:01 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 63619-done

Em qua, 2023-06-21 às 23:48 +0200, Ludovic Courtès escreveu:
> Hi,
> 
> Vinicius Monego <monego@posteo.net> skribis:
> 
> > Debian has a patch to remove the "L.A. Riots" dataset with the
> > following justification:
> > 
> > > vega_datasets/_data/la-riots.csv is removed since the license is
> > > not
> > > clear and the file is not currently available from Los Angeles
> > > Times
> > > for European users.
> > 
> > So they don't seem to have a problem with the licenses of the other
> > datasets.
> 
> OK, good to know.  So I’d say you can keep them, adding links to the
> relevant discussions for future reference.
> 
> Thanks,
> Ludo’.

Thanks for the review. Applied with the patch imported from Debian.

Vinicius




^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2023-06-25 14:03 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-20 23:10 [bug#63619] [PATCH 0/9] Add PyMC Vinicius Monego
2023-05-20 23:12 ` [bug#63619] [PATCH 1/9] gnu: Add python-vega-datasets Vinicius Monego
2023-05-20 23:12   ` [bug#63619] [PATCH 2/9] gnu: Add python-altair Vinicius Monego
2023-05-20 23:12   ` [bug#63619] [PATCH 3/9] gnu: Add python-einops Vinicius Monego
2023-05-20 23:12   ` [bug#63619] [PATCH 4/9] gnu: python-xarray: Update to 2023.5.0 Vinicius Monego
2023-05-20 23:12   ` [bug#63619] [PATCH 5/9] gnu: Add python-xarray-einstats Vinicius Monego
2023-05-20 23:12   ` [bug#63619] [PATCH 6/9] gnu: Add python-arviz Vinicius Monego
2023-05-20 23:12   ` [bug#63619] [PATCH 7/9] gnu: Add python-fastprogress Vinicius Monego
2023-05-20 23:12   ` [bug#63619] [PATCH 8/9] gnu: Add python-pytensor Vinicius Monego
2023-05-20 23:12   ` [bug#63619] [PATCH 9/9] gnu: Add python-pymc Vinicius Monego
2023-06-05 13:01 ` [bug#63619] [PATCH 0/9] Add PyMC Ludovic Courtès
2023-06-09  4:10   ` Vinicius Monego
2023-06-14 21:05     ` Ludovic Courtès
2023-06-14 22:46       ` Vinicius Monego
2023-06-21 21:48         ` Ludovic Courtès
2023-06-25 14:01           ` bug#63619: " Vinicius Monego
2023-06-09  3:49 ` [bug#63619] [PATCH v2 1/9] gnu: Add python-vega-datasets Vinicius Monego
2023-06-09  3:49   ` [bug#63619] [PATCH v2 2/9] gnu: Add python-altair Vinicius Monego
2023-06-09  3:49   ` [bug#63619] [PATCH v2 3/9] gnu: Add python-einops Vinicius Monego
2023-06-09  3:49   ` [bug#63619] [PATCH v2 4/9] gnu: python-xarray: Update to 2023.5.0 Vinicius Monego
2023-06-09  3:49   ` [bug#63619] [PATCH v2 5/9] gnu: Add python-xarray-einstats Vinicius Monego
2023-06-09  3:49   ` [bug#63619] [PATCH v2 6/9] gnu: Add python-arviz Vinicius Monego
2023-06-09  3:49   ` [bug#63619] [PATCH v2 7/9] gnu: Add python-fastprogress Vinicius Monego
2023-06-09  3:49   ` [bug#63619] [PATCH v2 8/9] gnu: Add python-pytensor Vinicius Monego
2023-06-09  3:49   ` [bug#63619] [PATCH v2 9/9] gnu: Add python-pymc Vinicius Monego

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.