diff mbox series

[bug#53402] Add python-mne: fix or disable tests

Message ID 878rv9ijhv.fsf@planete-kraus.eu
State New
Headers show
Series [bug#53402] Add python-mne: fix or disable tests | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Vivien Kraus Jan. 21, 2022, 8:17 a.m. UTC
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.
diff mbox series

Patch

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