diff mbox series

[bug#53402] Rebase it for the new python packages

Message ID df09d62f7aa0e6a21362f9b7df5a88ff0ddd0a41.camel@planete-kraus.eu
State New
Headers show
Series [bug#53402] Rebase it for the new python packages | expand

Checks

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

Commit Message

Vivien Kraus Feb. 3, 2022, 7:29 p.m. UTC
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

Comments

Vinicius Monego Feb. 3, 2022, 8:49 p.m. UTC | #1
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
diff mbox series

Patch

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