all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vivien via Guix-patches via <guix-patches@gnu.org>
To: Vinicius Monego <monego@posteo.net>, 53402@debbugs.gnu.org
Subject: [bug#53402] Rebase it for the new python packages
Date: Fri, 11 Feb 2022 04:03:14 +0100	[thread overview]
Message-ID: <221569342c7c44d5ed2ddd1ce0e56903d3cda0b2.camel@planete-kraus.eu> (raw)
In-Reply-To: <e82bbd94881b38de2a505c2c1109ce9d3ab529ef.camel@posteo.net>


[-- Attachment #1.1: Type: text/plain, Size: 4263 bytes --]

Hello, and thank you for your new review!

Le dimanche 06 février 2022 à 20:06 +0000, Vinicius Monego a écrit :
> 
> I noticed that some of the tests aren't running, like in flake8-array-
> spacing. If the check phase ends with "Ran 0 tests" then the tests are
> not being collected.


> If there are no tests to be collected, the package should have a
> #:tests? #f along with a comment saying that there are no tests. If
> there are tests to run, the check phase will have to be overriden to
> run them.

I tried to make sure that this situation didn’t happen again.

> > For MNE, the test data set is a separate repository without a
> > license,
> > so I disabled the tests.
> > 
> 
> OK. I tried to download the test dataset from within the mne module
> and
> they don't have a license agreement or anything, while to download
> individiual datasets the user has to agree to the (non-free) terms. I
> wonder if that's acceptable for merging in Guix?

I think it’s not, plus these are medical data (anonymized but still) so
maybe we shouldn’t take the risk.

> In [1] I found that there are more base dependencies that aren't
> listed
> in the pypi importer. They should be added to propagated-inputs. If
> tests can't run, then native-inputs can be removed.

I had nervous laughter when I read that page. I managed to package
everything except for the JS widgets (I don’t know how to tackle that
and I fear it would be a lot of work for very little benefit, since
there are other visualization platforms from what I understand) and
mne-qt-browser, because it depends on MNE.

> Usually, pytest modules should go into python-check.scm, not python-
> xyz.scm.

I tried to separate them, but they depend on a lot of stuff which is
not easy to organize into acyclic module imports.

> > > Could you style it as
> > > 
> > >     (source
> > >      (origin
> > >        (method url-fetch)
> > >        (uri (pypi-uri "imageio-ffmpeg" version))
> > >        (sha256
> > >         (base32
> > > "0ff14079izsyxwf6ki68k9a7w5krjlal7lwqvzg2bbddl92l5spj"))))
> > > 
> > > and the other packages too?
> > 
> > OK.
> > 
> 
> The base32 line was truncated in the mail, the hash should be in the
> same line of 'base32'. But I can fix that.

I fixed that occurence, but as a general rule I’m not very confident in
my indentation taste.

> 
> [...]
> 
> > 
> > > 
> > > Some of the descriptions are not full sentences (e.g. in python-
> > > pytest-
> > > harvest-minimal). Please check that descriptions are full
> > > sentences.
> > 
> > I’m not sure I understand. I reworked some descriptions, but didn’t
> > find non-full sentences. Could you explain what you mean?
> > 
> 
> Full sentences are made of a subject + predicate. This one:
> 
> +    (description "I/O support for EEGLAB files in Python.")
> 
> doesn't have a subject.
> 
> Usually the subject in the description is the package's name itself
> or
> "This package...". e.g. "EEGLABIO is a library..." or "This package
> provides I/O support..."

I think I got it.

> 
> Something else to avoid in descriptions is marketing talk, such as
> 'simple and reliable' in python-imageio-ffmpeg.

There were some more occurences that I neutralized.

> 
> [...]
> 
> The package modules you changed are also missing your copyright line.

OK.

As you see in the new series, vtk doesn’t install an egg-info, which
breaks the sanity-check phase of dependent python packages. There was
an option to let setuptools build the whole project, so the egg-info
would be installed too, but the installation plan with setup.py is
dysfunctional. So I made a terrible hack to "install" an egg-info.
There’s surely a better way to do it with python or pip, but I have no
clue as to what it would be and I can’t do much trial and error since I
have to wait for everything to build again (and vtk is quite a long
thing to compile).

Here is the v5!

I’m not used to managing such a large patch series; I hope I didn’t
make too many errors.

Best regards,

Vivien

> 
> [1]
> https://github.com/mne-tools/mne-python/blob/main/requirements_base.txt

[-- Attachment #1.2: v5-0001-gnu-Add-python-imageio-ffmpeg.patch --]
[-- Type: text/x-patch, Size: 2083 bytes --]

From a1ad7a1dda6b60139cbeea7a9709e1d72d1ed0fc Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 15:39:12 +0100
Subject: [PATCH v5 01/32] gnu: Add python-imageio-ffmpeg.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 41b60325d2..4c932858c0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25435,6 +25435,38 @@ (define-public python-json5
 dumping of JSON5 data structures.")
     (license license:asl2.0)))
 
+(define-public python-imageio-ffmpeg
+  (package
+    (name "python-imageio-ffmpeg")
+    (version "0.4.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "imageio-ffmpeg" version))
+       (sha256
+        (base32 "0ff14079izsyxwf6ki68k9a7w5krjlal7lwqvzg2bbddl92l5spj"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f ;; Most tests download data (use the git url)
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'set-ffmpeg-exe
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; There are different strategies to find ffmpeg, we
+             ;; only fix the last resort, "system ffmpeg command"
+             (substitute* "imageio_ffmpeg/_utils.py"
+               (("exe = \"ffmpeg\"")
+                (format #f "exe = ~s"
+                        (search-input-file
+                         inputs "/bin/ffmpeg")))))))))
+    (inputs (list ffmpeg))
+    (home-page "https://github.com/imageio/imageio-ffmpeg")
+    (synopsis "@samp{ffmpeg} wrapper for Python")
+    (description
+     "The purpose of this project is to wrap the @command{ffmpeg} executable
+for working with video files.")
+    (license license:bsd-2)))
+
 (define-public python-frozendict
   (package
     (name "python-frozendict")

base-commit: 854e38eeb7b007b6027364696615ec5eaa619c52
-- 
2.34.0


[-- Attachment #1.3: v5-0002-gnu-Add-python-edflib.patch --]
[-- Type: text/x-patch, Size: 3774 bytes --]

From a6e8bc28ecfb2bc01e29c51cc4245f82728a27ee Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 15:47:30 +0100
Subject: [PATCH v5 02/32] gnu: Add python-edflib.

* gnu/packages/python-science.scm (python-edflib): New variable.
---
 gnu/packages/python-science.scm | 65 ++++++++++++++++++++++++++++++++-
 1 file changed, 64 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 8df311baea..c73802103d 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
 ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
+;;; Copyright © 2022 Vivien Kraus <viven@planete-kraus.eu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -61,7 +62,8 @@ (define-module (gnu packages python-science)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix utils)
-  #:use-module (guix build-system python))
+  #:use-module (guix build-system python)
+  #:use-module (guix gexp))
 
 (define-public python-scipy
   (package
@@ -1017,3 +1019,64 @@ (define-public python-modin
 libraries, Modin provides seamless integration and compatibility with existing
 pandas code.")
     (license license:asl2.0)))
+
+(define-public python-edflib
+  (package
+    (name "python-edflib")
+    (version "1.0.6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/Teuniz/EDFlib-Python.git")
+             (commit "417fc8cc7c47a9b0e39189b34de1fc50be65b72d")))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0h3v5kb4yn1ahb7gxb8qrh1m50w1ykb4px4yvvq64kbckn0qrd22"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-tests
+            (lambda _
+              (substitute* "tests/edf_unit_test.py"
+                (("from edfreader") "from EDFlib.edfreader")
+                (("from edfwriter") "from EDFlib.edfwriter"))))
+          ;; XXX: PEP 517 manual build copied from python-isort.
+          (replace 'build
+            (lambda _
+              (setenv "SOURCE_DATE_EPOCH" "315532800")
+              (invoke "python"
+                      "-m"
+                      "build"
+                      "--wheel"
+                      "--no-isolation"
+                      ".")))
+          (replace 'install
+            (lambda _
+              (let ((whl (car (find-files "dist" "\\.whl$"))))
+                (invoke "pip"
+                        "--no-cache-dir"
+                        "--no-input"
+                        "install"
+                        "--no-deps"
+                        "--prefix"
+                        #$output
+                        whl))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke "python" "tests/edf_unit_test.py")))))))
+    (propagated-inputs (list python-numpy python-pypa-build))
+    (home-page "https://www.teuniz.net/edflib_python/")
+    (synopsis "Read and write EDF+/BDF+ files")
+    (description
+     "EDFlib for Python is a programming library to read and write EDF+ and
+BDF+ files.  It also reads old-type EDF/BDF files.  @dfn{EDF} means
+@url{https://www.teuniz.net/edfbrowser/edf%20format%20description.html,
+European Data Format}.  @dfn{BDF} is the
+@url{https://www.teuniz.net/edfbrowser/bdfplus%20format%20description.html,
+24-bit version} of EDF.")
+    (license license:bsd-3)))
-- 
2.34.0


[-- Attachment #1.4: v5-0003-gnu-Add-python-eeglabio.patch --]
[-- Type: text/x-patch, Size: 1616 bytes --]

From e395de5a3d24dc092388f293ceffb035d5f84e65 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 17:17:11 +0100
Subject: [PATCH v5 03/32] gnu: Add python-eeglabio.

* gnu/packages/python-science.scm (python-eeglabio): 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 c73802103d..78c84f4fe6 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1080,3 +1080,27 @@ (define-public python-edflib
 @url{https://www.teuniz.net/edfbrowser/bdfplus%20format%20description.html,
 24-bit version} of EDF.")
     (license license:bsd-3)))
+
+(define-public python-eeglabio
+  (package
+    (name "python-eeglabio")
+    (version "0.0.1.post6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/jackz314/eeglabio")
+             (commit "5416e8f2bc82da60ee729458cf325bec66d9774a")))
+       (sha256
+        (base32
+         "0zpb1xcvm4wzli2gfly7hr0486cnr8pl7f70dh58jmh4nj87z6i7"))))
+    (build-system python-build-system)
+    (arguments
+     `(;; Tests require MNE
+       #:tests? #f))
+    (propagated-inputs (list python-numpy python-scipy))
+    (native-inputs (list python-pytest))
+    (home-page "https://github.com/jackz314/eeglabio")
+    (synopsis "I/O support for EEGLAB files in Python")
+    (description "This project provides I/O support for EEGLAB files in Python.")
+    (license license:bsd-3)))
-- 
2.34.0


[-- Attachment #1.5: v5-0004-gnu-Add-python-nibabel.patch --]
[-- Type: text/x-patch, Size: 3372 bytes --]

From 4664ed84217ecc5d4a13b43f13224613eed4529d Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 17:38:47 +0100
Subject: [PATCH v5 04/32] gnu: Add python-nibabel.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 78c84f4fe6..c659b004ed 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -55,6 +55,7 @@ (define-module (gnu packages python-science)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages statistics)
   #:use-module (gnu packages time)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -1104,3 +1105,53 @@ (define-public python-eeglabio
     (synopsis "I/O support for EEGLAB files in Python")
     (description "This project provides I/O support for EEGLAB files in Python.")
     (license license:bsd-3)))
+
+(define-public python-nibabel
+  (package
+    (name "python-nibabel")
+    (version "3.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "nibabel" version))
+       (sha256
+        (base32
+         "17n23w7y0hiz2vma5si7wy184d59bp14zd8nr6hi203ldd1gjbsd"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "python" "-m" "pytest" "--pyargs" "nibabel")))))))
+    (propagated-inputs (list python-numpy python-packaging))
+    (native-inputs (list python-coverage
+                         python-gitpython
+                         python-pytest
+                         python-pytest-cov
+                         python-pytest-doctestplus
+                         python-twine))
+    (home-page "https://nipy.org/nibabel/")
+    (synopsis "Access a multitude of neuroimaging data formats")
+    (description
+     "This package provides read +/- write access to some common
+medical and neuroimaging file formats, including:
+@url{http://www.grahamwideman.com/gw/brain/analyze/formatdoc.htm,
+ANALYZE} (plain, SPM99, SPM2 and later),
+@url{https://www.nitrc.org/projects/gifti, GIFTI},
+@url{http://nifti.nimh.nih.gov/nifti-1/, NIfTI1},
+@url{http://nifti.nimh.nih.gov/nifti-2/, NIfTI2},
+@url{https://www.nitrc.org/projects/cifti/, CIFTI-2},
+@url{https://en.wikibooks.org/wiki/MINC/Reference/MINC1_File_Format_Reference,
+MINC1},
+@url{https://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_File_Format_Reference,
+MINC2}, @url{https://afni.nimh.nih.gov/pub/dist/src/README.attributes, AFNI
+BRIK/HEAD},
+@url{https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/MghFormat, MGH} and
+@url{http://xmedcon.sourceforge.net/Docs/Ecat, ECAT} as well as Philips
+PAR/REC.  We can read and write @url{https://surfer.nmr.mgh.harvard.edu/,
+FreeSurfer} geometry, annotation and morphometry files.  There is some very
+limited support for @url{http://medical.nema.org/, DICOM}.  NiBabel is the
+successor of @url{http://niftilib.sourceforge.net/pynifti/, PyNIfTI}.")
+    (license license:expat)))
-- 
2.34.0


[-- Attachment #1.6: v5-0005-gnu-Add-python-nitime.patch --]
[-- Type: text/x-patch, Size: 2122 bytes --]

From ff4b01a3621a7c55cdca4431dc7497f2d644164b Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 19:12:02 +0100
Subject: [PATCH v5 05/32] gnu: Add python-nitime.

* gnu/packages/python-science.scm (python-nitime): 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 c659b004ed..35b58cba88 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1155,3 +1155,37 @@ (define-public python-nibabel
 limited support for @url{http://medical.nema.org/, DICOM}.  NiBabel is the
 successor of @url{http://niftilib.sourceforge.net/pynifti/, PyNIfTI}.")
     (license license:expat)))
+
+(define-public python-nitime
+  (package
+    (name "python-nitime")
+    (version "0.9")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "nitime" version))
+       (sha256
+        (base32
+         "0x1q6ka8i330yhp5h0h6igfs2gp5dndiybyfkdi45a8zpfnr0zbf"))))
+    (build-system python-build-system)
+    (propagated-inputs (list python-matplotlib python-networkx python-nibabel
+                             python-numpy python-scipy))
+    (native-inputs (list python-cython python-pytest))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'delete-generated-cython
+           (lambda _
+             (delete-file "nitime/_utils.c")))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "pytest" "-vv" "nitime")))))))
+    (home-page "http://nipy.org/nitime/")
+    (synopsis "Nitime: timeseries analysis for neuroscience data")
+    (description
+     "Nitime contains a core of numerical algorithms for time-series analysis
+both in the time and spectral domains, a set of container objects to represent
+time-series, and auxiliary objects that expose a high level interface to the
+numerical machinery.")
+    (license license:bsd-3)))
-- 
2.34.0


[-- Attachment #1.7: v5-0006-gnu-Add-python-flake8-array-spacing.patch --]
[-- Type: text/x-patch, Size: 1769 bytes --]

From d7f494cc61618f6f18b8ef0ad254aad57e03a24e Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 19:20:06 +0100
Subject: [PATCH v5 06/32] gnu: Add python-flake8-array-spacing.

* gnu/packages/python-science.scm (python-flake8-array-spacing): 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 4c932858c0..4eef3ef72d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25467,6 +25467,32 @@ (define-public python-imageio-ffmpeg
 for working with video files.")
     (license license:bsd-2)))
 
+(define-public python-flake8-array-spacing
+  (package
+    (name "python-flake8-array-spacing")
+    (version "0.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "flake8_array_spacing" version))
+       (sha256
+        (base32 "0nyp2x45hg5dkdrn0j2wcd336dnx6csizpfq5fwbk774wrb0lh6d"))))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "python" "-m" "pytest")))))))
+    (native-inputs (list python-pytest))
+    (build-system python-build-system)
+    (propagated-inputs (list python-flake8 python-pycodestyle))
+    (home-page "https://github.com/larsoner/flake8-array-spacing")
+    (synopsis "flake8 plugin to make exceptions for array-like variables")
+    (description "Recast some E2XX errors as A2XX with exceptions for
+array-like variables.")
+    (license license:bsd-3)))
+
 (define-public python-frozendict
   (package
     (name "python-frozendict")
-- 
2.34.0


[-- Attachment #1.8: v5-0007-gnu-Add-python-makefun.patch --]
[-- Type: text/x-patch, Size: 1606 bytes --]

From 53e4ec38127b28d400e29f5e202ac6166d199f5c Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 21:17:39 +0100
Subject: [PATCH v5 07/32] gnu: Add python-makefun.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4eef3ef72d..ce5abfe3d8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25493,6 +25493,28 @@ (define-public python-flake8-array-spacing
 array-like variables.")
     (license license:bsd-3)))
 
+(define-public python-makefun
+  (package
+    (name "python-makefun")
+    (version "1.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "makefun" version))
+       (sha256
+        (base32
+         "1gqnqvwzig9ym4nyzwy6dzra7sg6339rdaca59fvkfzzf2vbhnwq"))))
+    (build-system python-build-system)
+    (native-inputs (list python-pytest python-pytest-runner
+                         python-setuptools-scm))
+    (home-page "https://github.com/smarie/python-makefun")
+    (synopsis "Small library to dynamically create python functions")
+    (description
+     "@samp{makefun} helps you create functions dynamically, with the
+signature of your choice.  It was largely inspired by @samp{decorator} and
+@samp{functools}, and created mainly to cover some of their limitations.")
+    (license license:bsd-3)))
+
 (define-public python-frozendict
   (package
     (name "python-frozendict")
-- 
2.34.0


[-- Attachment #1.9: v5-0008-gnu-Add-python-pytest-logging.patch --]
[-- Type: text/x-patch, Size: 1617 bytes --]

From 47106519ddc6cfc4afca59099729a831f08f1626 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 22:32:09 +0100
Subject: [PATCH v5 08/32] gnu: Add python-pytest-logging.

* gnu/packages/python-check.scm (python-pytest-logging): New variable.
---
 gnu/packages/python-check.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 05a378601f..547813cce7 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -1978,6 +1978,31 @@ (define-public python-pytest-rerunfailures
 eliminate flaky failures.")
     (license license:mpl2.0)))
 
+(define-public python-pytest-logging
+  (package
+    (name "python-pytest-logging")
+    (version "2015.11.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-logging" version))
+       (sha256
+        (base32
+         "15n8fyxvvwmk982vj0m9yl76hn7pp4qqljfmxarbgahqrxgciiff"))))
+    (build-system python-build-system)
+    (arguments
+     `(;; The tests are not present in the pypi source, and they all fail if
+       ;; building from git
+       #:tests? #f))
+    (propagated-inputs (list python-pytest))
+    (home-page "https://github.com/saltstack/pytest-logging")
+    (synopsis
+     "Logging with a @code{py.test} flag")
+    (description
+     "This package configures logging and allows tweaking the log level with a
+@code{py.test} flag.")
+    (license license:asl2.0)))
+
 (define-public python-xunitparser
   (package
     (name "python-xunitparser")
-- 
2.34.0


[-- Attachment #1.10: v5-0009-gnu-Add-a-test-less-python-decopatch.patch --]
[-- Type: text/x-patch, Size: 2002 bytes --]

From b6930f090a5cc967b70ee01979a25dc5ed81c23e Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 22:32:53 +0100
Subject: [PATCH v5 09/32] gnu: Add a test-less python-decopatch.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ce5abfe3d8..8b00054a12 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25515,6 +25515,36 @@ (define-public python-makefun
 @samp{functools}, and created mainly to cover some of their limitations.")
     (license license:bsd-3)))
 
+;; decopatch requires the next pytest modules if tests are enabled. The pytest
+;; modules require each other for tests.
+
+(define python-decopatch-minimal
+  (package
+    (name "python-decopatch-minimal")
+    (version "1.4.8")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "decopatch" version))
+       (sha256
+        (base32
+         "0i6i811s2j1z0cl6y177dwsbfxib8dvb5c2jpgklvc2xy4ahhsy6"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f))
+    (propagated-inputs (list python-makefun))
+    (native-inputs (list python-pytest python-pytest-runner
+                         python-setuptools-scm))
+    (home-page "https://github.com/smarie/python-decopatch")
+    (synopsis "Python decorators made easy")
+    (description
+     "Because of a tiny oddity in the python language, writing decorators
+without help can be a pain because you have to handle the no-parenthesis usage
+@url{https://smarie.github.io/python-decopatch/motivation, explicitly}.
+@samp{decopatch} provides a simple way to solve this issue so that writing
+decorators is simple and straightforward.")
+    (license license:bsd-3)))
+
 (define-public python-frozendict
   (package
     (name "python-frozendict")
-- 
2.34.0


[-- Attachment #1.11: v5-0010-gnu-Add-a-test-less-python-pytest-harvest.patch --]
[-- Type: text/x-patch, Size: 1778 bytes --]

From 0ee756d0a329021ff9c62c8ef8b83c2a6873f54e Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 22:33:32 +0100
Subject: [PATCH v5 10/32] gnu: Add a test-less python-pytest-harvest.

* gnu/packages/python-xyz.scm (python-pytest-harvest-minimal): New variable.
---
 gnu/packages/python-xyz.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 8b00054a12..bb24d3b40a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25545,6 +25545,31 @@ (define python-decopatch-minimal
 decorators is simple and straightforward.")
     (license license:bsd-3)))
 
+(define python-pytest-harvest-minimal
+  (package
+    (name "python-pytest-harvest-minimal")
+    (version "1.10.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-harvest" version))
+       (sha256
+        (base32
+         "092drlh96rhikwqqyfpwqhkzfzd7z8m5gbmjgky8npm81849jbsk"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f))
+    (propagated-inputs (list python-decopatch-minimal python-makefun
+                             python-six))
+    (native-inputs (list python-pytest python-pytest-runner
+                         python-setuptools-scm))
+    (home-page "https://github.com/smarie/python-pytest-harvest")
+    (synopsis "Store data created during your @samp{pytest} tests execution")
+    (description
+     "Store data created during your pytest tests execution, and retrieve it
+at the end of the session, e.g. for applicative benchmarking purposes.")
+    (license license:bsd-3)))
+
 (define-public python-frozendict
   (package
     (name "python-frozendict")
-- 
2.34.0


[-- Attachment #1.12: v5-0011-gnu-Add-a-test-less-python-pytest-steps.patch --]
[-- Type: text/x-patch, Size: 1718 bytes --]

From 0cb2189ae6f472d01c6beffde069e52314d6f08d Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 22:34:06 +0100
Subject: [PATCH v5 11/32] gnu: Add a test-less python-pytest-steps.

* gnu/packages/python-xyz.scm (python-pytest-steps-minimal): New variable.
---
 gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index bb24d3b40a..37f1166f06 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25570,6 +25570,30 @@ (define python-pytest-harvest-minimal
 at the end of the session, e.g. for applicative benchmarking purposes.")
     (license license:bsd-3)))
 
+(define python-pytest-steps-minimal
+  (package
+    (name "python-pytest-steps-minimal")
+    (version "1.8.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-steps" version))
+       (sha256
+        (base32
+         "05r2ch7191saj7sw6d47bfa5vnyyj157dl8hvlcc78xx6jyxy46j"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f))
+    (propagated-inputs (list python-makefun python-wrapt python-tabulate
+                             python-pandas))
+    (native-inputs (list python-pytest python-pytest-runner
+                         python-setuptools-scm))
+    (home-page "https://github.com/smarie/python-pytest-steps")
+    (synopsis "Create step-wise / incremental tests in pytest")
+    (description "This package provides support for step-wise / incremental
+tests in pytest.")
+    (license license:bsd-3)))
+
 (define-public python-frozendict
   (package
     (name "python-frozendict")
-- 
2.34.0


[-- Attachment #1.13: v5-0012-gnu-Add-a-test-less-python-pytest-cases.patch --]
[-- Type: text/x-patch, Size: 2233 bytes --]

From 851b8c8c42a520d86a61c9d43172a6f42066c17a Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 22:34:36 +0100
Subject: [PATCH v5 12/32] gnu: Add a test-less python-pytest-cases.

* gnu/packages/python-xyz.scm (python-pytest-cases-minimal): New variable.
---
 gnu/packages/python-xyz.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 37f1166f06..48c1fa1382 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25594,6 +25594,38 @@ (define python-pytest-steps-minimal
 tests in pytest.")
     (license license:bsd-3)))
 
+(define python-pytest-cases-minimal
+  (package
+    (name "python-pytest-cases-minimal")
+    (version "3.6.8")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-cases" version))
+       (sha256
+        (base32
+         "1g3lp4m19fk83kl2b4akwg7wqqaqlfzp4v6qcb0hq27161xyh8yl"))))
+    (build-system python-build-system)
+    (propagated-inputs (list python-decopatch-minimal python-makefun))
+    (native-inputs (list python-pytest
+                         python-pytest-runner
+                         python-setuptools-scm
+                         python-pytest-asyncio
+                         python-pytest-harvest-minimal
+                         python-pytest-steps-minimal))
+    (home-page "https://github.com/smarie/python-pytest-cases")
+    (synopsis "Separate test code from test cases in @samp{pytest}")
+    (description
+     "@samp{pytest-cases} leverages @samp{pytest} and its great
+@samp{@@pytest.mark.parametrize decorator}, so that you can @strong{separate
+your test cases from your test functions}.  In addition, @samp{pytest-cases}
+provides several useful goodies to empower @samp{pytest}.  In particular it
+improves the fixture mechanism to support \"fixture unions\".  This is a
+@strong{major change} in the internal @samp{pytest} engine, unlocking many
+possibilities such as using fixture references as parameter values in a test
+function.")
+    (license license:bsd-3)))
+
 (define-public python-frozendict
   (package
     (name "python-frozendict")
-- 
2.34.0


[-- Attachment #1.14: v5-0013-gnu-Add-python-decopatch.patch --]
[-- Type: text/x-patch, Size: 1682 bytes --]

From b8e12bc83ebf1cbeef1e5c4aefeaf028522068bf Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 22:35:02 +0100
Subject: [PATCH v5 13/32] gnu: Add python-decopatch.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 48c1fa1382..57e2b7ed6f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25626,6 +25626,28 @@ (define python-pytest-cases-minimal
 function.")
     (license license:bsd-3)))
 
+(define-public python-decopatch
+  (package
+    (inherit python-decopatch-minimal)
+    (name "python-decopatch")
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'disable-failing-tests
+           (lambda _
+             (delete-file "decopatch/tests/test_main2.py")
+             (delete-file
+              "decopatch/tests/test_main2_parametrizers.py")
+             (delete-file "decopatch/tests/test_introspection.py")
+             (delete-file
+              "decopatch/tests/test_introspection_base.py")
+             (substitute* "decopatch/tests/test_doc_advanced.py"
+               (("'uses_introspection', \\[True, False\\]")
+                "'uses_introspection', [False]")))))))
+    (native-inputs (list python-pytest python-pytest-runner
+                         python-pytest-cases-minimal python-setuptools-scm
+                         python-pytest-logging))))
+
 (define-public python-frozendict
   (package
     (name "python-frozendict")
-- 
2.34.0


[-- Attachment #1.15: v5-0014-gnu-Add-python-pytest-cases.patch --]
[-- Type: text/x-patch, Size: 1092 bytes --]

From 8d5a24486cfc85c4461a9338fdca53aaa09dde11 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 22:35:28 +0100
Subject: [PATCH v5 14/32] gnu: Add python-pytest-cases.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 57e2b7ed6f..15d8ffecbf 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25648,6 +25648,14 @@ (define-public python-decopatch
                          python-pytest-cases-minimal python-setuptools-scm
                          python-pytest-logging))))
 
+(define-public python-pytest-cases
+  (package
+    (inherit python-pytest-cases-minimal)
+    (name "python-pytest-cases")
+    (arguments '())
+    ;; Propagate the tested decopatch instead of decopatch-minimal
+    (propagated-inputs (list python-decopatch python-makefun))))
+
 (define-public python-frozendict
   (package
     (name "python-frozendict")
-- 
2.34.0


[-- Attachment #1.16: v5-0015-gnu-Add-python-pytest-harvest.patch --]
[-- Type: text/x-patch, Size: 1566 bytes --]

From 389e25d12d533395a95ca163a1a26cb20b123fce Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 22:35:49 +0100
Subject: [PATCH v5 15/32] gnu: Add python-pytest-harvest.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 15d8ffecbf..142e5b257e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25656,6 +25656,25 @@ (define-public python-pytest-cases
     ;; Propagate the tested decopatch instead of decopatch-minimal
     (propagated-inputs (list python-decopatch python-makefun))))
 
+(define-public python-pytest-harvest
+  (package
+    (inherit python-pytest-harvest-minimal)
+    (name "python-pytest-harvest")
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'move-pytests-plugins
+           (lambda _
+             (rename-file "pytest_harvest/tests/conftest.py"
+                          "conftest.py"))))))
+    (native-inputs (list python-pytest
+                         python-pytest-runner
+                         python-setuptools-scm
+                         python-pytest-cases
+                         python-tabulate
+                         python-pandas))
+    (propagated-inputs (list python-decopatch python-makefun python-six))))
+
 (define-public python-frozendict
   (package
     (name "python-frozendict")
-- 
2.34.0


[-- Attachment #1.17: v5-0016-gnu-Add-python-pytest-steps.patch --]
[-- Type: text/x-patch, Size: 1376 bytes --]

From a1bd2b4767e5b9657321bed9d066d16999d03d30 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 22:36:06 +0100
Subject: [PATCH v5 16/32] gnu: Add python-pytest-steps.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 142e5b257e..9cf50af34b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25675,6 +25675,21 @@ (define-public python-pytest-harvest
                          python-pandas))
     (propagated-inputs (list python-decopatch python-makefun python-six))))
 
+(define-public python-pytest-steps
+  (package
+    (inherit python-pytest-steps-minimal)
+    (name "python-pytest-steps")
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'move-pytests-plugins
+           (lambda _
+             (rename-file "pytest_steps/tests/conftest.py"
+                          "conftest.py"))))))
+    (native-inputs (list python-pytest python-pytest-runner
+                         python-setuptools-scm python-pytest-cases
+                         python-pytest-harvest))))
+
 (define-public python-frozendict
   (package
     (name "python-frozendict")
-- 
2.34.0


[-- Attachment #1.18: v5-0017-gnu-python-pooch-Update-to-1.6.0.patch --]
[-- Type: text/x-patch, Size: 2337 bytes --]

From 124e340619389c948549d71a96df7d583780ef8e Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 23:00:37 +0100
Subject: [PATCH v5 17/32] gnu: python-pooch: Update to 1.6.0.

* gnu/packages/python-xyz.scm (python-pooch): Update to 1.6.0.
[native-inputs]: Add python-setuptools-scm.
---
 gnu/packages/python-xyz.scm | 32 +++++++++++++++++++++++++++++---
 1 file changed, 29 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9cf50af34b..117f21df4b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -22275,18 +22275,44 @@ (define-public pybind11
 (define-public python-pooch
   (package
     (name "python-pooch")
-    (version "1.3.0")
+    (version "1.6.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pooch" version))
        (sha256
-        (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
+        (base32 "0i1zmd0v7n3yx167j18ldidfiih9n734pdjvn3999mhdn720xljp"))))
     (build-system python-build-system)
     (arguments
-     `(#:tests? #f)) ;requires online data
+     (list
+      #:tests? #f ;requires online data
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; XXX: PEP 517 manual build copied from python-isort.
+          (replace 'build
+            (lambda _
+              (setenv "SOURCE_DATE_EPOCH" "315532800")
+              (invoke "python"
+                      "-m"
+                      "build"
+                      "--wheel"
+                      "--no-isolation"
+                      ".")))
+          (replace 'install
+            (lambda _
+              (let ((whl (car (find-files "dist" "\\.whl$"))))
+                (invoke "pip"
+                        "--no-cache-dir"
+                        "--no-input"
+                        "install"
+                        "--no-deps"
+                        "--prefix"
+                        #$output
+                        whl)))))))
     (propagated-inputs
      (list python-appdirs python-packaging python-requests))
+    (native-inputs
+     (list python-pypa-build python-setuptools-scm))
     (home-page "https://github.com/fatiando/pooch")
     (synopsis "Manage your Python library's sample data files")
     (description
-- 
2.34.0


[-- Attachment #1.19: v5-0018-gnu-Add-python-h5io.patch --]
[-- Type: text/x-patch, Size: 1866 bytes --]

From 08fdf72b7b52767c83a3052badd77df9a654f91d Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 6 Feb 2022 22:36:44 +0100
Subject: [PATCH v5 18/32] gnu: Add python-h5io.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 117f21df4b..732842afa4 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1372,6 +1372,36 @@ (define-public python-h5py
 (define-public python2-h5py
   (package-with-python2 python-h5py))
 
+(define-public python-h5io
+  (package
+    (name "python-h5io")
+    (version "0.1.7")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/h5io/h5io")
+             (commit (string-append "h5io-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0mxsai8i7br20cqnydagng814g2hwhaq4aprsq2d4kmvff45s3az"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "pytest" "-vv" "h5io")))))))
+    (propagated-inputs (list python-h5py python-numpy python-scipy))
+    (native-inputs (list python-pytest python-pytest-cov))
+    (home-page "http://h5io.github.io")
+    (synopsis "Python Objects Onto HDF5")
+    (description "h5io is a package designed to facilitate saving some
+standard Python objects into the forward-compatible HDF5 format. It is a
+higher-level package than h5py.")
+    (license license:bsd-3)))
+
 (define-public python-hnswlib
   (package
     (name "python-hnswlib")
-- 
2.34.0


[-- Attachment #1.20: v5-0019-gnu-Add-python-pymatreader.patch --]
[-- Type: text/x-patch, Size: 2190 bytes --]

From 423dbf36d3ae2e7fef5e84a88bb9d0dc2dcad017 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 6 Feb 2022 22:53:44 +0100
Subject: [PATCH v5 19/32] gnu: Add python-pymatreader.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 732842afa4..91b8e0cc75 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1402,6 +1402,44 @@ (define-public python-h5io
 higher-level package than h5py.")
     (license license:bsd-3)))
 
+(define-public python-pymatreader
+  (package
+    (name "python-pymatreader")
+    (version "0.0.29")
+    (source
+      (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/obob/pymatreader.git/")
+             (commit "9ba9ddf53e367a86e14011553e949b666c564272")))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0r98907c2qfaqqh7cn200s5hqblvmpdbr3wbq1jasbm9nkzlligm"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "pytest" "-vv")))))))
+    (propagated-inputs
+      (list python-future
+            python-h5py
+            python-numpy
+            python-scipy
+            python-xmltodict))
+    (native-inputs
+     (list python-pytest python-pytest-cov python-sphinx
+           python-sphinx-autobuild python-tox python-wheel
+           python-coverage python-flake8 python-codecov))
+    (home-page "https://gitlab.com/obob/pymatreader")
+    (synopsis "Convenient reader for Matlab mat files")
+    (description "This is a Python module to read Matlab files. It works with
+both the old (< 7.3) and the new (>= 7.3) HDF5 based format. The output should
+be the same for both kinds of files.")
+    (license license:bsd-2)))
+
 (define-public python-hnswlib
   (package
     (name "python-hnswlib")
-- 
2.34.0


[-- Attachment #1.21: v5-0020-gnu-Add-python-picard.patch --]
[-- Type: text/x-patch, Size: 1756 bytes --]

From 01faf2df12fd4d239e8adb2cdae2802cdf36c391 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 6 Feb 2022 23:03:05 +0100
Subject: [PATCH v5 20/32] gnu: Add python-picard.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 35b58cba88..fc6870b5df 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1189,3 +1189,32 @@ (define-public python-nitime
 time-series, and auxiliary objects that expose a high level interface to the
 numerical machinery.")
     (license license:bsd-3)))
+
+(define-public python-picard
+  (package
+    (name "python-picard")
+    (version "0.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-picard" version))
+       (sha256
+        (base32 "19w5s77jfyy6h4h7iv639blfdil40ayz1whpfrdq0336qkqa2qc0"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "pytest" "-vv" "picard")))))))
+    (propagated-inputs
+     (list python-numexpr python-numpy python-scikit-learn python-scipy
+           python-matplotlib))
+    (native-inputs
+     (list python-pytest))
+    (home-page "https://pierreablin.github.io/picard")
+    (synopsis "Preconditoned ICA for Real Data")
+    (description "This package provides Python code of the Preconditioned ICA
+for Real Data (Picard) and Picard-O algorithms.")
+    (license license:bsd-3)))
-- 
2.34.0


[-- Attachment #1.22: v5-0021-gnu-Add-python-dipy.patch --]
[-- Type: text/x-patch, Size: 2152 bytes --]

From 43462244b6c7be6c48dde6e0be47e3ed2b4da526 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 6 Feb 2022 23:16:28 +0100
Subject: [PATCH v5 21/32] gnu: Add python-dipy.

* gnu/packages/python-science.scm (python-dipy): 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 fc6870b5df..0c4551ad21 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1218,3 +1218,37 @@ (define-public python-picard
     (description "This package provides Python code of the Preconditioned ICA
 for Real Data (Picard) and Picard-O algorithms.")
     (license license:bsd-3)))
+
+(define-public python-dipy
+  (package
+    (name "python-dipy")
+    (version "1.4.1")
+    (source
+     (origin
+       ;; Use git to avoid cythonized files
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/dipy/dipy")
+             (commit version)))
+       (sha256
+        (base32
+         "031fpl1r035pm9bxi5yr87nmwj5vaj6a983d6sibz0v95hxvnv02"))))
+    (build-system python-build-system)
+    (arguments
+     ;; FIXME: Tests won’t run with error messages like this:
+     ;; E ImportError: cannot import name 'vector_fields' from partially
+     ;; initialized module 'dipy.align' (most likely due to a circular import)
+     `(#:tests? #f))
+    (propagated-inputs
+     (list python-numpy python-scipy python-nibabel python-h5py
+           python-packaging python-tqdm))
+    (native-inputs
+     (list python-pytest python-cython))
+    (home-page "https://dipy.org")
+    (synopsis "Diffusion MRI utilities in python")
+    (description "DIPY is a 3D/4D+ imaging library in Python. It contains
+generic methods for spatial normalization, signal processing, machine
+learning, statistical analysis and visualization of medical images.
+Additionally, it contains specialized methods for computational anatomy
+including diffusion, perfusion and structural imaging.")
+    (license license:bsd-3)))
-- 
2.34.0


[-- Attachment #1.23: v5-0022-gnu-Add-python-no-version.patch --]
[-- Type: text/x-patch, Size: 1387 bytes --]

From 40a26e37a68660db11fe0ff31ae7ffc5283f77e5 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Mon, 7 Feb 2022 00:20:22 +0100
Subject: [PATCH v5 22/32] gnu: Add python-no-version.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 91b8e0cc75..e6ce5ee26e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25784,6 +25784,23 @@ (define-public python-pytest-steps
                          python-setuptools-scm python-pytest-cases
                          python-pytest-harvest))))
 
+(define-public python-no-version
+  (package
+    (name "python-no-version")
+    (version "0.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "no_version" version))
+       (sha256
+        (base32 "1y58fkwg4s96hbz3hnqj2nd8a0pimrmpk4ry1z5pwzxlyx0k66rf"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/prisae/no_version")
+    (synopsis "Package without __version__ number.")
+    (description "This package demonstrates an example of a package without a
+__version__ number.")
+    (license license:cc0)))
+
 (define-public python-frozendict
   (package
     (name "python-frozendict")
-- 
2.34.0


[-- Attachment #1.24: v5-0023-gnu-Add-python-pyperf.patch --]
[-- Type: text/x-patch, Size: 1718 bytes --]

From 5a635a8b7f4f6b9044be45aa602d1d6539d73364 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Mon, 7 Feb 2022 00:50:47 +0100
Subject: [PATCH v5 23/32] gnu: Add python-pyperf.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e6ce5ee26e..8786130d92 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25801,6 +25801,34 @@ (define-public python-no-version
 __version__ number.")
     (license license:cc0)))
 
+(define-public python-pyperf
+  (package
+    (name "python-pyperf")
+    (version "2.3.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pyperf" version))
+       (sha256
+        (base32 "189qf9wdbig0fk4n3bavx8acgdbay5lllfvw48jvbfaafb7y5hja"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'disable-failing-test
+           (lambda _
+             (delete-file "pyperf/tests/test_examples.py")))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "python" "-m" "pytest")))))))
+    (native-inputs
+     (list python-pytest))
+    (home-page "https://github.com/psf/pyperf")
+    (synopsis "Python module to run and analyze benchmarks.")
+    (description "This package provides a python module to run and analyze benchmarks.")
+    (license license:expat)))
+
 (define-public python-frozendict
   (package
     (name "python-frozendict")
-- 
2.34.0


[-- Attachment #1.25: v5-0024-gnu-Add-python-pyvips.patch --]
[-- Type: text/x-patch, Size: 3122 bytes --]

From 3d3114cfad2addd740aa30260cf300d2831e1a8a Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Mon, 7 Feb 2022 00:36:00 +0100
Subject: [PATCH v5 24/32] gnu: Add python-pyvips.

* gnu/packages/python-science.scm (python-pyvips): New variable.
---
 gnu/packages/image-processing.scm | 48 +++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 272f400f67..00c8db7f34 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -19,6 +19,7 @@
 ;;; Copyright © 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
+;;; Copyright © 2022 Vivien Kraus <vivien@planete-kraus.eu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -69,6 +70,7 @@ (define-module (gnu packages image-processing)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
+  #:use-module (gnu packages libffi)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages perl)
@@ -633,6 +635,52 @@ (define-public vips
 due to its architecture which automatically parallelises the image workflows.")
     (license license:lgpl2.1+)))
 
+(define-public python-pyvips
+  (package
+    (name "python-pyvips")
+    (version "2.1.16")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pyvips" version))
+       (sha256
+        (base32 "1vc1k8adldwf5is5gj6ihg4gxa15ypkfr8h7d1w4dy0m980h6k35"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'set-pkgconfigpath
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((path
+                    (list->search-path-as-string
+                     (search-path-as-list
+                      '("lib/pkgconfig" "share/pkgconfig")
+                      (map cdr inputs))
+                     ":")))
+               (substitute* "pyvips/pyvips_build.py"
+                 (("import pkgconfig")
+                  (format #f
+                          "\
+import os
+os.environ['PKG_CONFIG_PATH'] = '~a'
+import pkgconfig"
+                          path)))))))))
+    (propagated-inputs
+     (list python-cffi python-pkgconfig))
+    (inputs (list vips expat glib libgsf fftw imagemagick orc lcms openexr
+                  imath poppler cairo librsvg matio libwebp pango libtiff
+                  libjpeg-turbo libexif))
+    (native-inputs
+     (list python-cffi
+           python-pyperf
+           python-pytest
+           python-pytest-flake8
+           python-pytest-runner))
+    (home-page "https://github.com/libvips/pyvips")
+    (synopsis "Binding for the libvips image processing library using cffi.")
+    (description "This package provides python bindings to libvips.")
+    (license license:expat)))
+
 (define-public gmic
   (package
     (name "gmic")
-- 
2.34.0


[-- Attachment #1.26: v5-0025-gnu-Add-python-scooby.patch --]
[-- Type: text/x-patch, Size: 2738 bytes --]

From 4a17f2a712e31036d36023c77725381da776efe5 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Mon, 7 Feb 2022 00:08:40 +0100
Subject: [PATCH v5 25/32] gnu: Add python-scooby.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 0c4551ad21..6a6924eac6 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1252,3 +1252,48 @@ (define-public python-dipy
 Additionally, it contains specialized methods for computational anatomy
 including diffusion, perfusion and structural imaging.")
     (license license:bsd-3)))
+
+(define-public python-scooby
+  (package
+    ;; Because of its dependencies, it must be in this module.
+    (name "python-scooby")
+    (version "0.5.11")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/banesullivan/scooby")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32
+         "13kzhh90wcrfg771s1x88smq3752i1r68jd514scdr7q3fy9ac5m"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-import-test
+           (lambda _
+             ;; This package has a test named test_import_error. This test is
+             ;; supposed to require a random complex package to ensure that an
+             ;; error is raised. If pyvips ends up in the dependency graph,
+             ;; pick another one.
+             (substitute* "tests/test_scooby.py"
+               (("with pytest.raises\\(OSError\\):")
+                "with pytest.raises(ModuleNotFoundError):"))))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "python" "-m" "pytest")))))))
+    (propagated-inputs (list python-psutil))
+    (native-inputs (list python-pytest python-pytest-cov python-codecov
+                         python-beautifulsoup4 python-psutil python-numpy
+                         python-scipy python-no-version
+                         ;; python-pyvips is an example package that should
+                         ;; NOT be available
+                         ))
+    (home-page "https://github.com/banesullivan/scooby")
+    (synopsis "Report your python environment’s package versions and hardware resources")
+    (description
+     "This package reports your python environment’s package versions and
+hardware resources.")
+    (license license:expat)))
-- 
2.34.0


[-- Attachment #1.27: v5-0026-gnu-Add-python-nilearn.patch --]
[-- Type: text/x-patch, Size: 2158 bytes --]

From 8bf6b4af535a4451ff147357d84b0434ecb81436 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 6 Feb 2022 23:47:47 +0100
Subject: [PATCH v5 26/32] gnu: Add python-nilearn.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 6a6924eac6..3ada23bb57 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1156,6 +1156,42 @@ (define-public python-nibabel
 successor of @url{http://niftilib.sourceforge.net/pynifti/, PyNIfTI}.")
     (license license:expat)))
 
+(define-public python-nilearn
+  (package
+    (name "python-nilearn")
+    (version "0.9.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "nilearn" version))
+        (sha256
+          (base32 "0xpy479kvcnrv9rkirisgm17iqcxd6sj8xzc1a8qj57mvq5f7j7r"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "python" "-m" "pytest" "--pyargs" "nilearn")))))))
+    (propagated-inputs
+      (list python-joblib
+            python-nibabel
+            python-numpy
+            python-pandas
+            python-requests
+            python-scikit-learn
+            python-scipy))
+    (native-inputs
+     (list python-pytest python-pytest-cov python-codecov python-lxml))
+    (home-page "https://nilearn.github.io")
+    (synopsis "Statistical learning for neuroimaging in Python")
+    (description "Nilearn supports general linear model (GLM) based analysis
+and leverages the scikit-learn Python toolbox for multivariate statistics with
+applications such as predictive modelling, classification, decoding, or
+connectivity analysis. It includes the functionality of nistats.")
+    (license license:bsd-3)))
+
 (define-public python-nitime
   (package
     (name "python-nitime")
-- 
2.34.0


[-- Attachment #1.28: v5-0027-gnu-vtk-Also-install-a-.egg-info.patch --]
[-- Type: text/x-patch, Size: 2992 bytes --]

From 968f615046bb01d8615885fd11e7fcf72ece0afc Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Fri, 11 Feb 2022 00:34:54 +0100
Subject: [PATCH v5 27/32] gnu: vtk: Also install a .egg-info.

* gnu/packages/image-processing.scm (vtk) [phase install-egg-info]: New phase.
---
 gnu/packages/image-processing.scm | 30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 00c8db7f34..6c02eb8cce 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -279,7 +279,7 @@ (define-public vtk
     (properties `((release-monitoring-url . "https://vtk.org/download/")))
     (build-system cmake-build-system)
     (arguments
-     '(#:build-type "Release"           ;Build without '-g' to save space.
+     `(#:build-type "Release"           ;Build without '-g' to save space.
        #:configure-flags '(;"-DBUILD_TESTING:BOOL=TRUE"
                            ;    ; not honored
                            "-DVTK_USE_EXTERNAL=OFF" ;; default
@@ -313,7 +313,32 @@ (define-public vtk
                (substitute* "Common/Core/vtkFloatingPointExceptions.cxx"
                  (("<fenv.h>") "<cfenv>"))
                (substitute* "Common/Core/CMakeLists.txt"
-                 (("fenv.h") "cfenv")))))
+                 (("fenv.h") "cfenv"))))
+           (add-after 'install 'install-egg-info
+             (lambda* (#:key outputs #:allow-other-keys)
+               (use-modules (ice-9 rdelim) (guix build utils))
+               (call-with-output-file "get-python-version.py"
+                 (lambda (port)
+                   (format port "import sys
+v = sys.version_info
+with open('path', 'w') as f:
+    f.write('{0}.{1}'.format(v.major, v.minor))
+" port)))
+               (invoke "python3" "get-python-version.py")
+               (let* ((python-version
+                       (call-with-input-file "path" read-line))
+                      (egg-info
+                       (format #f "~a/lib/python~a/site-packages/vtk-~a-py~a.egg-info"
+                               (assoc-ref outputs "out")
+                               python-version ,version python-version)))
+                 (mkdir-p egg-info)
+                 (call-with-output-file (string-append egg-info "/PKG-INFO")
+                   (lambda (port)
+                     (format port "Metadata-Version: 2.1
+Name: vtk
+Version: ~a
+"
+                             ,version)))))))
        #:tests? #f))        ;XXX: test data not included
     (inputs
      `(("double-conversion" ,double-conversion)
@@ -345,6 +370,7 @@ (define-public vtk
      ;; VTK's 'VTK-vtk-module-find-packages.cmake' calls
      ;; 'find_package(THEORA)', which in turns looks for libogg.
      (list libogg))
+    (native-inputs (list python))
     (home-page "https://vtk.org/")
     (synopsis "Libraries for 3D computer graphics")
     (description
-- 
2.34.0


[-- Attachment #1.29: v5-0028-gnu-Add-python-pyvista.patch --]
[-- Type: text/x-patch, Size: 3040 bytes --]

From 5375579989300e329bdd55651145c2f75fd9741c Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Mon, 7 Feb 2022 00:17:17 +0100
Subject: [PATCH v5 28/32] gnu: Add python-pyvista.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 3ada23bb57..ee77de4272 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1333,3 +1333,59 @@ (define-public python-scooby
      "This package reports your python environment’s package versions and
 hardware resources.")
     (license license:expat)))
+
+(define-public python-pyvista
+  (package
+    (name "python-pyvista")
+    (version "0.33.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/pyvista/pyvista")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "1kvv996jm56a169gjvhqym1zxpk75hxm6mrx85jb783qi0g627ar"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'prepare-x
+           (lambda _
+             (system "Xvfb &")
+             (setenv "DISPLAY" ":0")
+             (setenv "HOME" "/tmp")))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               ;; We don’t have either trimesh nor pythreejs
+               (substitute* "tests/test_helpers.py"
+                 (("import trimesh") ""))
+               (delete-file "tests/jupyter/test_pythreejs.py")
+               ;; This test downloads data
+               (delete-file "tests/utilities/test_reader.py")
+               (invoke "python" "-m" "pytest" "--pyargs" "-k"
+                       ;; test_ensight_multi_block_io downloads data,
+                       ;; test_load_theme requires ipyvtklink, and
+                       ;; test_tinypages fails to run sphinx
+                       "not test_ensight_multi_block_io \
+                        and not test_wrap_trimesh \
+                        and not test_load_theme \
+                        and not test_tinypages")))))))
+    (propagated-inputs
+     (list python-appdirs
+           python-imageio
+           python-numpy
+           python-pillow
+           python-scooby
+           vtk))
+    (native-inputs
+     (list python-pytest python-matplotlib python-hypothesis
+           python-ipython python-meshio python-tqdm python-sphinx
+           xorg-server-for-tests))
+    (home-page "https://github.com/pyvista/pyvista")
+    (synopsis "Higher-level interface to VTK")
+    (description "PyVista is a helper module for the Visualization
+Toolkit (VTK) that wraps the VTK library through NumPy and direct array access
+through a variety of methods and classes.")
+    (license license:expat)))
-- 
2.34.0


[-- Attachment #1.30: v5-0029-gnu-Add-python-pytest-memprof.patch --]
[-- Type: text/x-patch, Size: 1554 bytes --]

From 909eebf84611ca5c2b1df8eaffdd0c0858292255 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 10 Feb 2022 20:45:25 +0100
Subject: [PATCH v5 29/32] gnu: Add python-pytest-memprof.

* gnu/packages/python-check.scm (python-pytest-memprof): New variable.
---
 gnu/packages/python-check.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 547813cce7..8b534c6245 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -2029,3 +2029,23 @@ (define-public python-xunitparser
 Python objects.  It tries to use the objects available in the standard
 @code{unittest} module.")
     (license license:expat)))
+
+(define-public python-pytest-memprof
+  (package
+    (name "python-pytest-memprof")
+    (version "0.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-memprof" version))
+       (sha256
+        (base32 "0rxg0q3bwlc9iax0skpia3a5x7xijz9i5110qk50vf9avwg9zg69"))))
+    (build-system python-build-system)
+    (arguments '(#:tests? #f)) ;; No tests, no git repository
+    (propagated-inputs (list python-psutil python-pytest))
+    ;; The gitlab repository is private, so the home page is not accessible.
+    (home-page "https://pypi.org/project/pytest-memprof/")
+    (synopsis "Estimate memory consumption of test functions")
+    (description "This pytest plugin estimates memory consumption of test
+functions.")
+    (license license:bsd-3)))
-- 
2.34.0


[-- Attachment #1.31: v5-0030-gnu-Add-python-pyvistaqt.patch --]
[-- Type: text/x-patch, Size: 2486 bytes --]

From 54a16bc91509d6bd58ff7aff11bfe64f4b30ae56 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 10 Feb 2022 20:19:49 +0100
Subject: [PATCH v5 30/32] gnu: Add python-pyvistaqt.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index ee77de4272..d04b0ef9e5 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1389,3 +1389,44 @@ (define-public python-pyvista
 Toolkit (VTK) that wraps the VTK library through NumPy and direct array access
 through a variety of methods and classes.")
     (license license:expat)))
+
+(define-public python-pyvistaqt
+  (package
+    (name "python-pyvistaqt")
+    (version "0.7.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/pyvista/pyvistaqt")
+             (commit version)))
+       (sha256
+        (base32 "19vm0kwxnn5dyiw1byi896spfzxaw39lk5bw7ff536qq1qqg3vnd"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-skipping-tests
+           (lambda _
+             (substitute* "tests/conftest.py"
+               (("NO_PLOTTING, reason=") ""))))
+         (add-before 'check 'prepare-x
+           (lambda _
+             (system "Xvfb &")
+             (setenv "DISPLAY" ":0")
+             (setenv "HOME" "/tmp")))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "python" "-m" "pytest")))))))
+    (propagated-inputs (list python-pyvista python-qtpy))
+    (native-inputs (list python-pytest python-codecov python-ipython
+                         python-numpy python-pytest-cov python-pytest-memprof
+                         python-pytest-qt python-pyvista python-qtpy
+                         python-scooby vtk xorg-server-for-tests))
+    (home-page "https://github.com/pyvista/pyvistaqt")
+    (synopsis "@code{pyvista} qt plotter")
+    (description "@code{pyvistaqt} is a helper module for pyvista to enable
+you to plot using pyqt by placing a vtk-widget into a background render.  This
+can be quite useful when you desire to update your plot in real-time.")
+    (license license:expat)))
-- 
2.34.0


[-- Attachment #1.32: v5-0031-gnu-Add-python-mffpy.patch --]
[-- Type: text/x-patch, Size: 1991 bytes --]

From fd895d50befc855627b08d2d602c8d15d3832c71 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 10 Feb 2022 20:29:00 +0100
Subject: [PATCH v5 31/32] gnu: Add python-mffpy.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index d04b0ef9e5..ea4d63d80b 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1430,3 +1430,34 @@ (define-public python-pyvistaqt
 you to plot using pyqt by placing a vtk-widget into a background render.  This
 can be quite useful when you desire to update your plot in real-time.")
     (license license:expat)))
+
+(define-public python-mffpy
+  (package
+    (name "python-mffpy")
+    (version "0.7.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/BEL-Public/mffpy")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "0mi2walqdwf9gxnw7bb3bqrrshm3xz4vss65npdq8iyynhxzf66n"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "python" "-m" "pytest" "--pyargs" "mffpy")))))))
+    (propagated-inputs (list python-deprecated python-numpy python-pytz))
+    (native-inputs
+     (list python-mypy python-pytest python-pytest-cov pre-commit
+           python-flake8))
+    (home-page "https://github.com/BEL-Public/mffpy")
+    (synopsis "Reader and Writer for Philips' MFF file format.")
+    (description "@code{mffpy} is a reader for EGI's MFF file format. These
+files are directories containing several files of mostly xml files, but also
+binary files.")
+    (license license:asl2.0)))
-- 
2.34.0


[-- Attachment #1.33: v5-0032-gnu-Add-python-mne.patch --]
[-- Type: text/x-patch, Size: 4085 bytes --]

From 22bcd7078ae3a61b816310fe545243d5f5a0c1eb Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 20 Jan 2022 23:21:25 +0100
Subject: [PATCH v5 32/32] gnu: Add python-mne.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index ea4d63d80b..bee5d034ce 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -40,6 +40,7 @@ (define-module (gnu packages python-science)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages image-processing)
+  #:use-module (gnu packages jupyter)
   #:use-module (gnu packages machine-learning)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages mpi)
@@ -51,6 +52,7 @@ (define-module (gnu packages python-science)
   #:use-module (gnu packages python-check)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages qt)
   #:use-module (gnu packages simulation)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages statistics)
@@ -1461,3 +1463,66 @@ (define-public python-mffpy
 files are directories containing several files of mostly xml files, but also
 binary files.")
     (license license:asl2.0)))
+
+(define-public python-mne
+  (package
+    (name "python-mne")
+    (version "0.24.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "mne" version))
+       (sha256
+        (base32
+         "039h0pwcvl4ywfa4ij7w6x61czd322csqr59yhzfil3a7b8gzjrq"))))
+    (build-system python-build-system)
+    (arguments
+     ;; The test data is distributed in a separate repository without a
+     ;; license, https://github.com/mne-tools/mne-testing-data
+     `(#:tests? #f))
+    (propagated-inputs (list python-numpy python-scipy
+                             python-matplotlib
+                             python-tqdm
+                             python-pooch
+                             python-decorator
+                             python-h5io
+                             python-packaging
+                             python-pymatreader
+                             python-pyqt
+                             python-pyqt5-sip
+                             python-sip
+                             python-scikit-learn
+                             python-nibabel
+                             python-numba
+                             python-h5py
+                             python-jinja2
+                             python-pandas
+                             python-numexpr
+                             jupyter
+                             python-picard
+                             python-statsmodels
+                             python-joblib
+                             python-psutil
+                             python-dipy
+                             vtk
+                             python-nilearn
+                             python-xlrd
+                             python-imageio
+                             python-imageio-ffmpeg
+                             python-traitlets
+                             python-pyvista
+                             python-pyvistaqt
+                             python-mffpy
+                             python-ipywidgets
+                             ;; FIXME: add the following dependencies:
+                             ;; python-ipyvtklink requires NPM to build
+                             ;; mne-qt-browser is not included, because it
+                             ;; depends on MNE.
+                             ))
+    (home-page "https://mne.tools/dev/")
+    (synopsis "MNE-Python project for MEG and EEG data analysis")
+    (description
+     "Open-source Python package for exploring, visualizing, and
+analyzing human neurophysiological data: MEG, EEG, sEEG, ECoG, NIRS, and
+more.")
+    (license license:bsd-3)))
-- 
2.34.0


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2022-02-11  3:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-20 22:46 [bug#53402] Add python-mne Vivien via Guix-patches via
     [not found] ` <handler.53402.B.164271885411910.ack@debbugs.gnu.org>
2022-01-21  8:17   ` [bug#53402] Add python-mne: fix or disable tests Vivien Kraus via Guix-patches via
2022-02-03 19:29 ` [bug#53402] Rebase it for the new python packages Vivien via Guix-patches via
2022-02-03 20:49   ` Vinicius Monego
2022-02-06 14:49     ` Vivien via Guix-patches via
2022-02-06 20:06       ` Vinicius Monego
2022-02-11  3:03         ` Vivien via Guix-patches via [this message]
2022-03-06 21:48           ` [bug#53402] Add python-mne Ludovic Courtès
2022-03-09 23:28             ` Vinicius Monego
2022-05-26 21:24   ` [bug#53402] Update dependencies and rebase on newer work Vivien Kraus via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=221569342c7c44d5ed2ddd1ce0e56903d3cda0b2.camel@planete-kraus.eu \
    --to=guix-patches@gnu.org \
    --cc=53402@debbugs.gnu.org \
    --cc=monego@posteo.net \
    --cc=vivien@planete-kraus.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.