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 1882527 - Review Request: python-sklearn-nature-inspired-algorithms - Nature Inspired Algorithms for scikit-learn
Summary: Review Request: python-sklearn-nature-inspired-algorithms - Nature Inspired ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: fedora-neuro, NeuroFedora
TreeView+ depends on / blocked
 
Reported: 2020-09-24 20:12 UTC by Ankur Sinha (FranciscoD)
Modified: 2020-10-23 22:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-18 15:49:40 UTC
Type: ---
Embargoed:
loganjerry: fedora-review+


Attachments (Terms of Use)

Description Ankur Sinha (FranciscoD) 2020-09-24 20:12:31 UTC
Spec URL: https://ankursinha.fedorapeople.org/python-sklearn-nature-inspired-algorithms/python-sklearn-nature-inspired-algorithms.spec
SRPM URL: https://ankursinha.fedorapeople.org/python-sklearn-nature-inspired-algorithms/python-sklearn-nature-inspired-algorithms-0.4.6-1.fc33.src.rpm

Description:
Nature inspired algorithms for hyper-parameter tuning of scikit-learn models.
This package uses algorithms implementation from NiaPy.

Fedora Account System Username: ankursinha

Comment 1 Jerry James 2020-10-09 14:56:56 UTC
A mock build with fedora-rawhide-x86_64 fails in %install:

+ '[' -d '/builddir/build/BUILDROOT/python-sklearn-nature-inspired-algorithms-0.4.6-1.fc34.x86_64%{python3_sitearch}' ']'
++ wc -l /builddir/build/BUILD/pyproject-ghost-distinfo
++ cut -f1 '-d '
wc: /builddir/build/BUILD/pyproject-ghost-distinfo: No such file or directory
+ lines=
+ '[' -ne 1 ']'
/var/tmp/rpm-tmp.pnxYPw: line 68: [: -ne: unary operator expected
+ /usr/bin/python3 /usr/lib/rpm/redhat/pyproject_save_files.py --output /builddir/build/BUILD/pyproject-files --buildroot /builddir/build/BUILDROOT/python-sklearn-nature-inspired-algorithms-0.4.6-1.fc34.x86_64 --sitelib '%{python3_sitelib}' --sitearch '%{python3_sitearch}' --python-version '%{python3_version}' --pyproject-record /builddir/build/BUILD/pyproject-record sklearn_nature_inspired_algorithms
Traceback (most recent call last):
  File "/usr/lib/rpm/redhat/pyproject_save_files.py", line 392, in <module>
    main(cli_args)
  File "/usr/lib/rpm/redhat/pyproject_save_files.py", line 365, in main
    file_section = pyproject_save_files(
  File "/usr/lib/rpm/redhat/pyproject_save_files.py", line 348, in pyproject_save_files
    parsed_records = load_parsed_record(pyproject_record)
  File "/usr/lib/rpm/redhat/pyproject_save_files.py", line 322, in load_parsed_record
    with open(pyproject_record) as pyproject_record_file:
FileNotFoundError: [Errno 2] No such file or directory: '/builddir/build/BUILD/pyproject-record'
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.pnxYPw (%install)
    Bad exit status from /var/tmp/rpm-tmp.pnxYPw (%install)

Comment 2 Ankur Sinha (FranciscoD) 2020-10-09 15:29:16 UTC
Thanks Jerry,

Very odd, it builds fine here in mock. Running a scratch build now to double-check. Looks like something in the pyproject-rpm-macros.

Cheers,
Ankur

Comment 3 Ankur Sinha (FranciscoD) 2020-10-09 15:37:14 UTC
It builds in a scratch build, not sure what's going on here:

https://koji.fedoraproject.org/koji/taskinfo?taskID=53085267

Could you check what version of pyproject-rpm-macros you are using, Jerry?

Comment 4 Ankur Sinha (FranciscoD) 2020-10-09 15:37:55 UTC
Ah no, the build passes, but I see the error. Looking into it now. (Sorry for all the notifications!)

Comment 5 Ankur Sinha (FranciscoD) 2020-10-09 15:45:58 UTC
So, the errors I get here are of this form:

```
Wrote: /builddir/build/SRPMS/python-sklearn-nature-inspired-algorithms-0.4.6-1.fc34.buildreqs.nosrc.rpm
Child return code was: 11
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.8/site-packages/mockbuild/util.py", line 789, in do_with_status
    raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode)
mockbuild.exception.Error: Command failed: 
 # bash --login -c /usr/bin/rpmbuild -br --target noarch --nodeps /builddir/build/SPECS/python-sklearn-nature-inspired-algorithms.spec
```

These are "normal errors" when the pyproject-rpm-macros are used, documented here: https://src.fedoraproject.org/rpms/pyproject-rpm-macros

"Note that %generate_buildrequires may produce error messages (exit 11) in the build log. This is expected behavior of BuildRequires generators; see the Fedora change for details."

I've re-uploaded the spec/srpm, in case they weren't the latest ones:

Spec: https://ankursinha.fedorapeople.org/python-sklearn-nature-inspired-algorithms/python-sklearn-nature-inspired-algorithms.spec
SRPM: https://ankursinha.fedorapeople.org/python-sklearn-nature-inspired-algorithms/python-sklearn-nature-inspired-algorithms-0.4.6-1.fc33.src.rpm

Comment 6 Jerry James 2020-10-09 16:51:56 UTC
I should have been more precise.  I ran "fedora-review -b 1882527 -m fedora-rawhide-x86_64" and got the error reported in comment 1.  I still get that error, even after your reupload.

On the host machine:
fedora-review-0.7.5-1.fc32.noarch
mock-2.6-1.fc32.noarch
mock-core-configs-33-1.fc32.noarch

In the mock chroot:
pyproject-rpm-macros-0-31.fc34

Does fedora-review work for you?  I'll try running mock directly on the SRPM.

Comment 7 Jerry James 2020-10-09 16:55:47 UTC
This is interesting.  A mock build does indeed work.  When mock downloads packages for the builds, most are marked as [SKIPPED] package-name: Already downloaded ... except for these 3:

(68/70): python3-rpm-macros-3.9-10.fc34.noarch. 117 kB/s |  13 kB     00:00
(69/70): python-rpm-macros-3.9-10.fc34.noarch.r  92 kB/s |  15 kB     00:00
(70/70): python3-rpm-generators-11-11.fc33.noar 180 kB/s |  29 kB     00:00

Now why weren't those downloaded when fedora-review did the building?

Comment 8 Jerry James 2020-10-09 17:05:29 UTC
I scrubbed my mock cache and reran fedora-review, and it succeeded this time.  I have no idea what was in that cache that caused this weird behavior.  I'll do a proper review now.  Sorry for the noise.

Comment 9 Ankur Sinha (FranciscoD) 2020-10-09 17:10:28 UTC
No worries, I got an even weirder error with fedora-review, so there's certainly something off somewhere:

```
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.Lhc6B6
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf Sklearn-Nature-Inspired-Algorithms-0.4.6
+ /usr/bin/gzip -dc /builddir/build/SOURCES/Sklearn-Nature-Inspired-Algorithms-0.4.6.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd Sklearn-Nature-Inspired-Algorithms-0.4.6
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/git init -q
/var/tmp/rpm-tmp.Lhc6B6: line 43: /usr/bin/git: No such file or directory


RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.Lhc6B6 (%prep)
    Bad exit status from /var/tmp/rpm-tmp.Lhc6B6 (%prep)
Finish: chroot ['rpm -i python-sklearn-nature-inspired-algorithms-0.4.6-1.fc33.src.rpm; rpmbuild --nodeps -bp $(rpm --eval %_specdir)/python-sklearn-nature-inspired-algorithms.spec;chmod -R  go+r  $(rpm --eval %_builddir)/* || :']
 None
```

This just worked on mock, so I wonder if fedora-review uses a different mock cache.. Oh well, I'll scrub it all and re-run it too.

Thanks for looking into it, Jerry :)

Comment 10 Jerry James 2020-10-09 17:29:29 UTC
Package Review
==============

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

Issues:
=======
- The SHOULD section warns that this package contains fonts.  That is due to
  sphinx-rtd-theme copying font files into the documentation directories.  In
  my packages, I have been requiring the relevant fonts:

  Requires:       fontawesome-fonts-web
  Requires:       font(fontawesome)
  Requires:       font(lato)
  Requires:       font(robotoslab)

  then going through contortions to replace the font files with symlinks to
  the fonts in those packages.  See python-cvxopt for an example.  It is ugly
  and horrible and possibly not worth the effort.  I'll let you judge that.

- Regarding the rpmlint rpm-buildroot-usage warning, on line 74 of the spec
  file, PYTHONPATH is set to point into %{buildroot}.  Is that right?  This
  is %build, so %install hasn't happened yet.

===== 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.
[x]: License file installed when any subpackage combination is installed.
[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.
[x]: Requires correct, justified where necessary.
[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.
[x]: 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]: 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:
[!]: Avoid bundling fonts in non-fonts packages.
     Note: Package contains font files
[-]: 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).
[x]: Fully versioned dependency in subpackages if applicable.
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: 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.
[x]: %check is present and all tests pass.
[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:
[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.


Rpmlint
-------
Checking: python3-sklearn-nature-inspired-algorithms-0.4.6-1.fc34.noarch.rpm
          python-sklearn-nature-inspired-algorithms-doc-0.4.6-1.fc34.noarch.rpm
          python-sklearn-nature-inspired-algorithms-0.4.6-1.fc34.src.rpm
python3-sklearn-nature-inspired-algorithms.noarch: W: spelling-error Summary(en_US) scikit -> sci kit, sci-kit, kitsch
python3-sklearn-nature-inspired-algorithms.noarch: W: spelling-error %description -l en_US scikit -> sci kit, sci-kit, kitsch
python-sklearn-nature-inspired-algorithms-doc.noarch: W: spelling-error Summary(en_US) scikit -> sci kit, sci-kit, kitsch
python-sklearn-nature-inspired-algorithms.src: W: spelling-error Summary(en_US) scikit -> sci kit, sci-kit, kitsch
python-sklearn-nature-inspired-algorithms.src: W: spelling-error %description -l en_US scikit -> sci kit, sci-kit, kitsch
python-sklearn-nature-inspired-algorithms.src:74: W: rpm-buildroot-usage %build PYTHONPATH=%{buildroot}/%{python3_sitelib} make -C docs SPHINXBUILD=sphinx-build-3 html
3 packages and 0 specfiles checked; 0 errors, 6 warnings.




Rpmlint (installed packages)
----------------------------
warning: Found bdb Packages database while attempting sqlite backend: using bdb backend.
warning: Found bdb Packages database while attempting sqlite backend: using bdb backend.
python-sklearn-nature-inspired-algorithms-doc.noarch: W: spelling-error Summary(en_US) scikit -> sci kit, sci-kit, kitsch
warning: Found bdb Packages database while attempting sqlite backend: using bdb backend.
python3-sklearn-nature-inspired-algorithms.noarch: W: spelling-error Summary(en_US) scikit -> sci kit, sci-kit, kitsch
python3-sklearn-nature-inspired-algorithms.noarch: W: spelling-error %description -l en_US scikit -> sci kit, sci-kit, kitsch
2 packages and 0 specfiles checked; 0 errors, 3 warnings.



Source checksums
----------------
https://github.com/timzatko/Sklearn-Nature-Inspired-Algorithms/archive/v0.4.6/Sklearn-Nature-Inspired-Algorithms-0.4.6.tar.gz :
  CHECKSUM(SHA256) this package     : 4fa30a4225d08e18ffde8380600b82f19e1b49f46e5d576d9e4a122b6fa569f0
  CHECKSUM(SHA256) upstream package : 4fa30a4225d08e18ffde8380600b82f19e1b49f46e5d576d9e4a122b6fa569f0


Requires
--------
python3-sklearn-nature-inspired-algorithms (rpmlib, GLIBC filtered):
    python(abi)
    python3.9dist(matplotlib)
    python3.9dist(niapy)
    python3.9dist(numpy)
    python3.9dist(pandas)
    python3.9dist(scikit-learn)
    python3.9dist(seaborn)
    python3.9dist(toml)

python-sklearn-nature-inspired-algorithms-doc (rpmlib, GLIBC filtered):



Provides
--------
python3-sklearn-nature-inspired-algorithms:
    python-sklearn-nature-inspired-algorithms
    python3-sklearn-nature-inspired-algorithms
    python3.9-sklearn-nature-inspired-algorithms
    python3.9dist(sklearn-nature-inspired-algorithms)
    python3dist(sklearn-nature-inspired-algorithms)

python-sklearn-nature-inspired-algorithms-doc:
    python-sklearn-nature-inspired-algorithms-doc



Generated by fedora-review 0.7.5 (5fa5b7e) last change: 2020-02-16
Command line :/usr/bin/fedora-review -b 1882527 -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Python, Generic
Disabled plugins: C/C++, Perl, Haskell, PHP, Ocaml, SugarActivity, R, Java, Ruby, fonts
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 11 Ankur Sinha (FranciscoD) 2020-10-09 18:51:59 UTC
Thanks for the review!

(In reply to Jerry James from comment #10)
> Package Review
> ==============
> 
> Legend:
> [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
> 
> Issues:
> =======
> - The SHOULD section warns that this package contains fonts.  That is due to
>   sphinx-rtd-theme copying font files into the documentation directories.  In
>   my packages, I have been requiring the relevant fonts:
> 
>   Requires:       fontawesome-fonts-web
>   Requires:       font(fontawesome)
>   Requires:       font(lato)
>   Requires:       font(robotoslab)
> 
>   then going through contortions to replace the font files with symlinks to
>   the fonts in those packages.  See python-cvxopt for an example.  It is ugly
>   and horrible and possibly not worth the effort.  I'll let you judge that.
> 
> - Regarding the rpmlint rpm-buildroot-usage warning, on line 74 of the spec
>   file, PYTHONPATH is set to point into %{buildroot}.  Is that right?  This
>   is %build, so %install hasn't happened yet.
> 


Upstream provides docs on rtd, so I've disabled the doc generation. It isn't worth the effort of unbundling the fonts etc.
I also fixed the second issue (but since the docs aren't being generated, that line isn't used anyway).

* Fri Oct 09 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.6-2
- Do not include generated docs: bundle lots of fonts
- Correct doc generation command

Updated spec/srpm:

Spec: https://ankursinha.fedorapeople.org/python-sklearn-nature-inspired-algorithms/python-sklearn-nature-inspired-algorithms.spec
SRPM: https://ankursinha.fedorapeople.org/python-sklearn-nature-inspired-algorithms/python-sklearn-nature-inspired-algorithms-0.4.6-2.fc33.src.rpm

Cheers,
Ankur

Comment 12 Jerry James 2020-10-09 19:01:54 UTC
Looks good.  This package is APPROVED.

Comment 13 Gwyn Ciesla 2020-10-09 19:45:35 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-sklearn-nature-inspired-algorithms

Comment 14 Fedora Update System 2020-10-09 20:28:17 UTC
FEDORA-2020-b2a0d0bfe9 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-b2a0d0bfe9

Comment 15 Fedora Update System 2020-10-09 20:28:18 UTC
FEDORA-2020-4706b3d63c has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-4706b3d63c

Comment 16 Fedora Update System 2020-10-10 17:46:29 UTC
FEDORA-2020-4706b3d63c has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2020-4706b3d63c \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-4706b3d63c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Fedora Update System 2020-10-10 23:00:54 UTC
FEDORA-2020-b2a0d0bfe9 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2020-b2a0d0bfe9 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b2a0d0bfe9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 18 Fedora Update System 2020-10-18 15:49:40 UTC
FEDORA-2020-b2a0d0bfe9 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 19 Fedora Update System 2020-10-23 22:09:12 UTC
FEDORA-2020-4706b3d63c has been pushed to the Fedora 33 stable repository.
If problem still persists, 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.