Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1931183 - Review Request: python-spikeextractors - Python module for extracting recorded and spike sorted extracellular data from different file types and formats
Summary: Review Request: python-spikeextractors - Python module for extracting recorde...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ankur Sinha (FranciscoD)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1948573 2001678 2001684 2002848 2005105 2005122 2005132
Blocks: fedora-neuro, NeuroFedora
TreeView+ depends on / blocked
 
Reported: 2021-02-21 11:17 UTC by Andy Mender
Modified: 2021-09-20 05:25 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-20 05:25:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
pytest test log (deleted)
2021-09-12 20:06 UTC, Andy Mender
no flags Details

Description Andy Mender 2021-02-21 11:17:02 UTC
Spec URL: https://github.com/AndyMender/SPECS/blob/master/python-spikeextractors/python-spikeextractors.spec
SRPM URL: https://github.com/AndyMender/SPECS/blob/master/python-spikeextractors/python-spikeextractors-0.9.0-1.fc33.src.rpm?raw=true
Description: SpikeExtractors attempts to standardize data retrieval rather than data storage. This eliminates the need for shared file formats and allows 
for the creation of new tools built off of our data retrieval guidelines.

In addition to implementing multi-format I/O for various formats, the framework makes it possible to develop software tools that are agnostic 
to the underlying formats by working with the standardized python objects (recording and sorting extractors). 
These include processing routines (filters, sorting algorithms, downstream processing), and visualization widgets.
It also provides mechanisms for lazy manipulation of recordings and sortings (concatenation, combination, subset extraction).

Fedora Account System Username: andymenderunix

python-spikeextractors actually covers a lot more extra dependencies than is listed in the setup.py of the project and these are tested in the unit test suite, however one of the tests currently fails: https://github.com/SpikeInterface/spikeextractors/issues/577

I marked unit tests as optional, but that doesn't solve the problem.

Comment 1 Andy Mender 2021-02-21 11:19:41 UTC
This is a resubmission of https://bugzilla.redhat.com/show_bug.cgi?id=1727506

Comment 2 Andy Mender 2021-02-21 11:21:22 UTC
Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=62422465

Comment 3 Ankur Sinha (FranciscoD) 2021-02-23 21:09:12 UTC
Thanks very much Andy! I'll have a look at this in the next day or two.

Comment 5 Ankur Sinha (FranciscoD) 2021-02-27 17:29:00 UTC
Looks very good.

A few comments below.

Package Review
==============

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

- Can you please regenerate the srpm from the latest version of the spec?

- You don't need explicit Requires. It should be done automatically nowadays: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_automatically_generated_dependencies

  Only the ones that aren't mentioned in the setup.py need to be included in the spec.

- the %description bit for the python3 subpackage is missing the text.

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

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "Expat License", "*No copyright* Apache
     License". 88 files have unknown license. Detailed output of
     licensecheck in /home/asinha/dump/fedora-reviews/1931183-python-
     spikeextractors/licensecheck.txt
[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
     names).
[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.
^
See note about automated generated requires.

[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: 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]: 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.
[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]: 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 must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[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
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[x]: Python eggs must not download any dependencies during the build
     process.
[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]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep

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

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.
^
Not tested this out.

[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: 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
     architectures.
[?]: %check is present and all tests pass.
^
The issue is reported upstream. We'll need to follow that up and enable the tests when possible.

[x]: Packages should try to preserve timestamps of original installed
     files.
[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
     $RPM_BUILD_ROOT)
[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 =====

Generic:
[!]: Spec file according to URL is the same as in SRPM.
     Note: Spec file as given by url is not the same as in SRPM (see
     attached diff).
     See: (this test has no URL)
^
Can you regenerate the SRPM from the latest version of the spec please?

[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).


Rpmlint
-------
Checking: python3-spikeextractors-0.9.0-1.fc35.noarch.rpm
          python-spikeextractors-0.9.0-1.fc35.src.rpm
python3-spikeextractors.noarch: E: no-description-tag
python-spikeextractors.src: W: spelling-error %description -l en_US sortings -> sorting, sorting s, sortieing
2 packages and 0 specfiles checked; 1 errors, 1 warnings.




Rpmlint (installed packages)
----------------------------
python3-spikeextractors.noarch: E: no-description-tag
1 packages and 0 specfiles checked; 1 errors, 0 warnings.



Source checksums
----------------
https://github.com/SpikeInterface/spikeextractors/archive/0.9.0/spikeextractors-0.9.0.tar.gz :
  CHECKSUM(SHA256) this package     : f3008d1e4b5ec0da9a480f04f5601b7dc88ede9270deae8e6c8e806006b12168
  CHECKSUM(SHA256) upstream package : f3008d1e4b5ec0da9a480f04f5601b7dc88ede9270deae8e6c8e806006b12168


Requires
--------
python3-spikeextractors (rpmlib, GLIBC filtered):
    python(abi)
    python3.9dist(numpy)
    python3.9dist(tqdm)
    python3dist(h5py)
    python3dist(numpy)
    python3dist(pynwb)
    python3dist(tqdm)



Provides
--------
python3-spikeextractors:
    python-spikeextractors
    python3-spikeextractors
    python3.9-spikeextractors
    python3.9dist(spikeextractors)
    python3dist(spikeextractors)



Diff spec file in url and in SRPM
---------------------------------
--- /home/asinha/dump/fedora-reviews/1931183-python-spikeextractors/srpm/python-spikeextractors.spec	2021-02-27 16:57:21.825993228 +0000
+++ /home/asinha/dump/fedora-reviews/1931183-python-spikeextractors/srpm-unpacked/python-spikeextractors.spec	2021-02-21 10:54:14.000000000 +0000
@@ -71,2 +71,3 @@
 * Sun Feb 21 2021 Andy Mender <andymenderunix> - 0.9.0-1
 - Initial submission
+


Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 1931183
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Generic, Python
Disabled plugins: Haskell, Perl, fonts, Java, PHP, C/C++, R, SugarActivity, Ocaml
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 6 Andy Mender 2021-03-07 09:06:25 UTC
> - Can you please regenerate the srpm from the latest version of the spec?

Done! Here are the new links:
Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=63249710
SPEC URL: https://raw.githubusercontent.com/AndyMender/SPECS/master/python-spikeextractors/python-spikeextractors.spec
SRPM URL: https://github.com/AndyMender/SPECS/blob/master/python-spikeextractors/python-spikeextractors-0.9.3-1.fc33.src.rpm?raw=true

> - You don't need explicit Requires. It should be done automatically nowadays: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_automatically_generated_dependencies

Right, done!

> - the %description bit for the python3 subpackage is missing the text.

Done! Sorry for that.

Comment 8 Ankur Sinha (FranciscoD) 2021-04-19 17:28:54 UTC
It won't build because pynwb is FTBFS at the moment. I'll see if I can fix that so we can proceed here.

Comment 9 Ankur Sinha (FranciscoD) 2021-04-19 17:38:28 UTC
We're going to have to wait till hdmf supports h5py version 3.0. It's being worked on here, and will hopefully be merged soon: https://github.com/hdmf-dev/hdmf/pull/480

Comment 10 Andy Mender 2021-08-10 11:05:52 UTC
Looks like the PR linked above was merged and hdmf is at version 3.1.1: https://github.com/hdmf-dev/hdmf/releases/tag/3.1.1

I think we can proceed as soon as the python-h5py package is updated in Fedora, correct?

Comment 11 Ankur Sinha (FranciscoD) 2021-08-16 13:34:59 UTC
Yes, I'll take a look at updating pynwb/hdmf this week to unblock us here.

Comment 12 Ankur Sinha (FranciscoD) 2021-08-17 08:08:53 UTC
pynwb + hdmf have both been build for rawhide/f35, so you should be able to proceed with this package now.

Cheers,

Comment 13 Andy Mender 2021-08-24 11:14:17 UTC
(In reply to Ankur Sinha (FranciscoD) from comment #12)
> pynwb + hdmf have both been build for rawhide/f35, so you should be able to
> proceed with this package now.
> 
> Cheers,

Sounds good! Could you approve the review request and if possible set it to POST? I will request the repo afterwards.

Comment 14 Ankur Sinha (FranciscoD) 2021-08-24 11:18:10 UTC
I need to run it through fedora-review once again from the looks of it, since it didn't build when we'd tried last. I'll do that ASAP and get back to you.

Comment 15 Ankur Sinha (FranciscoD) 2021-08-24 11:37:50 UTC
Fedora review states that the build fails with this error:

RPM build errors:
    File not found: /builddir/build/BUILDROOT/python-spikeextractors-0.9.3-1.fc36.x86_64/usr/lib/python3.10/site-packages/spikeextractors-0.9.3-py?.?.egg-info
Child return code was: 1


This is because ?.? doesn't now work for 3.10. So your file section needs to be tweaked to say something like this:

%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info


Could you please make this tweak and check that it builds, and I'll continue from there?
Cheers,

Comment 16 Ankur Sinha (FranciscoD) 2021-08-24 11:40:58 UTC
Could you also enable the tests by default and see how that goes? We have the newest version of hdmf now, so maybe they'll all pass :D

Comment 17 Andy Mender 2021-08-29 19:00:49 UTC
(In reply to Ankur Sinha (FranciscoD) from comment #16)
> Could you also enable the tests by default and see how that goes? We have
> the newest version of hdmf now, so maybe they'll all pass :D

It didn't go quite well, unfortunately. It looks like now the package python-datalad is also required :(
https://koji.fedoraproject.org/koji/taskinfo?taskID=74751027

Should I submit that one for review as well?

Comment 18 Andy Mender 2021-08-29 19:03:08 UTC
Apologies, I didn't post the updated SPEC: https://raw.githubusercontent.com/AndyMender/SPECS/master/python-spikeextractors/python-spikeextractors.spec

Comment 19 Ankur Sinha (FranciscoD) 2021-08-31 10:47:37 UTC
(In reply to Andy Mender from comment #17)
> (In reply to Ankur Sinha (FranciscoD) from comment #16)
> > Could you also enable the tests by default and see how that goes? We have
> > the newest version of hdmf now, so maybe they'll all pass :D
> 
> It didn't go quite well, unfortunately. It looks like now the package
> python-datalad is also required :(
> https://koji.fedoraproject.org/koji/taskinfo?taskID=74751027
> 
> Should I submit that one for review as well?

That depends---is datalad an optional requirement? If yes, then for the time being we can proceed without it and disable the tests that need it. If it is a necessary requirement, though, we'll need to package it up. Could you check which scenario applies and we can proceed accordingly. I'm happy to help with the datalad package and its review etc. :)

Cheers,
Ankur

Comment 20 Ankur Sinha (FranciscoD) 2021-09-10 14:48:40 UTC
Andy, datalad has now been built for rawhide and I'm pushing updates for F35 and F34 also now. You should be able to proceed with this package now.

Do note that some tests may require network access, so you can disable those specific ones and only enable ones that run without network access.

Cheers,

Comment 21 Andy Mender 2021-09-12 20:06:08 UTC
Created attachment 1822545 [details]
pytest test log

Comment 22 Andy Mender 2021-09-12 20:08:23 UTC
Big thanks for submitting the extra packages! Unfortunately, it looks like each of the extractor classes requires additional dependencies and 2 tests are failing due to possible bugs in the already added dependencies (attached log).

At this point I am very tempted to disable all tests, but that also removes any guarantee the package is functional and shouldn't be done lightly. What do you think?

Comment 24 Ankur Sinha (FranciscoD) 2021-09-13 08:19:15 UTC
OK, so more deps:

- exdir
- hdf5storage (surprised this isn't in Fedora yet)
- MEArec
- shybrid

We can disable their tests and proceed in the meantime, and then keep packaging them up and enabling the tests. I'll start with exdir next.

About the buggy tests, we should report them upstream first and see what they say. If they're not trivial and upstream can't fix them (or suggest a workaround/fix) soon, these can also be disabled with a comment that includes the issue URL. You could take a quick look to see if it's something obvious (like a change in py3.10 perhaps) and see if it's possible to submit a patch?

Cheers,

Comment 25 Andy Mender 2021-09-19 21:17:29 UTC
(In reply to Ankur Sinha (FranciscoD) from comment #24)
> OK, so more deps:
> 
> - exdir
> - hdf5storage (surprised this isn't in Fedora yet)
> - MEArec
> - shybrid
> 
> We can disable their tests and proceed in the meantime, and then keep
> packaging them up and enabling the tests. I'll start with exdir next.
> 
> About the buggy tests, we should report them upstream first and see what
> they say. If they're not trivial and upstream can't fix them (or suggest a
> workaround/fix) soon, these can also be disabled with a comment that
> includes the issue URL. You could take a quick look to see if it's something
> obvious (like a change in py3.10 perhaps) and see if it's possible to submit
> a patch?
> 
> Cheers,

A quick update:
- I forgot to mention last time, but because the test cases run as unittest-style methods from a test class, it's not possible to silence only specific tests. This was supposedly fixed upstream in pytest (compatibility with unittest), but I couldn't get it to work with the suggested workaround.

- spikeextractors was now merged into spikeinterface: https://github.com/SpikeInterface/spikeinterface
  Not sure how this impacts your use case, but the old project will be used for bug fixes only and submitting new issues is already blocked: https://github.com/SpikeInterface/spikeextractors

- The exdir unit test still fails on the same assert call as before, because it somehow fails to recognize the exdir module.

- The value issues in the tests look like something related to h5py or overall compatibility on the line Python - numpy - h5py.

I think it might be worth opening a new review request for spikeinterface instead, since that's the umbrella project and perhaps it's also packaged a little differently. At least I see the test layout is different: https://github.com/SpikeInterface/spikeinterface/tree/master/spikeinterface/extractors/tests

I would hold off with opening extra review requests for spikeextractors dependencies as these may no longer be needed :).

Comment 26 Ankur Sinha (FranciscoD) 2021-09-20 05:25:48 UTC
Thanks Andy. Yeh, it makes sense to just package spikeinterface itself if that's the main project now.

I'll close this review ticket and we can proceed with spikeinterface then. If you do take it up, please assign it to me again, otherwise I'll get to it in a week or two :)

Thanks very much for all your work here,
Ankur


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