From patchwork Fri Feb 11 03:03:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vivien Kraus X-Patchwork-Id: 37203 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 938B027BBEA; Fri, 11 Feb 2022 03:04:24 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EEA6C27BBE9 for ; Fri, 11 Feb 2022 03:04:20 +0000 (GMT) Received: from localhost ([::1]:55280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nIMEO-0005gq-2H for patchwork@mira.cbaines.net; Thu, 10 Feb 2022 22:04:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIME6-0005ge-Hf for guix-patches@gnu.org; Thu, 10 Feb 2022 22:04:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35782) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nIME6-0002gJ-5W for guix-patches@gnu.org; Thu, 10 Feb 2022 22:04:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nIME5-0007jA-Ur for guix-patches@gnu.org; Thu, 10 Feb 2022 22:04:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53402] Rebase it for the new python packages Resent-From: Vivien Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 11 Feb 2022 03:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53402 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Vinicius Monego , 53402@debbugs.gnu.org Received: via spool by 53402-submit@debbugs.gnu.org id=B53402.164454861129665 (code B ref 53402); Fri, 11 Feb 2022 03:04:01 +0000 Received: (at 53402) by debbugs.gnu.org; 11 Feb 2022 03:03:31 +0000 Received: from localhost ([127.0.0.1]:57913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIMDb-0007iP-9n for submit@debbugs.gnu.org; Thu, 10 Feb 2022 22:03:31 -0500 Received: from planete-kraus.eu ([89.234.140.182]:33770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIMDY-0007iF-SU for 53402@debbugs.gnu.org; Thu, 10 Feb 2022 22:03:30 -0500 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id b3c464f8; Fri, 11 Feb 2022 03:03:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:subject:from:to:date:in-reply-to:references :content-type:mime-version; s=dkim; bh=sz4behkbpJ880etCaldz3Nf9B Go=; b=SKmqGbw0AamNNXvXc4YYRdypQjZPxfUAcfvTFRoaWWRxGDzg2n4/ly9Xa HAbb+B7gWskRJTpmx6WDjGP7QWiLs8F+NCy9eo5ZdpiJihUNqmDDQ1TJYKZOsW+Q ReSuOiIeaLr22i3dbn1K54OX4uLjtEXVKxsxAMdeK9EM4Ar+MA= Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 8a9bc63b (TLSv1.3:AEAD-CHACHA20-POLY1305-SHA256:256:NO); Fri, 11 Feb 2022 03:03:22 +0000 (UTC) Message-ID: <221569342c7c44d5ed2ddd1ce0e56903d3cda0b2.camel@planete-kraus.eu> Date: Fri, 11 Feb 2022 04:03:14 +0100 In-Reply-To: References: <1161a7298bbbbe87ce48f4e3e4846021204ae1df.camel@posteo.net> User-Agent: Evolution 3.42.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Vivien X-ACL-Warn: , Vivien via Guix-patches X-Patchwork-Original-From: Vivien via Guix-patches via From: Vivien Kraus X-getmail-retrieved-from-mailbox: Patches 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 From 22bcd7078ae3a61b816310fe545243d5f5a0c1eb Mon Sep 17 00:00:00 2001 From: Vivien Kraus 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