diff mbox series

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

Message ID 221569342c7c44d5ed2ddd1ce0e56903d3cda0b2.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. 11, 2022, 3:03 a.m. UTC
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

Comments

Ludovic Courtès March 6, 2022, 9:48 p.m. UTC | #1
Hello!

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

Thanks for reviewing!

Ludo’.
Vinicius Monego March 9, 2022, 11:28 p.m. UTC | #2
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.
diff mbox series

Patch

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