Bug 1652976 (python-mne-bids) - Review Request: python-mne-bids - Experimental code for BIDS using MNE
Summary: Review Request: python-mne-bids - Experimental code for BIDS using MNE
Alias: python-mne-bids
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Ankur Sinha (FranciscoD)
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: fedora-neuro
TreeView+ depends on / blocked
Reported: 2018-11-23 19:33 UTC by Luis Bazan
Modified: 2018-12-06 03:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-12-06 02:49:36 UTC
Type: Bug
sanjay.ankur: fedora-review+

Attachments (Terms of Use)

Description Luis Bazan 2018-11-23 19:33:07 UTC
Spec URL: https://lbazan.fedorapeople.org/python-mne-bids.spec
SRPM URL: https://lbazan.fedorapeople.org/python-mne-bids-0.1-1.fc29.src.rpm

This is a repository for creating BIDS-compatible datasets with MNE.

Fedora Account System Username: lbazan

Comment 1 Ankur Sinha (FranciscoD) 2018-11-25 15:06:01 UTC
Here's the review. Needs a few improvements:

Package Review

[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed


- License field should be updated
- If you use the github tar, it contains the LICENSE, examples, and docs. Maybe
  file a ticket upstream to request them to include the license in the Pypi
  tarball, but use the Github tarball in the meantime?
- Please test build on F28/F29
- Please correct the rpmlint issue
- Please enable tests

===== MUST items =====

[!]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging

License should simply be BSD.

[!]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.

You should either:
- Add the license file from the github repo as
  SOURCE1: https://raw.githubusercontent.com/mne-tools/mne-bids/master/LICENSE
- File a ticket upstream asking them to include the license, and mention
  this as a comment, and use the Github tar in the meantime.

[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "*No copyright* BSD (unspecified)". 9
     files have unknown license. Detailed output of licensecheck in

License should simply be "BSD".

[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[!]: Requires correct, justified where necessary.
The setup.py file in the package is unfortunately incomplete:

`grep -nr "import"` shows that the package needs numpy, pandas, six, shutil,
scipy, json. These would get caught if the tests were run I reckon. You can
submit a PR upstream or at least file an issue letting them know. Since these
are not mentioned in setup.py, the automatic dep generator has also not found
them and they need to be listed manually as Requires and BuildRequires:

$ grep -rn "import" *
bin/mne_bids:4:import sys
bin/mne_bids:5:import glob
bin/mne_bids:6:import subprocess
bin/mne_bids:7:import os.path as op
bin/mne_bids:9:import mne_bids
mne_bids/pick.py:5:from mne.io.constants import FIFF
mne_bids/utils.py:10:import os
mne_bids/utils.py:11:import os.path as op
mne_bids/utils.py:12:import re
mne_bids/utils.py:13:import errno
mne_bids/utils.py:14:from collections import OrderedDict
mne_bids/utils.py:15:import json
mne_bids/utils.py:16:import shutil as sh
mne_bids/utils.py:18:import numpy as np
mne_bids/utils.py:19:from scipy.io import loadmat, savemat
mne_bids/utils.py:20:from mne import read_events, find_events
mne_bids/utils.py:21:from mne.externals.six import string_types
mne_bids/utils.py:22:from mne.channels import read_montage
mne_bids/utils.py:23:from mne.io.pick import pick_types
mne_bids/utils.py:25:from .config import BIDS_VERSION
mne_bids/utils.py:26:from .io import _parse_ext
mne_bids/commands/mne_bids_raw_to_bids.py:10:from mne_bids import write_raw_bids, make_bids_basename
mne_bids/commands/mne_bids_raw_to_bids.py:11:from mne_bids.io import _read_raw
mne_bids/commands/mne_bids_raw_to_bids.py:16:    from mne.commands.utils import get_optparser
mne_bids/io.py:9:from mne import io
mne_bids/io.py:10:import os
mne_bids/datasets.py:9:import os
mne_bids/datasets.py:10:import os.path as op
mne_bids/datasets.py:11:import shutil
mne_bids/datasets.py:12:import tarfile
mne_bids/datasets.py:13:from six.moves import urllib
mne_bids/datasets.py:15:from mne.utils import _fetch_file
mne_bids/mne_bids.py:11:import os
mne_bids/mne_bids.py:12:import errno
mne_bids/mne_bids.py:13:import os.path as op
mne_bids/mne_bids.py:15:import shutil as sh
mne_bids/mne_bids.py:16:import pandas as pd
mne_bids/mne_bids.py:17:from collections import defaultdict, OrderedDict
mne_bids/mne_bids.py:19:import numpy as np
mne_bids/mne_bids.py:20:from numpy.testing import assert_array_equal
mne_bids/mne_bids.py:22:from mne import Epochs
mne_bids/mne_bids.py:23:from mne.io.constants import FIFF
mne_bids/mne_bids.py:24:from mne.io.pick import channel_type
mne_bids/mne_bids.py:25:from mne.io import BaseRaw
mne_bids/mne_bids.py:26:from mne.channels.channels import _unit2human
mne_bids/mne_bids.py:27:from mne.utils import check_version
mne_bids/mne_bids.py:29:from datetime import datetime
mne_bids/mne_bids.py:30:from warnings import warn
mne_bids/mne_bids.py:32:from .pick import coil_type
mne_bids/mne_bids.py:33:from .utils import (make_bids_basename, make_bids_folders,
mne_bids/mne_bids.py:39:from .io import _parse_ext, ALLOWED_EXTENSIONS, reader
mne_bids/__init__.py:6:from .mne_bids import write_raw_bids  # noqa
mne_bids/__init__.py:7:from .utils import make_bids_folders, make_bids_basename  # noqa
mne_bids/__init__.py:8:from .config import BIDS_VERSION  # noqa
mne_bids.egg-info/PKG-INFO:42:            $ python -c 'import mne_bids'
mne_bids.egg-info/PKG-INFO:49:        In addition to `import mne_bids`, you can use the command line interface.
PKG-INFO:42:            $ python -c 'import mne_bids'
PKG-INFO:49:        In addition to `import mne_bids`, you can use the command line interface.
README.md:33:    $ python -c 'import mne_bids'
README.md:40:In addition to `import mne_bids`, you can use the command line interface.
setup.py:2:from setuptools import setup, find_packages

[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[-]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

[x]: Python eggs must not download any dependencies during the build
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

[!]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.

As noted above.

[x]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.
[x]: Latest version is packaged.
[-]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
Please double check that it builds on F29/F28. It builds properly on rawhide,
but F28/29 are where we have both py2 and py3.

[!]: %check is present and all tests pass.
The tests havent been run. Please change the bcond_with to bcond_without to enable

[-]: Packages should try to preserve timestamps of original installed
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.

Checking: python3-mne-bids-0.1-1.fc30.noarch.rpm
python3-mne-bids.noarch: W: spelling-error %description -l en_US datasets -> data sets, data-sets, databases
python3-mne-bids.noarch: W: invalid-license 3-clause

Noted above.

python3-mne-bids.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/mne_bids/commands/mne_bids_raw_to_bids.py /usr/bin/env python

^ This needs to be corrected by deleting the unneeded shebang with something
like this:

sed -i '/\/usr\/bin\/env python/ d' <file>

python3-mne-bids.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/mne_bids/commands/mne_bids_raw_to_bids.py 644 /usr/bin/env python

^ This will be corrected if the shebang is removed.

python3-mne-bids.noarch: W: no-manual-page-for-binary mne_bids
python-mne-bids.src: W: spelling-error %description -l en_US datasets -> data sets, data-sets, databases
python-mne-bids.src: W: invalid-license 3-clause
2 packages and 0 specfiles checked; 2 errors, 5 warnings.

Rpmlint (installed packages)
sh: /usr/bin/python: No such file or directory
python3-mne-bids.noarch: W: spelling-error %description -l en_US datasets -> data sets, data-sets, databases
python3-mne-bids.noarch: W: invalid-license 3-clause
python3-mne-bids.noarch: W: invalid-url URL: https://mne-tools.github.io/mne-bids/ <urlopen error [Errno -2] Name or service not known>
python3-mne-bids.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/mne_bids/commands/mne_bids_raw_to_bids.py /usr/bin/env python
python3-mne-bids.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/mne_bids/commands/mne_bids_raw_to_bids.py 644 /usr/bin/env python

^ Noted above.

python3-mne-bids.noarch: W: no-manual-page-for-binary mne_bids
1 packages and 0 specfiles checked; 2 errors, 4 warnings.

python3-mne-bids (rpmlib, GLIBC filtered):


Source checksums
https://files.pythonhosted.org/packages/source/m/mne-bids/mne-bids-0.1.tar.gz :
  CHECKSUM(SHA256) this package     : 402524ef5c3aa466e601dca078ee2c379ebd0a8ba4d20792cf390e240fe47d37
  CHECKSUM(SHA256) upstream package : 402524ef5c3aa466e601dca078ee2c379ebd0a8ba4d20792cf390e240fe47d37

Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -b 1652976
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: Java, C/C++, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP

Comment 5 Ankur Sinha (FranciscoD) 2018-11-27 19:50:27 UTC
Looks good! The spec has a few tabs in a few place. Please either use spaces or tabs, but not both. Please tweak this before importint to SCM.


Comment 6 Gwyn Ciesla 2018-11-27 20:03:18 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-mne-bids

Comment 7 Ankur Sinha (FranciscoD) 2018-11-27 20:04:40 UTC
All the tests pass in mock with network enabled. Please make a note of this in the spec with the below command when you import the package:

mock -r fedora-rawhide-x86_64 rebuild ./python-mne-bids-0.1-2.fc29.src.rpm --enable-network --rpmbuild-opts="--with tests"

Comment 8 Fedora Update System 2018-11-27 21:23:06 UTC
python-mne-bids-0.1-2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-6422f80d40

Comment 9 Fedora Update System 2018-11-27 21:23:11 UTC
python-mne-bids-0.1-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-618bd6bafd

Comment 10 Fedora Update System 2018-11-28 03:48:04 UTC
python-mne-bids-0.1-2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-618bd6bafd

Comment 11 Fedora Update System 2018-11-28 04:52:08 UTC
python-mne-bids-0.1-2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-6422f80d40

Comment 12 Fedora Update System 2018-12-06 02:49:36 UTC
python-mne-bids-0.1-2.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2018-12-06 03:56:44 UTC
python-mne-bids-0.1-2.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.