all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#53402] Add python-mne
@ 2022-01-20 22:46 Vivien via Guix-patches via
       [not found] ` <handler.53402.B.164271885411910.ack@debbugs.gnu.org>
  2022-02-03 19:29 ` [bug#53402] Rebase it for the new python packages Vivien via Guix-patches via
  0 siblings, 2 replies; 10+ messages in thread
From: Vivien via Guix-patches via @ 2022-01-20 22:46 UTC (permalink / raw)
  To: 53402


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

Dear guix,

I am trying to get python-mne package [1]. So far I’ve managed to get
all the advertised dependencies, but I can’t get the tests to pass.

For python-nitime, I get IndexError: tuple index out of range

For python-mne, I get TypeError: annotate_nan() missing 1 required
positional argument: 'raw'

Both errors seem to occur because a function with optional or keyword
arguments is called without enough arguments. However, I can disable
all tests that call the function, but the error stays there.

Can someone help me?

Best regards,

Vivien


[1]: https://mne.tools/stable/index.html

[-- Attachment #1.2: 0018-gnu-Add-python-mne.patch --]
[-- Type: text/x-patch, Size: 2847 bytes --]

From fd3a98301780eb74322db87da641dcd2c41ad76a 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 18/18] gnu: Add python-mne.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index f893c63a82..adad5131df 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -39,6 +39,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)
@@ -1207,3 +1208,50 @@ (define-public python-nitime
 to express with compact and semantically clear code.")
     (license license:bsd-3)))
 
+(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
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'check 'set-home
+                 (lambda _
+                   (setenv "HOME"
+                           (getcwd)))))))
+    (propagated-inputs (list python-numpy python-scipy))
+    (native-inputs (list python-check-manifest
+                         python-codespell
+                         python-edflib
+                         python-eeglabio
+                         python-flake8
+                         python-flake8-array-spacing
+                         python-imageio-ffmpeg
+                         python-nbclient
+                         python-nitime
+                         python-numpydoc
+                         python-pooch
+                         python-pydocstyle
+                         python-pytest
+                         python-pytest-cov
+                         python-pytest-harvest
+                         python-pytest-timeout
+                         python-sphinx-gallery
+                         python-twine
+                         python-wheel))
+    (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 #1.3: 0017-gnu-python-pooch-Update-to-1.5.2.patch --]
[-- Type: text/x-patch, Size: 1407 bytes --]

From 403d8a97cb6abd6feda72167fabb2e6842eae847 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 17/18] gnu: python-pooch: Update to 1.5.2.

* gnu/packages/python-xyz.scm (python-pooch): Update to 1.5.2.
[native-inputs]: Add python-setuptools-scm.
---
 gnu/packages/python-xyz.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0f85efd085..b386bd93bf 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -22095,18 +22095,20 @@ (define-public pybind11
 (define-public python-pooch
   (package
     (name "python-pooch")
-    (version "1.3.0")
+    (version "1.5.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pooch" version))
        (sha256
-        (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
+        (base32 "109my6dwj2r6gxfzkw973ivy4dmmw02pwxijz5fl1p7vvvqv4sar"))))
     (build-system python-build-system)
     (arguments
      `(#:tests? #f)) ;requires online data
     (propagated-inputs
      (list python-appdirs python-packaging python-requests))
+    (native-inputs
+     (list 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.4: 0016-gnu-Add-python-pytest-steps.patch --]
[-- Type: text/x-patch, Size: 1362 bytes --]

From b5687abe6b2e7d03c1cb35c31f707f6b534ffca6 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 16/18] gnu: Add python-pytest-steps.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6d57192ccb..0f85efd085 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28922,3 +28922,17 @@ (define-public python-pytest-harvest
                          python-tabulate
                          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))))
-- 
2.34.0


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

From 828f5207b4e8a09a0e166ed89047a91617e84324 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 15/18] gnu: Add python-pytest-harvest.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ea4de06935..6d57192ccb 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28904,3 +28904,21 @@ (define-public python-pytest-cases
     (arguments
      '())
     (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))))
-- 
2.34.0


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

From 0f7cf284984f10216cc68a9b4ad00efaec797d34 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 14/18] 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 d735e62a80..ea4de06935 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28896,3 +28896,11 @@ (define-public python-decopatch
     (native-inputs (list python-pytest python-pytest-runner
                          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
+     '())
+    (propagated-inputs (list python-decopatch python-makefun))))
-- 
2.34.0


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

From 00862d03e5a88685b28e1efa8c6356ba3e6f22bb 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 13/18] gnu: Add python-decopatch.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index cccd4e2b03..d735e62a80 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28875,3 +28875,24 @@ (define python-pytest-cases-minimal
 possibilities such as using fixture references as parameter values in a test
 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))))
-- 
2.34.0


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

From 588f0fa31e00c48e87a1a222e126ef7307eff5a6 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 12/18] gnu: Add a test-less python-pytest-cases.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 57cc09ae18..cccd4e2b03 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28844,3 +28844,34 @@ (define python-pytest-steps-minimal
     (synopsis "Create step-wise / incremental tests in pytest")
     (description "Create step-wise / incremental 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)))
-- 
2.34.0


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

From 78a9c8f55f3c3cb010592050c5778922049e9cf8 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 11/18] gnu: Add a test-less python-pytest-steps.

* gnu/packages/python-xyz.scm (python-pytest-steps-minimal): 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 15bd70fa8f..57cc09ae18 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28822,3 +28822,25 @@ (define python-pytest-harvest-minimal
      "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 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 "Create step-wise / incremental tests in pytest.")
+    (license license:bsd-3)))
-- 
2.34.0


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

From 98c7d608d0d364a4bb94e787bafb7a4d844818b5 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 10/18] gnu: Add a test-less python-pytest-harvest.

* gnu/packages/python-xyz.scm (python-pytest-harvest-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 d51deec454..15bd70fa8f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28798,3 +28798,27 @@ (define python-decopatch-minimal
 @samp{decopatch} provides a simple way to solve this issue so that writing
 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)))
-- 
2.34.0


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

From 295ef673a26d67b06f1d11e66dd49b1dc45de680 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 09/18] 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 6522026717..d51deec454 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28768,3 +28768,33 @@ (define-public python-pytest-logging
     (description
      "Configures logging and allows tweaking the log level with a py.test flag.")
     (license license:asl2.0)))
+
+;; 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)))
-- 
2.34.0


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

From 1014887ed2f54ba2f856f8e5313b6427c4718753 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 08/18] gnu: Add python-pytest-logging.

* gnu/packages/python-xyz.scm (python-pytest-logging): 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 f09f4abf57..6522026717 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28749,3 +28749,22 @@ (define-public python-makefun
 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-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)
+    (propagated-inputs (list python-pytest))
+    (home-page "https://github.com/saltstack/pytest-logging")
+    (synopsis
+     "Configures logging and allows tweaking the log level with a py.test flag")
+    (description
+     "Configures logging and allows tweaking the log level with a py.test flag.")
+    (license license:asl2.0)))
-- 
2.34.0


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

From 832290c3306d4032a85cc715489c9015725f13da 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 07/18] gnu: Add python-makefun.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index af05195513..f09f4abf57 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28728,3 +28728,24 @@ (define-public python-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-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)))
-- 
2.34.0


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

From d3a4b630edefa42976662f233736a0d4b3af4098 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 06/18] gnu: Add python-flake8-array-spacing.

* gnu/packages/python-science.scm (python-flake8-array-spacing): New variable.
---
 gnu/packages/python-science.scm |  1 +
 gnu/packages/python-xyz.scm     | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index fb14aff62f..f893c63a82 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1206,3 +1206,4 @@ (define-public python-nitime
 level interface to the numerical machinery and make common analysis tasks easy
 to express with compact and semantically clear code.")
     (license license:bsd-3)))
+
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c0b1fe9872..af05195513 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28711,3 +28711,20 @@ (define-public python-imageio-ffmpeg
 publishing platform-specific wheels that include the binary @samp{ffmpeg}
 executables.")
     (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"))))
+    (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)))
-- 
2.34.0


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

From d113d457d3777b924a5ff1c40b98ad4720c9b1f5 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 05/18] gnu: Add python-nitime.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index a79aacec03..fb14aff62f 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1176,3 +1176,33 @@ (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))
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'delete-generated-cython
+                 (lambda _
+                   (delete-file "nitime/_utils.c"))))))
+    (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 and make common analysis tasks easy
+to express with compact and semantically clear code.")
+    (license license:bsd-3)))
-- 
2.34.0


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

From 7e59b85005be2e61979e216e070bed99de8cae02 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 04/18] gnu: Add python-nibabel.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index e6a15ae27f..a79aacec03 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -54,6 +54,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)
@@ -1113,3 +1114,65 @@ (define-public python-eeglabio
     (synopsis "I/O support for EEGLAB files in Python")
     (description "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
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'fix-tests
+                 (lambda _
+                   ;; Some tests have a setup function, but it is not called
+                   ;; (!)
+                   (for-each (lambda (fix)
+                               (let ((file (open-file (string-append
+                                                       "nibabel/streamlines/tests/test_"
+                                                       (car fix) ".py") "a")))
+                                 (format file "
+~a()"
+                                         (cdr fix))
+                                 (close-port file)))
+                             '(("array_sequence" . "setup_module")
+                               ("streamlines" . "setup")
+                               ("tck" . "setup_module")
+                               ("tractogram" . "setup_module")
+                               ("trk" . "setup_module"))))))))
+    (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.17: 0003-gnu-Add-python-eeglabio.patch --]
[-- Type: text/x-patch, Size: 1845 bytes --]

From 9a21f7bba1ef895d664115a70c27cdd7769bb108 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 03/18] gnu: Add python-eeglabio.

* gnu/packages/python-science.scm (python-eeglabio): 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 47b142494e..e6a15ae27f 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1084,3 +1084,32 @@ (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 url-fetch)
+              (uri (pypi-uri "eeglabio" version))
+              (sha256
+               (base32
+                "0k70s8lg9b9mcs883kq8jgnj9wmxvb96q54w23f3zw38jjxw46gs"))))
+    (build-system python-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'restore-requirements.txt
+                 (lambda _
+                   ;; requirements.txt is not distributed, but it is in the
+                   ;; source
+                   (call-with-output-file "requirements.txt"
+                     (lambda (port)
+                       (format port "numpy
+scipy
+"))))))))
+    (propagated-inputs (list python-numpy python-scipy))
+    (home-page "https://github.com/jackz314/eeglabio")
+    (synopsis "I/O support for EEGLAB files in Python")
+    (description "I/O support for EEGLAB files in Python.")
+    (license license:bsd-3)))
-- 
2.34.0


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

From b1c4e71b7ce091e57b247c879d41a9e058054606 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 02/18] gnu: Add python-edflib.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 1cfc8e5869..47b142494e 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -61,7 +61,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
@@ -1035,3 +1036,51 @@ (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 url-fetch)
+              (uri (pypi-uri "EDFlib-Python" version))
+              (sha256
+               (base32
+                "1g069kyibskx5q2mc494xgjhvdspw5lvk2xhn0kqcgq1h37x5lfv"))))
+    (build-system python-build-system)
+    (arguments
+     (list #:tests? #f
+           #: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-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.19: 0001-gnu-Add-python-imageio-ffmpeg.patch --]
[-- Type: text/x-patch, Size: 2267 bytes --]

From 5c8b341c7d39cc88d723788416865e4d9e26b331 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 01/18] gnu: Add python-imageio-ffmpeg.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index eff1c4259b..c0b1fe9872 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28678,3 +28678,36 @@ (define-public python-reedsolo
 but not binary streams.")
     (license license:public-domain)))
 
+(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
+     `(#: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 provide a simple and reliable
+@samp{ffmpeg} wrapper for working with video files.  It implements two simple
+generator functions for reading and writing data from/to ffmpeg, which
+reliably terminate the ffmpeg process when done.  It also takes care of
+publishing platform-specific wheels that include the binary @samp{ffmpeg}
+executables.")
+    (license license:bsd-2)))
-- 
2.34.0


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

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

* [bug#53402] Add python-mne: fix or disable tests
       [not found] ` <handler.53402.B.164271885411910.ack@debbugs.gnu.org>
@ 2022-01-21  8:17   ` Vivien Kraus via Guix-patches via
  0 siblings, 0 replies; 10+ messages in thread
From: Vivien Kraus via Guix-patches via @ 2022-01-21  8:17 UTC (permalink / raw)
  To: 53402


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


Dear guix,

I could fix one test suite, but as luis-felipe told me on #guix, the
test data isn’t fully distributed by pypi for mne, so I had to disable
it.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-python-imageio-ffmpeg.patch --]
[-- Type: text/x-patch, Size: 2321 bytes --]

From 5c8b341c7d39cc88d723788416865e4d9e26b331 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 01/18] gnu: Add python-imageio-ffmpeg.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index eff1c4259b..c0b1fe9872 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28678,3 +28678,36 @@ (define-public python-reedsolo
 but not binary streams.")
     (license license:public-domain)))
 
+(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
+     `(#: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 provide a simple and reliable
+@samp{ffmpeg} wrapper for working with video files.  It implements two simple
+generator functions for reading and writing data from/to ffmpeg, which
+reliably terminate the ffmpeg process when done.  It also takes care of
+publishing platform-specific wheels that include the binary @samp{ffmpeg}
+executables.")
+    (license license:bsd-2)))
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0002-gnu-Add-python-edflib.patch --]
[-- Type: text/x-patch, Size: 3108 bytes --]

From b1c4e71b7ce091e57b247c879d41a9e058054606 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 02/18] gnu: Add python-edflib.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 1cfc8e5869..47b142494e 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -61,7 +61,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
@@ -1035,3 +1036,51 @@ (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 url-fetch)
+              (uri (pypi-uri "EDFlib-Python" version))
+              (sha256
+               (base32
+                "1g069kyibskx5q2mc494xgjhvdspw5lvk2xhn0kqcgq1h37x5lfv"))))
+    (build-system python-build-system)
+    (arguments
+     (list #:tests? #f
+           #: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-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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.4: 0003-gnu-Add-python-eeglabio.patch --]
[-- Type: text/x-patch, Size: 1895 bytes --]

From 9a21f7bba1ef895d664115a70c27cdd7769bb108 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 03/18] gnu: Add python-eeglabio.

* gnu/packages/python-science.scm (python-eeglabio): 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 47b142494e..e6a15ae27f 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1084,3 +1084,32 @@ (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 url-fetch)
+              (uri (pypi-uri "eeglabio" version))
+              (sha256
+               (base32
+                "0k70s8lg9b9mcs883kq8jgnj9wmxvb96q54w23f3zw38jjxw46gs"))))
+    (build-system python-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'restore-requirements.txt
+                 (lambda _
+                   ;; requirements.txt is not distributed, but it is in the
+                   ;; source
+                   (call-with-output-file "requirements.txt"
+                     (lambda (port)
+                       (format port "numpy
+scipy
+"))))))))
+    (propagated-inputs (list python-numpy python-scipy))
+    (home-page "https://github.com/jackz314/eeglabio")
+    (synopsis "I/O support for EEGLAB files in Python")
+    (description "I/O support for EEGLAB files in Python.")
+    (license license:bsd-3)))
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.5: 0004-gnu-Add-python-nibabel.patch --]
[-- Type: text/x-patch, Size: 4231 bytes --]

From 7e59b85005be2e61979e216e070bed99de8cae02 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 04/18] gnu: Add python-nibabel.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index e6a15ae27f..a79aacec03 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -54,6 +54,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)
@@ -1113,3 +1114,65 @@ (define-public python-eeglabio
     (synopsis "I/O support for EEGLAB files in Python")
     (description "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
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'fix-tests
+                 (lambda _
+                   ;; Some tests have a setup function, but it is not called
+                   ;; (!)
+                   (for-each (lambda (fix)
+                               (let ((file (open-file (string-append
+                                                       "nibabel/streamlines/tests/test_"
+                                                       (car fix) ".py") "a")))
+                                 (format file "
+~a()"
+                                         (cdr fix))
+                                 (close-port file)))
+                             '(("array_sequence" . "setup_module")
+                               ("streamlines" . "setup")
+                               ("tck" . "setup_module")
+                               ("tractogram" . "setup_module")
+                               ("trk" . "setup_module"))))))))
+    (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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.6: 0005-gnu-Add-python-nitime.patch --]
[-- Type: text/x-patch, Size: 2344 bytes --]

From 2b16738c003b90373b4ee857b7bcd7c441ab4a83 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 05/18] 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 a79aacec03..08a12d3b99 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1176,3 +1176,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
+     (list #: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 and make common analysis tasks easy
+to express with compact and semantically clear code.")
+    (license license:bsd-3)))
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.7: 0006-gnu-Add-python-flake8-array-spacing.patch --]
[-- Type: text/x-patch, Size: 1967 bytes --]

From 4eab1c63bfed00124587a7b35dda2f12512653fe 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 06/18] gnu: Add python-flake8-array-spacing.

* gnu/packages/python-science.scm (python-flake8-array-spacing): New variable.
---
 gnu/packages/python-science.scm |  1 +
 gnu/packages/python-xyz.scm     | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 08a12d3b99..97cca59644 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1210,3 +1210,4 @@ (define-public python-nitime
 level interface to the numerical machinery and make common analysis tasks easy
 to express with compact and semantically clear code.")
     (license license:bsd-3)))
+
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c0b1fe9872..af05195513 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28711,3 +28711,20 @@ (define-public python-imageio-ffmpeg
 publishing platform-specific wheels that include the binary @samp{ffmpeg}
 executables.")
     (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"))))
+    (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)))
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.8: 0007-gnu-Add-python-makefun.patch --]
[-- Type: text/x-patch, Size: 1739 bytes --]

From a1208f8263f13a61f1a6cde285de3e5aed9e3605 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 07/18] gnu: Add python-makefun.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index af05195513..f09f4abf57 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28728,3 +28728,24 @@ (define-public python-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-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)))
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.9: 0008-gnu-Add-python-pytest-logging.patch --]
[-- Type: text/x-patch, Size: 1570 bytes --]

From 4ba30ee1032e852104542b459e0b5e76725f0df5 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 08/18] gnu: Add python-pytest-logging.

* gnu/packages/python-xyz.scm (python-pytest-logging): 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 f09f4abf57..6522026717 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28749,3 +28749,22 @@ (define-public python-makefun
 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-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)
+    (propagated-inputs (list python-pytest))
+    (home-page "https://github.com/saltstack/pytest-logging")
+    (synopsis
+     "Configures logging and allows tweaking the log level with a py.test flag")
+    (description
+     "Configures logging and allows tweaking the log level with a py.test flag.")
+    (license license:asl2.0)))
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.10: 0009-gnu-Add-a-test-less-python-decopatch.patch --]
[-- Type: text/x-patch, Size: 2033 bytes --]

From 70ec47cdd5ef2dfe750cf54677ae2af19d204ad5 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 09/18] 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 6522026717..d51deec454 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28768,3 +28768,33 @@ (define-public python-pytest-logging
     (description
      "Configures logging and allows tweaking the log level with a py.test flag.")
     (license license:asl2.0)))
+
+;; 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)))
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.11: 0010-gnu-Add-a-test-less-python-pytest-harvest.patch --]
[-- Type: text/x-patch, Size: 1845 bytes --]

From cf04823d3c5f711f04776a85fd39f043f8b56fea 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 10/18] gnu: Add a test-less python-pytest-harvest.

* gnu/packages/python-xyz.scm (python-pytest-harvest-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 d51deec454..15bd70fa8f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28798,3 +28798,27 @@ (define python-decopatch-minimal
 @samp{decopatch} provides a simple way to solve this issue so that writing
 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)))
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.12: 0011-gnu-Add-a-test-less-python-pytest-steps.patch --]
[-- Type: text/x-patch, Size: 1756 bytes --]

From 32ba11f8349b9443585e5da86c190d098c4256e5 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 11/18] gnu: Add a test-less python-pytest-steps.

* gnu/packages/python-xyz.scm (python-pytest-steps-minimal): 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 15bd70fa8f..57cc09ae18 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28822,3 +28822,25 @@ (define python-pytest-harvest-minimal
      "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 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 "Create step-wise / incremental tests in pytest.")
+    (license license:bsd-3)))
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.13: 0012-gnu-Add-a-test-less-python-pytest-cases.patch --]
[-- Type: text/x-patch, Size: 2344 bytes --]

From d550923f148fe5ce82ba287821cbf77aed6025b0 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 12/18] gnu: Add a test-less python-pytest-cases.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 57cc09ae18..cccd4e2b03 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28844,3 +28844,34 @@ (define python-pytest-steps-minimal
     (synopsis "Create step-wise / incremental tests in pytest")
     (description "Create step-wise / incremental 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)))
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.14: 0013-gnu-Add-python-decopatch.patch --]
[-- Type: text/x-patch, Size: 1809 bytes --]

From 208f3b0f2b4771902b8be1faeb445da39ed06bf5 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 13/18] gnu: Add python-decopatch.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index cccd4e2b03..d735e62a80 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28875,3 +28875,24 @@ (define python-pytest-cases-minimal
 possibilities such as using fixture references as parameter values in a test
 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))))
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.15: 0014-gnu-Add-python-pytest-cases.patch --]
[-- Type: text/x-patch, Size: 1037 bytes --]

From 0bd5e596cff51d3b5d6c2fe19d75a5e0b2126cac 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 14/18] 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 d735e62a80..ea4de06935 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28896,3 +28896,11 @@ (define-public python-decopatch
     (native-inputs (list python-pytest python-pytest-runner
                          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
+     '())
+    (propagated-inputs (list python-decopatch python-makefun))))
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.16: 0015-gnu-Add-python-pytest-harvest.patch --]
[-- Type: text/x-patch, Size: 1508 bytes --]

From 2684ac7c595006f90730b5f15f2c6839335f39a3 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 15/18] gnu: Add python-pytest-harvest.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ea4de06935..6d57192ccb 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28904,3 +28904,21 @@ (define-public python-pytest-cases
     (arguments
      '())
     (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))))
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.17: 0016-gnu-Add-python-pytest-steps.patch --]
[-- Type: text/x-patch, Size: 1397 bytes --]

From db56ec3ba0e91a3b29c2a73282127249954ee45e 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 16/18] gnu: Add python-pytest-steps.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6d57192ccb..0f85efd085 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28922,3 +28922,17 @@ (define-public python-pytest-harvest
                          python-tabulate
                          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))))
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.18: 0017-gnu-python-pooch-Update-to-1.5.2.patch --]
[-- Type: text/x-patch, Size: 1448 bytes --]

From 3cc9befb02d2c6b79ee222e918ed6ce80965e4f7 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 17/18] gnu: python-pooch: Update to 1.5.2.

* gnu/packages/python-xyz.scm (python-pooch): Update to 1.5.2.
[native-inputs]: Add python-setuptools-scm.
---
 gnu/packages/python-xyz.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0f85efd085..b386bd93bf 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -22095,18 +22095,20 @@ (define-public pybind11
 (define-public python-pooch
   (package
     (name "python-pooch")
-    (version "1.3.0")
+    (version "1.5.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pooch" version))
        (sha256
-        (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
+        (base32 "109my6dwj2r6gxfzkw973ivy4dmmw02pwxijz5fl1p7vvvqv4sar"))))
     (build-system python-build-system)
     (arguments
      `(#:tests? #f)) ;requires online data
     (propagated-inputs
      (list python-appdirs python-packaging python-requests))
+    (native-inputs
+     (list python-setuptools-scm))
     (home-page "https://github.com/fatiando/pooch")
     (synopsis "Manage your Python library's sample data files")
     (description
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.19: 0018-gnu-Add-python-mne.patch --]
[-- Type: text/x-patch, Size: 3168 bytes --]

From dc0467eec2630fc6067a7b3d49d44869497f1f8e 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 18/18] gnu: Add python-mne.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 97cca59644..85af5b42cc 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -39,6 +39,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)
@@ -1211,3 +1212,55 @@ (define-public python-nitime
 to express with compact and semantically clear code.")
     (license license:bsd-3)))
 
+(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
+     (list #:tests? #f ;The test data are not distributed
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'check 'set-home
+                 (lambda _
+                   (setenv "HOME"
+                           (getcwd))))
+               (replace 'check
+                 (lambda* (#:key tests? #:allow-other-keys)
+                   (when tests?
+                     (invoke "pytest" "-vv" "mne")))))))
+    (propagated-inputs (list python-numpy python-scipy))
+    (native-inputs (list python-check-manifest
+                         python-codespell
+                         python-edflib
+                         python-eeglabio
+                         python-flake8
+                         python-flake8-array-spacing
+                         python-imageio-ffmpeg
+                         python-nbclient
+                         python-nitime
+                         python-numpydoc
+                         python-pooch
+                         python-pydocstyle
+                         python-pytest
+                         python-pytest-cov
+                         python-pytest-harvest
+                         python-pytest-timeout
+                         python-sphinx-gallery
+                         python-twine
+                         python-wheel))
+    (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: signature.asc --]
[-- Type: application/pgp-signature, Size: 658 bytes --]

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

* [bug#53402] Rebase it for the new python packages
  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-02-03 19:29 ` Vivien via Guix-patches via
  2022-02-03 20:49   ` Vinicius Monego
  2022-05-26 21:24   ` [bug#53402] Update dependencies and rebase on newer work Vivien Kraus via Guix-patches via
  1 sibling, 2 replies; 10+ messages in thread
From: Vivien via Guix-patches via @ 2022-02-03 19:29 UTC (permalink / raw)
  To: 53402


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

Dear guix,

We have 2 new python packages, so my patch series creates a trivial
conflict. Here is a new version that you can apply directly.

Best regards,

Vivien

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

From 48fa130f3d4ff8c6319d6796856698bd1deada4d 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 01/18] gnu: Add python-imageio-ffmpeg.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b0374622f2..b409ca16b6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28910,3 +28910,37 @@ (define-public python-types-dataclasses
      "This packages provides a collection of library stubs for Python, with
 static types.")
     (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
+     `(#: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 provide a simple and reliable
+@samp{ffmpeg} wrapper for working with video files.  It implements two simple
+generator functions for reading and writing data from/to ffmpeg, which
+reliably terminate the ffmpeg process when done.  It also takes care of
+publishing platform-specific wheels that include the binary @samp{ffmpeg}
+executables.")
+    (license license:bsd-2)))
-- 
2.34.0


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

From bd9a1c37287fa9e921ab004dfd2bf6571d2fe71a 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 02/18] gnu: Add python-edflib.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 8df311baea..0b754ddd5f 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -61,7 +61,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 +1018,51 @@ (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 url-fetch)
+              (uri (pypi-uri "EDFlib-Python" version))
+              (sha256
+               (base32
+                "1g069kyibskx5q2mc494xgjhvdspw5lvk2xhn0kqcgq1h37x5lfv"))))
+    (build-system python-build-system)
+    (arguments
+     (list #:tests? #f
+           #: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-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: 0003-gnu-Add-python-eeglabio.patch --]
[-- Type: text/x-patch, Size: 1845 bytes --]

From 10dcbcbe8b7342c09651b143d70012d3d87857d7 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 03/18] gnu: Add python-eeglabio.

* gnu/packages/python-science.scm (python-eeglabio): 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 0b754ddd5f..40e31f1526 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1066,3 +1066,32 @@ (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 url-fetch)
+              (uri (pypi-uri "eeglabio" version))
+              (sha256
+               (base32
+                "0k70s8lg9b9mcs883kq8jgnj9wmxvb96q54w23f3zw38jjxw46gs"))))
+    (build-system python-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'restore-requirements.txt
+                 (lambda _
+                   ;; requirements.txt is not distributed, but it is in the
+                   ;; source
+                   (call-with-output-file "requirements.txt"
+                     (lambda (port)
+                       (format port "numpy
+scipy
+"))))))))
+    (propagated-inputs (list python-numpy python-scipy))
+    (home-page "https://github.com/jackz314/eeglabio")
+    (synopsis "I/O support for EEGLAB files in Python")
+    (description "I/O support for EEGLAB files in Python.")
+    (license license:bsd-3)))
-- 
2.34.0


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

From 938ab5f4a7a2bce84f6b29c167ecdc74de90b405 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 04/18] gnu: Add python-nibabel.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 40e31f1526..d8abf2f471 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -54,6 +54,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)
@@ -1095,3 +1096,65 @@ (define-public python-eeglabio
     (synopsis "I/O support for EEGLAB files in Python")
     (description "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
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'fix-tests
+                 (lambda _
+                   ;; Some tests have a setup function, but it is not called
+                   ;; (!)
+                   (for-each (lambda (fix)
+                               (let ((file (open-file (string-append
+                                                       "nibabel/streamlines/tests/test_"
+                                                       (car fix) ".py") "a")))
+                                 (format file "
+~a()"
+                                         (cdr fix))
+                                 (close-port file)))
+                             '(("array_sequence" . "setup_module")
+                               ("streamlines" . "setup")
+                               ("tck" . "setup_module")
+                               ("tractogram" . "setup_module")
+                               ("trk" . "setup_module"))))))))
+    (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: 0005-gnu-Add-python-nitime.patch --]
[-- Type: text/x-patch, Size: 2289 bytes --]

From df45a6fd0ac9d30c4ce0795b056f92344e4dd77d 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 05/18] 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 d8abf2f471..92a22aa981 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1158,3 +1158,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
+     (list #: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 and make common analysis tasks easy
+to express with compact and semantically clear code.")
+    (license license:bsd-3)))
-- 
2.34.0


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

From 37470da1df9e7af8c1effe0cadb28582152e1d7b 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 06/18] gnu: Add python-flake8-array-spacing.

* gnu/packages/python-science.scm (python-flake8-array-spacing): New variable.
---
 gnu/packages/python-science.scm |  1 +
 gnu/packages/python-xyz.scm     | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 92a22aa981..6c0915e927 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1192,3 +1192,4 @@ (define-public python-nitime
 level interface to the numerical machinery and make common analysis tasks easy
 to express with compact and semantically clear code.")
     (license license:bsd-3)))
+
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b409ca16b6..8b27d4b490 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28944,3 +28944,20 @@ (define-public python-imageio-ffmpeg
 publishing platform-specific wheels that include the binary @samp{ffmpeg}
 executables.")
     (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"))))
+    (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)))
-- 
2.34.0


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

From 74564436748b32ea7445f549d3e9ac04986a089b 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 07/18] gnu: Add python-makefun.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 8b27d4b490..6a0d176304 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28961,3 +28961,24 @@ (define-public python-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-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)))
-- 
2.34.0


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

From 0a5c51513679d43ec55824ff01c15215f0689b05 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 08/18] gnu: Add python-pytest-logging.

* gnu/packages/python-xyz.scm (python-pytest-logging): 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 6a0d176304..3ff0ba41cd 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28982,3 +28982,22 @@ (define-public python-makefun
 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-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)
+    (propagated-inputs (list python-pytest))
+    (home-page "https://github.com/saltstack/pytest-logging")
+    (synopsis
+     "Configures logging and allows tweaking the log level with a py.test flag")
+    (description
+     "Configures logging and allows tweaking the log level with a py.test flag.")
+    (license license:asl2.0)))
-- 
2.34.0


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

From aae3ae03d5b0d6b9520fcbecbc2062dc2ae51882 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 09/18] 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 3ff0ba41cd..be1860941f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -29001,3 +29001,33 @@ (define-public python-pytest-logging
     (description
      "Configures logging and allows tweaking the log level with a py.test flag.")
     (license license:asl2.0)))
+
+;; 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)))
-- 
2.34.0


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

From 939a5fcd45d0c6fdca9953db901a3925183f9e51 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 10/18] gnu: Add a test-less python-pytest-harvest.

* gnu/packages/python-xyz.scm (python-pytest-harvest-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 be1860941f..fb2e70ddfa 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -29031,3 +29031,27 @@ (define python-decopatch-minimal
 @samp{decopatch} provides a simple way to solve this issue so that writing
 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)))
-- 
2.34.0


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

From 2c7fc35ccd354f3ebd92059f04cdffb51d30f457 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 11/18] gnu: Add a test-less python-pytest-steps.

* gnu/packages/python-xyz.scm (python-pytest-steps-minimal): 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 fb2e70ddfa..7efae628e8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -29055,3 +29055,25 @@ (define python-pytest-harvest-minimal
      "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 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 "Create step-wise / incremental tests in pytest.")
+    (license license:bsd-3)))
-- 
2.34.0


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

From 9acf333bf46792e3b36bda6612b5382775f9ccbf 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 12/18] gnu: Add a test-less python-pytest-cases.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 7efae628e8..26cd6cbb44 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -29077,3 +29077,34 @@ (define python-pytest-steps-minimal
     (synopsis "Create step-wise / incremental tests in pytest")
     (description "Create step-wise / incremental 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)))
-- 
2.34.0


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

From 6b3842510bf2def117bdd686a69d835fcb81a321 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 13/18] gnu: Add python-decopatch.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 26cd6cbb44..e6c4a8878c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -29108,3 +29108,24 @@ (define python-pytest-cases-minimal
 possibilities such as using fixture references as parameter values in a test
 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))))
-- 
2.34.0


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

From 4b17866344bba2a72c01a281878f7a747fbce0be 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 14/18] 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 e6c4a8878c..31518820ff 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -29129,3 +29129,11 @@ (define-public python-decopatch
     (native-inputs (list python-pytest python-pytest-runner
                          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
+     '())
+    (propagated-inputs (list python-decopatch python-makefun))))
-- 
2.34.0


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

From 568abb09c392b847a34a9673f4e7e1735a30182a 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 15/18] gnu: Add python-pytest-harvest.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 31518820ff..51f17ed4e7 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -29137,3 +29137,21 @@ (define-public python-pytest-cases
     (arguments
      '())
     (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))))
-- 
2.34.0


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

From 1c815dfa8636a0a0c7927f18d346fa25d1f3ed10 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 16/18] gnu: Add python-pytest-steps.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 51f17ed4e7..1cd2557e58 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -29155,3 +29155,17 @@ (define-public python-pytest-harvest
                          python-tabulate
                          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))))
-- 
2.34.0


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

From 4b6fb12adbd35fafb5f1c79f0db5c38c5ae658da 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 17/18] gnu: python-pooch: Update to 1.5.2.

* gnu/packages/python-xyz.scm (python-pooch): Update to 1.5.2.
[native-inputs]: Add python-setuptools-scm.
---
 gnu/packages/python-xyz.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 1cd2557e58..f9b31166e6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -22252,18 +22252,20 @@ (define-public pybind11
 (define-public python-pooch
   (package
     (name "python-pooch")
-    (version "1.3.0")
+    (version "1.5.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pooch" version))
        (sha256
-        (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
+        (base32 "109my6dwj2r6gxfzkw973ivy4dmmw02pwxijz5fl1p7vvvqv4sar"))))
     (build-system python-build-system)
     (arguments
      `(#:tests? #f)) ;requires online data
     (propagated-inputs
      (list python-appdirs python-packaging python-requests))
+    (native-inputs
+     (list 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: 0018-gnu-Add-python-mne.patch --]
[-- Type: text/x-patch, Size: 3087 bytes --]

From 08ad35d954b27d697688d10e04a0244091b50614 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 18/18] gnu: Add python-mne.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 6c0915e927..33e48b1be0 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -39,6 +39,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)
@@ -1193,3 +1194,55 @@ (define-public python-nitime
 to express with compact and semantically clear code.")
     (license license:bsd-3)))
 
+(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
+     (list #:tests? #f ;The test data are not distributed
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'check 'set-home
+                 (lambda _
+                   (setenv "HOME"
+                           (getcwd))))
+               (replace 'check
+                 (lambda* (#:key tests? #:allow-other-keys)
+                   (when tests?
+                     (invoke "pytest" "-vv" "mne")))))))
+    (propagated-inputs (list python-numpy python-scipy))
+    (native-inputs (list python-check-manifest
+                         python-codespell
+                         python-edflib
+                         python-eeglabio
+                         python-flake8
+                         python-flake8-array-spacing
+                         python-imageio-ffmpeg
+                         python-nbclient
+                         python-nitime
+                         python-numpydoc
+                         python-pooch
+                         python-pydocstyle
+                         python-pytest
+                         python-pytest-cov
+                         python-pytest-harvest
+                         python-pytest-timeout
+                         python-sphinx-gallery
+                         python-twine
+                         python-wheel))
+    (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: 695 bytes --]

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

* [bug#53402] Rebase it for the new python packages
  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-05-26 21:24   ` [bug#53402] Update dependencies and rebase on newer work Vivien Kraus via Guix-patches via
  1 sibling, 1 reply; 10+ messages in thread
From: Vinicius Monego @ 2022-02-03 20:49 UTC (permalink / raw)
  To: Vivien, 53402

Em qui, 2022-02-03 às 20:29 +0100, Vivien escreveu:
> Dear guix,
> 
> We have 2 new python packages, so my patch series creates a trivial
> conflict. Here is a new version that you can apply directly.
> 
> Best regards,
> 
> Vivien

Hi,

To avoid future merge conflicts, please move the packages somewhere in
the middle of the files instead of the bottom.

As a rule of thumb for Python packages with tests in Pytest, the check
phase is overriden and Pytest is called manually. When the tests are in
a subfolder inside the module, add a --pyargs <package> parameter to
the pytest command, see e.g. the python-cartopy package. I could run
the python-nibabel tests with this change without having to delete
anything.

If the tests still can't run because of missing data, it's fine to
source from the upstream repository instead of PyPI, or skip the few
tests that need them or at all if the repository doesn't ship a
setup.py. If tests are to be disabled, they should also have a comment
with the reason.

The 'test-less' packages shouldn't be needed AFAICS. Tests should run
by overriding the check phase as stated above (untested).

I also have a few comments about the patches in general:

> +    (source (origin
> +              (method url-fetch)
> +              (uri (pypi-uri "imageio-ffmpeg" version))
> +              (sha256
> +               (base32
> +               
> "0ff14079izsyxwf6ki68k9a7w5krjlal7lwqvzg2bbddl92l5spj"))))

Could you style it as

    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "imageio-ffmpeg" version))
       (sha256
        (base32
"0ff14079izsyxwf6ki68k9a7w5krjlal7lwqvzg2bbddl92l5spj"))))

and the other packages too?

Gexps should only be used when ungexp (#$) is used. On many patches
(e.g. python-nitime) ungexp is not being used.

When using gexp, it's better to style the arguments as:

+    (arguments
+     (list
+       #:phases
+       #~(modify-phases %standard-phases

to save columns (some of the packages exceeded the 78 columns limit),
instead of

> +    (arguments
> +     (list #:phases
> +           #~(modify-phases %standard-phases
> 

.

Some of the descriptions are not full sentences (e.g. in python-pytest-
harvest-minimal). Please check that descriptions are full sentences.

When sending an updated series, use patch versions with --reroll-
count=4 or -v4.

Could you send a v4 with the requested changes?

Vinicius





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

* [bug#53402] Rebase it for the new python packages
  2022-02-03 20:49   ` Vinicius Monego
@ 2022-02-06 14:49     ` Vivien via Guix-patches via
  2022-02-06 20:06       ` Vinicius Monego
  0 siblings, 1 reply; 10+ messages in thread
From: Vivien via Guix-patches via @ 2022-02-06 14:49 UTC (permalink / raw)
  To: Vinicius Monego, 53402


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

Hello, thank you for your review!

Le jeudi 03 février 2022 à 20:49 +0000, Vinicius Monego a écrit :
> To avoid future merge conflicts, please move the packages somewhere
> in
> the middle of the files instead of the bottom.

OK.

> As a rule of thumb for Python packages with tests in Pytest, the
> check
> phase is overriden and Pytest is called manually. When the tests are
> in
> a subfolder inside the module, add a --pyargs <package> parameter to
> the pytest command, see e.g. the python-cartopy package. I could run
> the python-nibabel tests with this change without having to delete
> anything.

OK.

> If the tests still can't run because of missing data, it's fine to
> source from the upstream repository instead of PyPI, or skip the few
> tests that need them or at all if the repository doesn't ship a
> setup.py. If tests are to be disabled, they should also have a
> comment
> with the reason.

For MNE, the test data set is a separate repository without a license,
so I disabled the tests.

> The 'test-less' packages shouldn't be needed AFAICS. Tests should run
> by overriding the check phase as stated above (untested).

The test-less packages are part of a dependency cycle; decopatch
requires them for the tests to run, and they require decopatch or each
other too. If I disable all tests (pytest-* and decopatch) it would
work, but I’m not sure I should do that.

> I also have a few comments about the patches in general:
> 
> > +    (source (origin
> > +              (method url-fetch)
> > +              (uri (pypi-uri "imageio-ffmpeg" version))
> > +              (sha256
> > +               (base32
> > +               
> > "0ff14079izsyxwf6ki68k9a7w5krjlal7lwqvzg2bbddl92l5spj"))))
> 
> 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.

> Gexps should only be used when ungexp (#$) is used. On many patches
> (e.g. python-nitime) ungexp is not being used.

OK, I upgraded python-pooch again and it needs gexps too now.

> 
> When using gexp, it's better to style the arguments as:
> 
> +    (arguments
> +     (list
> +       #:phases
> +       #~(modify-phases %standard-phases
> 
> to save columns (some of the packages exceeded the 78 columns limit),
> instead of
> 
> > +    (arguments
> > +     (list #:phases
> > +           #~(modify-phases %standard-phases
> > 

OK.

> .
> 
> 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?

> When sending an updated series, use patch versions with --reroll-
> count=4 or -v4.

I didn’t know that option.

> Could you send a v4 with the requested changes?

Sure!

Best regards,

Vivien

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

From d18443abeb280a554413cd6025f10a0dc886bb8d 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 v4 01/18] gnu: Add python-imageio-ffmpeg.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 7c1b5e8ed3..f4b8ed67a2 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25433,6 +25433,42 @@ (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
+     `(#: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 provide a simple and reliable
+@samp{ffmpeg} wrapper for working with video files.  It implements two simple
+generator functions for reading and writing data from/to ffmpeg, which
+reliably terminate the ffmpeg process when done.  It also takes care of
+publishing platform-specific wheels that include the binary @samp{ffmpeg}
+executables.")
+    (license license:bsd-2)))
+
 (define-public python-frozendict
   (package
     (name "python-frozendict")

base-commit: 7c9ad54b0616112c7eea6dd02379616aef206490
-- 
2.34.0


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

From 3f264d68d2d9e71adfb4eb2da55b5fff72e11ca8 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 v4 02/18] gnu: Add python-edflib.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 8df311baea..09de2da78a 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -61,7 +61,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 +1018,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: v4-0003-gnu-Add-python-eeglabio.patch --]
[-- Type: text/x-patch, Size: 1750 bytes --]

From 5ee84ba74cc1dd7b3ad084639dad02efa500f0c4 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 v4 03/18] gnu: Add python-eeglabio.

* gnu/packages/python-science.scm (python-eeglabio): 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 09de2da78a..b399a96ead 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1079,3 +1079,32 @@ (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 url-fetch)
+       (uri (pypi-uri "eeglabio" version))
+       (sha256
+        (base32
+         "0k70s8lg9b9mcs883kq8jgnj9wmxvb96q54w23f3zw38jjxw46gs"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'restore-requirements.txt
+           (lambda _
+             ;; requirements.txt is not distributed, but it is in the source
+             (call-with-output-file "requirements.txt"
+               (lambda (port)
+                 (format port "numpy
+scipy
+"))))))))
+    (propagated-inputs (list python-numpy python-scipy))
+    (home-page "https://github.com/jackz314/eeglabio")
+    (synopsis "I/O support for EEGLAB files in Python")
+    (description "I/O support for EEGLAB files in Python.")
+    (license license:bsd-3)))
-- 
2.34.0


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

From 3f4bf1b10ba79748d5969ebac7e19a5ad20b9165 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 v4 04/18] 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 b399a96ead..ad3fdd17fd 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -54,6 +54,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)
@@ -1108,3 +1109,53 @@ (define-public python-eeglabio
     (synopsis "I/O support for EEGLAB files in Python")
     (description "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: v4-0005-gnu-Add-python-nitime.patch --]
[-- Type: text/x-patch, Size: 2211 bytes --]

From 477410e79fc0cb11ee2915d876fbe250d7ec361c 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 v4 05/18] gnu: Add python-nitime.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index ad3fdd17fd..66c79b2e69 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1159,3 +1159,38 @@ (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 and make common analysis tasks easy
+to express with compact and semantically clear code.")
+    (license license:bsd-3)))
-- 
2.34.0


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

From 6a18d1b1930adb04be6d2d0f9f8d1aa1e54e7141 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 v4 06/18] gnu: Add python-flake8-array-spacing.

* gnu/packages/python-science.scm (python-flake8-array-spacing): New variable.
---
 gnu/packages/python-xyz.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f4b8ed67a2..9c97b246fd 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25469,6 +25469,24 @@ (define-public python-imageio-ffmpeg
 executables.")
     (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"))))
+    (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: v4-0007-gnu-Add-python-makefun.patch --]
[-- Type: text/x-patch, Size: 1606 bytes --]

From abbcd5e08f263feeb4130496fde24f28d358190c 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 v4 07/18] 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 9c97b246fd..660d6087c1 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25487,6 +25487,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: v4-0008-gnu-Add-python-pytest-logging.patch --]
[-- Type: text/x-patch, Size: 1489 bytes --]

From 3405f00ad85e4411ddf0df88994ea48bfe9cfcd9 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 v4 08/18] gnu: Add python-pytest-logging.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 660d6087c1..5753101a2b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25509,6 +25509,27 @@ (define-public python-makefun
 @samp{functools}, and created mainly to cover some of their limitations.")
     (license license:bsd-3)))
 
+(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)
+    (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-frozendict
   (package
     (name "python-frozendict")
-- 
2.34.0


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

From 95c3c667967d7e1a995a8d51d48e122536c6db0b 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 v4 09/18] 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 5753101a2b..f1b68b3e39 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25530,6 +25530,36 @@ (define-public python-pytest-logging
 @code{py.test} flag.")
     (license license:asl2.0)))
 
+;; 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: v4-0010-gnu-Add-a-test-less-python-pytest-harvest.patch --]
[-- Type: text/x-patch, Size: 1778 bytes --]

From d044ab299f7e9f5b4af0f29f0ce85e51d50b76ab 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 v4 10/18] 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 f1b68b3e39..49beaef98e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25560,6 +25560,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: v4-0011-gnu-Add-a-test-less-python-pytest-steps.patch --]
[-- Type: text/x-patch, Size: 1718 bytes --]

From c03e71a4c7463e02c97501947ff067ff02d3efd0 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 v4 11/18] 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 49beaef98e..a00e317864 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25585,6 +25585,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: v4-0012-gnu-Add-a-test-less-python-pytest-cases.patch --]
[-- Type: text/x-patch, Size: 2233 bytes --]

From bf082faac267456509498d68a28c893fa6589e57 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 v4 12/18] 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 a00e317864..49e553c567 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25609,6 +25609,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: v4-0013-gnu-Add-python-decopatch.patch --]
[-- Type: text/x-patch, Size: 1682 bytes --]

From aac715959af6b765272a07c4521dc44939cdb84c 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 v4 13/18] 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 49e553c567..bdb5b9537d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25641,6 +25641,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: v4-0014-gnu-Add-python-pytest-cases.patch --]
[-- Type: text/x-patch, Size: 1092 bytes --]

From a60c87b706a1b570c4638ec570c43e6b16102d29 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 v4 14/18] 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 bdb5b9537d..730a8723f7 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25663,6 +25663,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: v4-0015-gnu-Add-python-pytest-harvest.patch --]
[-- Type: text/x-patch, Size: 1566 bytes --]

From 8cb125505b1f6a5ff79b71e643949ca7f90790b8 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 v4 15/18] 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 730a8723f7..0ffd4ef9c6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25671,6 +25671,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: v4-0016-gnu-Add-python-pytest-steps.patch --]
[-- Type: text/x-patch, Size: 1376 bytes --]

From 1ad97680bf40f4431145e0e6d7307ec032110ed9 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 v4 16/18] 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 0ffd4ef9c6..daefd5cc00 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25690,6 +25690,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: v4-0017-gnu-python-pooch-Update-to-1.6.0.patch --]
[-- Type: text/x-patch, Size: 2337 bytes --]

From 3f69dbd7fe590c06473031c02acc166a44dcf269 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 v4 17/18] 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 daefd5cc00..963a7b9d1b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -22273,18 +22273,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: v4-0018-gnu-Add-python-mne.patch --]
[-- Type: text/x-patch, Size: 2838 bytes --]

From f1deca828dddb258791c98ef52be14a8cf6c6c22 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 v4 18/18] gnu: Add python-mne.

* gnu/packages/python-science.scm (python-mne): 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 66c79b2e69..61ab831457 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -39,6 +39,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)
@@ -1194,3 +1195,47 @@ (define-public python-nitime
 level interface to the numerical machinery and make common analysis tasks easy
 to express with compact and semantically clear code.")
     (license license:bsd-3)))
+
+(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))
+    (native-inputs (list python-check-manifest
+                         python-codespell
+                         python-edflib
+                         python-eeglabio
+                         python-flake8
+                         python-flake8-array-spacing
+                         python-imageio-ffmpeg
+                         python-nbclient
+                         python-nitime
+                         python-numpydoc
+                         python-pooch
+                         python-pydocstyle
+                         python-pytest
+                         python-pytest-cov
+                         python-pytest-harvest
+                         python-pytest-timeout
+                         python-sphinx-gallery
+                         python-twine
+                         python-wheel))
+    (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: 695 bytes --]

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

* [bug#53402] Rebase it for the new python packages
  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
  0 siblings, 1 reply; 10+ messages in thread
From: Vinicius Monego @ 2022-02-06 20:06 UTC (permalink / raw)
  To: Vivien, 53402

Em dom, 2022-02-06 às 15:49 +0100, Vivien escreveu:
> Hello, thank you for your review!
> 

Thanks for the v4.

[...]

> 
> > As a rule of thumb for Python packages with tests in Pytest, the
> > check
> > phase is overriden and Pytest is called manually. When the tests
> > are
> > in
> > a subfolder inside the module, add a --pyargs <package> parameter
> > to
> > the pytest command, see e.g. the python-cartopy package. I could
> > run
> > the python-nibabel tests with this change without having to delete
> > anything.
> 
> OK.

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.

For imageio-ffmpeg there are tests in github but not PyPI. I tried to
source from github but most tests require online data. In that case
#:tests? #f should be added with an explanation.

> 
> > If the tests still can't run because of missing data, it's fine to
> > source from the upstream repository instead of PyPI, or skip the
> > few
> > tests that need them or at all if the repository doesn't ship a
> > setup.py. If tests are to be disabled, they should also have a
> > comment
> > with the reason.
> 
> 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?

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.

> > The 'test-less' packages shouldn't be needed AFAICS. Tests should
> > run
> > by overriding the check phase as stated above (untested).
> 
> The test-less packages are part of a dependency cycle; decopatch
> requires them for the tests to run, and they require decopatch or
> each
> other too. If I disable all tests (pytest-* and decopatch) it would
> work, but I’m not sure I should do that.
> 

OK, it seems that they have a web of dependencies on each other. This
is the first time I see such a case.

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

> > I also have a few comments about the patches in general:
> > 
> > > +    (source (origin
> > > +              (method url-fetch)
> > > +              (uri (pypi-uri "imageio-ffmpeg" version))
> > > +              (sha256
> > > +               (base32
> > > +               
> > > "0ff14079izsyxwf6ki68k9a7w5krjlal7lwqvzg2bbddl92l5spj"))))
> > 
> > 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.

[...]

> 
> > 
> > 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..."

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

[...]

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

Vinicius

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

> 
> 
> Sure!
> 
> Best regards,
> 
> Vivien






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

* [bug#53402] Rebase it for the new python packages
  2022-02-06 20:06       ` Vinicius Monego
@ 2022-02-11  3:03         ` Vivien via Guix-patches via
  2022-03-06 21:48           ` [bug#53402] Add python-mne Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Vivien via Guix-patches via @ 2022-02-11  3:03 UTC (permalink / raw)
  To: Vinicius Monego, 53402


[-- 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 --]

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

* [bug#53402] Add python-mne
  2022-02-11  3:03         ` Vivien via Guix-patches via
@ 2022-03-06 21:48           ` Ludovic Courtès
  2022-03-09 23:28             ` Vinicius Monego
  0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2022-03-06 21:48 UTC (permalink / raw)
  To: Vinicius Monego; +Cc: Vivien, 53402

Hello!

Vinicius, could you take a look at v5 of this patch series?

Thanks for reviewing!

Ludo’.




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

* [bug#53402] Add python-mne
  2022-03-06 21:48           ` [bug#53402] Add python-mne Ludovic Courtès
@ 2022-03-09 23:28             ` Vinicius Monego
  0 siblings, 0 replies; 10+ messages in thread
From: Vinicius Monego @ 2022-03-09 23:28 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Vivien, 53402

On 06/03/2022 6:48 PM, Ludovic Courtès wrote:

> Hello!
>
> Vinicius, could you take a look at v5 of this patch series?
>
> Thanks for reviewing!
>
> Ludo’.

Hi Ludo, Vivien.

Sorry for the long wait. I will be busy until mid-April. I did review
the patches earlier and LGTM apart from minor style/lint and description
issues, but I could fix that before committing. I saw that someone
pushed a wip-python-mne branch and thought they were taking care of this.

I have some questions for other maintainers, like

1. Is it OK to have that many bootstrap packages for pytest modules
(patches 8 to 16) and in files different than where they are supposed to
be (e.g. decopatch-minimal in python-check to bootstrap pytest-harvest)?
It seems that there are no other options in this case though.

2. Should python-no-verison (patch 22) be a public variable? It is an
example package, doesn't seem to be useful to expose it.

If it's OK I could push the series up to patch 26. I haven't reviewed 27
and on in v5.

3. Not a question but it would be good to review FSDG status of
python-mne, since it contains code to download non-free data.





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

* [bug#53402] Update dependencies and rebase on newer work
  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-05-26 21:24   ` Vivien Kraus via Guix-patches via
  1 sibling, 0 replies; 10+ messages in thread
From: Vivien Kraus via Guix-patches via @ 2022-05-26 21:24 UTC (permalink / raw)
  To: 53402


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

Dear guix,

Since I made the last update to this series, someone did work in the
python science packages and I had to publish a new rebase of my work,
discarding duplicate packaging efforts. I also used that opportunity to
update my dependencies.

Could you publish the new rebase in a new branch? Previously, nckx did
it to wip-python-mne. It was of great help to me because I can use the
branch in gitlab CI without having to patch and rebuild guix in the
pipeline. It would be wiser to use a new branch, based on master.

Thank you for the time you already spent helping me.

Best regards,

Vivien

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

From 40fad25a6348530b286ecc43eda7ffa1604f80b3 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 v6 01/28] 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 44eeb0d7fe..948125df46 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27162,6 +27162,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.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "imageio-ffmpeg" version))
+       (sha256
+        (base32 "0gkjkrmgbdcfqx010hp23ymrkp1zzmjbh88qliyf6qzkjy7q623s"))))
+    (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: 6b819f82857c5c2515d579dce94e89ea7d8547fd
-- 
2.36.1


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

From d1836f60cf906a5e6d4943b9818b8d8385d914ea 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 v6 02/28] 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 6bc726fc83..49f0322c51 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2022 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
 ;;; Copyright © 2022 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
+;;; Copyright © 2022 Vivien Kraus <viven@planete-kraus.eu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -68,7 +69,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
@@ -1291,3 +1293,64 @@ (define-public python-aplus
     (description "This package is an implementation of the Promises/A+
 specification and test suite in Python.")
     (license license:expat)))
+
+(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.36.1


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

From 77f4fc397de416294368537a1a7dd32f3cd0de6c 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 v6 03/28] 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 49f0322c51..158f8eaac9 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1354,3 +1354,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.post7")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/jackz314/eeglabio")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32
+         "0094vxlai0rjknlrdrsk22bhh6a8ihanqk8pg5yfmd2piwwzqkjr"))))
+    (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.36.1


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

From dc94848ad9788c9a3681067db2b65cc5598cab3d 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 v6 04/28] 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 158f8eaac9..b44eb85004 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -61,6 +61,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)
@@ -1378,3 +1379,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.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "nibabel" version))
+       (sha256
+        (base32
+         "152g29y0n19fn846r5r095g5q3xjpcyan7pciygcw184ndsc3p5h"))))
+    (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.36.1


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

From f288abe288aa90d30dd6f3dc129743b80ed109ee 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 v6 05/28] 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 b44eb85004..116caca20a 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1429,3 +1429,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.36.1


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

From 94a8526d8fbdfae0667d07c81760e3f81bfe014b 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 v6 06/28] 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 948125df46..bbf2419fee 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27194,6 +27194,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.36.1


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

From 77f2765c903c97dcc05aa8508a9425b115a82640 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 v6 07/28] 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 bbf2419fee..fd8f803104 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27220,6 +27220,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.36.1


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

From 0d91c0683ddd59b33c453c73483f9c324db380b8 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 v6 08/28] 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 d788935caa..c46c6638e4 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -2139,6 +2139,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.36.1


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

From b1586be02ab153c59ba8081c54937f9e8cd3373a 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 v6 09/28] 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 fd8f803104..cc24b993f2 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27242,6 +27242,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.10")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "decopatch" version))
+       (sha256
+        (base32
+         "1i6i811s2j1z0cl6y177dwsbfxib8dvb5c2jpgklvc2xy4ahhsy6"))))
+    (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.36.1


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

From 6a7cc702c88bfc56ab7e00ca132cbf4012741b22 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 v6 10/28] 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 cc24b993f2..7ddba93891 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27272,6 +27272,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.36.1


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

From a7988b3ff6826ccf5622d973e484e3f80263eff6 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 v6 11/28] 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 7ddba93891..9a6c2429f4 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27297,6 +27297,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.36.1


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

From 4e25800be8a53279e93ba7797b420be78a46fbeb 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 v6 12/28] 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 9a6c2429f4..6b79fad584 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27321,6 +27321,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.13")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-cases" version))
+       (sha256
+        (base32
+         "0g3lp4m19fk83kl2b4akwg7wqqaqlfzp4v6qcb0hq27161xyh8yl"))))
+    (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.36.1


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

From 4a9ba415c136d4d48b8d9f21f2d6e6a1bef10c2e 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 v6 13/28] 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 6b79fad584..fd43a24d43 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27353,6 +27353,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.36.1


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

From e972203732ee2c4095f5ba219b8851e47603bb96 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 v6 14/28] 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 fd43a24d43..aa0fcf3a7f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27375,6 +27375,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.36.1


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

From 05f7c2a1300db7fded5e5074328c44d612deeab3 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 v6 15/28] 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 aa0fcf3a7f..2e1306ccd4 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27383,6 +27383,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.36.1


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

From bf5c7dda849e637cf2e0f62c6bd7484fe58178b8 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 v6 16/28] 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 2e1306ccd4..2fd9b1b589 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27402,6 +27402,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.36.1


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

From 58f8e688de1434fea029b563745bf1aaf8ae720b 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 v6 17/28] 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 2fd9b1b589..81fff5966f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23866,18 +23866,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.36.1


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

From 637e431c28a468a12b86b1b1df2f1172df391940 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 v6 18/28] 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 81fff5966f..38f86e3a9f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1539,6 +1539,36 @@ (define-public python2-h5py
           (base32
            "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4")))))))
 
+(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.36.1


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

From ead1ee9e41b2d8c6b6044502cedb6543bd42fbd1 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 v6 19/28] 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 38f86e3a9f..ff9d06595a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1569,6 +1569,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.30")
+    (source
+      (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/obob/pymatreader.git/")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "14nzk5rjmg4mb2kcl579ri13dbd6ssznxbbix84s69ihdrv903iy"))))
+    (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.36.1


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

From 83c29475af46841e3207b2040f5be09247148445 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 v6 20/28] 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 116caca20a..92c9d0b0b2 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1463,3 +1463,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.36.1


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

From e14173c42163b3c2cc6aa1da90786a05fc3e4805 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 v6 21/28] 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 92c9d0b0b2..4652d36c11 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1492,3 +1492,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.5.0")
+    (source
+     (origin
+       ;; Use git to avoid cythonized files
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/dipy/dipy")
+             (commit version)))
+       (sha256
+        (base32
+         "00s8i0w1n6cp519hw5jc6hwgglqyfqp0zcrbr01gn20km7182s6y"))))
+    (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.36.1


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

From 775def4bf140f1b7e84f671b28c2c05bc897d4ea 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 v6 22/28] 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 ff9d06595a..7bdb237c14 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27511,6 +27511,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.36.1


[-- Attachment #1.24: v6-0023-gnu-Add-python-nilearn.patch --]
[-- Type: text/x-patch, Size: 2235 bytes --]

From fd3a044d99309501e2c3794ae9e4bf69be1b8235 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 v6 23/28] gnu: Add python-nilearn.

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

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 4652d36c11..07aea5f57a 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1430,6 +1430,44 @@ (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.1")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/nilearn/nilearn")
+              (commit version)))
+        (sha256
+          (base32 "0ylx4aamwgb135agrh06y9m7crxd8rjnrngnrzyjn0dpm3m1c22p"))))
+    (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.36.1


[-- Attachment #1.25: v6-0024-gnu-vtk-Also-install-a-.egg-info.patch --]
[-- Type: text/x-patch, Size: 2973 bytes --]

From 4f20eb002758f868cafdedd3bf1e9c947026bf75 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 v6 24/28] 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 1995f71cc2..7bab07c58c 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -328,7 +328,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
@@ -362,7 +362,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
      (list double-conversion
@@ -394,6 +419,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.36.1


[-- Attachment #1.26: v6-0025-gnu-Add-python-pytest-memprof.patch --]
[-- Type: text/x-patch, Size: 1561 bytes --]

From f73e874a4a44e6294f4d5e1de7f0b3f21faa030f 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 v6 25/28] 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 c46c6638e4..8be8c5539d 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -2236,3 +2236,23 @@ (define-public python-sybil
 parsed examples as part of your normal test run.  Integration is
 provided for the main Python test runners.")
     (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.36.1


[-- Attachment #1.27: v6-0026-gnu-Add-python-pyvistaqt.patch --]
[-- Type: text/x-patch, Size: 2489 bytes --]

From a713ef10570ba133db8964b215d3dad007d14594 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 v6 26/28] 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 07aea5f57a..6868b0479d 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1564,3 +1564,44 @@ (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-pyvistaqt
+  (package
+    (name "python-pyvistaqt")
+    (version "0.9.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/pyvista/pyvistaqt")
+             (commit version)))
+       (sha256
+        (base32 "0wp60z1sdcr82j90q5waii7z23r57pfwl1wr3lmxkpqjc7bz0gq4"))))
+    (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.36.1


[-- Attachment #1.28: v6-0027-gnu-Add-python-mffpy.patch --]
[-- Type: text/x-patch, Size: 1991 bytes --]

From be825118585ffe8059dea3f5ae3c49bd4514a2ba 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 v6 27/28] 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 6868b0479d..78ef733750 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1605,3 +1605,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.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/BEL-Public/mffpy")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "0pjp1awzqla7nw3q68a9p3vbz9ish92b8v1j7h8fvjbd2x3395h5"))))
+    (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.36.1


[-- Attachment #1.29: v6-0028-gnu-Add-python-mne.patch --]
[-- Type: text/x-patch, Size: 4084 bytes --]

From ed24fd862a0a9bd06ecc3a25dd4c2c6542226252 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 v6 28/28] 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 78ef733750..ef0b7f2cd7 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -46,6 +46,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)
@@ -57,6 +58,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)
@@ -1636,3 +1638,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 "1.0.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "mne" version))
+       (sha256
+        (base32
+         "1vfgqpvjq2b3x1wkw7mn7hk6gcxbvgqfknbh9qkg2r7r22cy38p5"))))
+    (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.36.1


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

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

end of thread, other threads:[~2022-05-26 21:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.