Bug 2213561 - Review Request: python-xarray-einstats - Stats, linear algebra and einops for xarray
Summary: Review Request: python-xarray-einstats - Stats, linear algebra and einops for...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tom Rix
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2085807
TreeView+ depends on / blocked
 
Reported: 2023-06-08 14:30 UTC by Sergio Pascual
Modified: 2024-01-14 16:47 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-01-14 16:47:50 UTC
Type: ---
Embargoed:
trix: fedora-review+


Attachments (Terms of Use)

Description Sergio Pascual 2023-06-08 14:30:09 UTC
Spec URL: https://sergiopr.fedorapeople.org/python-xarray-einstats.spec
SRPM URL: https://sergiopr.fedorapeople.org/python-xarray-einstats-0.5.1-1.fc39.src.rpm
Description: xarray-einstats is an open source Python library part of the ArviZ project. It acts as a bridge between the xarray library for labelled arrays and 
libraries for raw arrays such as NumPy or SciPy
Fedora Account System Username: sergiopr

Comment 1 Sergio Pascual 2023-06-08 14:33:20 UTC
Rrquired by python-arviz 0.15

Comment 2 Felix Wang 2023-06-09 08:45:38 UTC
%bcond_without check

%global srcname xarray-einstats

Name: python-%{srcname}
Version: 0.5.1
Release: 1%{?dist}
Summary: Stats, linear algebra and einops for xarray
License: Apache-2.0

URL: https://github.com/arviz-devs/xarray-einstats
Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz

BuildArch: noarch
BuildRequires:  python3-devel

%global _description %{expand:
xarray-einstats is an open source Python library part of the ArviZ project.
It acts as a bridge between the xarray library for labelled arrays and
libraries for raw arrays such as NumPy or SciPy.}

%description %_description

%package -n python3-%{srcname}
Summary: %{summary}

%description -n python3-%{srcname}
%_description

%prep
%autosetup -n %{srcname}-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%pyproject_save_files xarray_einstats

%check
# use pytest, but skip tests/test_einops.py and tests/test_numba.py files
#rm tests/test_einops.py tests/test_numba.py
%pytest -v --ignore=tests/test_einops.py --ignore=tests/test_numba.py

%files -n python3-%{srcname} -f %{pyproject_files}
%doc README.md

%changelog
* Sat Jun 03 2023 Sergio Pascual <sergiopr> - 0.5.1-1
- Initial package


----


> # Tests are not included in the tarball
> %pyproject_check_import -t

You can use the tarball from github instead, which may do testing.
Ref: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_source_files_from_pypi

Only the following place is the one needs to be modified, others look fine to me.

Comment 3 Felix Wang 2023-06-09 08:51:04 UTC
Package Review
==============

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


Issues:
=======
- 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.
  Note: License file LICENSE is not marked as %license
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/LicensingGuidelines/#_license_text


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

Generic:
[ ]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
     Note: Using prebuilt packages
[ ]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[ ]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Apache License 2.0", "*No copyright* Apache License", "Unknown
     or generated". 8 files have unknown license. Detailed output of
     licensecheck in /var/lib/copr-rpmbuild/results/python-xarray-
     einstats/licensecheck.txt
[ ]: Package contains no bundled libraries without FPC exception.
[ ]: Changelog in prescribed format.
[ ]: 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
[ ]: Package uses nothing in %doc for runtime.
[ ]: Package consistently uses macros (instead of hard-coded directory
     names).
[ ]: Package is named according to the Package Naming Guidelines.
[ ]: Package does not generate any conflict.
[ ]: 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.
[ ]: 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.
[ ]: Package complies to the Packaging Guidelines
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: No rpmlint messages.
[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:
[ ]: Python eggs must not download any dependencies during the build
     process.
[ ]: A package which is used by another package via an egg interface should
     provide egg info.
[ ]: 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:
[!]: Reviewer should test that the package builds in mock.
[ ]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[ ]: Final provides and requires are sane (see attachments).
[ ]: Package functions as described.
[ ]: Latest version is packaged.
[ ]: 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.
[ ]: Package should compile and build into binary rpms on all supported
     architectures.
[ ]: %check is present and all tests pass.
[ ]: Packages should try to preserve timestamps of original installed
     files.
[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: No rpmlint messages.


Rpmlint
-------
Checking: python3-xarray-einstats-0.5.1-1.fc39.noarch.rpm
          python-xarray-einstats-0.5.1-1.fc39.src.rpm
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmpcyl7_xmk')]
checks: 31, packages: 2

 2 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.1 s 




Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 31, packages: 1

 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.0 s 



Source checksums
----------------
https://files.pythonhosted.org/packages/source/x/xarray-einstats/xarray-einstats-0.5.1.tar.gz :
  CHECKSUM(SHA256) this package     : 45283e8b471ac54ac2957bc14e311f681b84dabc50c85959b9931e6f5cc60bcb
  CHECKSUM(SHA256) upstream package : 45283e8b471ac54ac2957bc14e311f681b84dabc50c85959b9931e6f5cc60bcb


Requires
--------
python3-xarray-einstats (rpmlib, GLIBC filtered):
    python(abi)
    python3.11dist(numpy)
    python3.11dist(scipy)
    python3.11dist(xarray)



Provides
--------
python3-xarray-einstats:
    python-xarray-einstats
    python3-xarray-einstats
    python3.11-xarray-einstats
    python3.11dist(xarray-einstats)
    python3dist(xarray-einstats)



Generated by fedora-review 0.9.0 (6761b6c) last change: 2022-08-23
Command line :/usr/bin/fedora-review --no-colors --prebuilt --rpm-spec --name python-xarray-einstats --mock-config /var/lib/copr-rpmbuild/results/configs/child.cfg
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Python, Generic
Disabled plugins: SugarActivity, Java, Perl, R, fonts, Ocaml, PHP, C/C++, Haskell
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH


---

> Issues:
> =======
> - 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.
>   Note: License file LICENSE is not marked as %license
>   See: https://docs.fedoraproject.org/en-US/packaging-
>   guidelines/LicensingGuidelines/#_license_text

Not clear why reported this, since the %{pyproject_files} can handle and install the code files and %license files.

Comment 4 Sergio Pascual 2023-07-10 15:57:51 UTC
Thanks for your revieew

I have updated the spec to:

* Get the source from github
* Run the tests. I have removed some tests that require packages not in FEdora
* Include the License. It seems that pyproject_files can get the LICENSE file only in certain cases (Only license files declared via PEP 639 License-File field are detected, https://src.fedoraproject.org/rpms/pyproject-rpm-macros/blob/rawhide/f/README.md)

SPEC https://sergiopr.fedorapeople.org/python-xarray-einstats.spec
SRPM https://sergiopr.fedorapeople.org/python-xarray-einstats-0.5.1-2.fc39.src.rpm

After the rebuild with python 3.12, some dependencies are still broken, in particular xarray. I have tested the package with f38 instead

Comment 5 Sergio Pascual 2023-08-29 03:05:07 UTC
Is there anything more required to finish the review?

Comment 6 Package Review 2023-09-29 00:45:30 UTC
This is an automatic action taken by review-stats script.

The ticket reviewer failed to clear the NEEDINFO flag in a month.
As per https://fedoraproject.org/wiki/Policy_for_stalled_package_reviews
we reset the status and the assignee of this ticket.

Comment 7 Tom Rix 2024-01-01 13:59:08 UTC
Looks like this is stalled, taking.

Comment 8 Tom Rix 2024-01-01 14:05:40 UTC
There is newer source that could be used.
Otherwise this looks fine, approved

If you have interest, could you review
https://bugzilla.redhat.com/show_bug.cgi?id=2255637
For python-einops, a test that is skipped now could be enabled.

> pytest --ignore=tests/test_numba.py --ignore=tests/test_einops.py 
.............................................................................................................................................s...........................................................................
------------------------------------------------------------------------------
Ran 217 tests in 1.16s

OK (skipped=1)
>  pytest --ignore=tests/test_numba.py 
...........................................................................................................................................................s...........................................................................
------------------------------------------------------------------------------
Ran 231 tests in 1.18s

Comment 9 Fedora Admin user for bugzilla script actions 2024-01-04 20:16:46 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/python-xarray-einstats


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