Bug 2283682

Summary: Review Request: rust-ndarray-stats - Statistical routines for ArrayBase
Product: [Fedora] Fedora Reporter: Cristian Le <fedora>
Component: Package ReviewAssignee: Fabio Valentini <decathorpe>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: decathorpe, package-review
Target Milestone: ---Keywords: AutomationTriaged
Target Release: ---Flags: decathorpe: fedora-review+
Hardware: All   
OS: Linux   
URL: https://crates.io/crates/ndarray-stats
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-10-20 13:46:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2283681, 2283690    
Bug Blocks: 2283678    

Description Cristian Le 2024-05-28 19:51:27 UTC
Spec URL: https://github.com/LecrisUT/rust-metris-rpmspec/raw/18bb026c3e9d3de4cfbc75fe92babea0b3506a81/rust-ndarray-stats/rust-ndarray-stats.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/packit/LecrisUT-rust-metris-rpmspec-main/fedora-rawhide-x86_64/07500441-rust-ndarray-stats/rust-ndarray-stats-0.5.1-1.fc41.src.rpm
Description: Dependency for `rust-metrics-util` -> `rust-metrics-exporter-prometheus` -> `atuin`
Fedora Account System Username: lecris

rust2rpm.toml
```toml
[package]
summary = "Statistical routines for ArrayBase"

[requires]
build = [
    "tomcli",
]

[scripts.prep]
post = [
    "# Do not depend on criterion; it is needed only for benchmarks.",
    "tomcli set Cargo.toml del dev-dependencies.criterion",
]

[[package.extra-patches]]
comments = [
    "https://github.com/rust-ndarray/ndarray-stats/issues/96",
    "Bump approx dependency",
]
file = "rust-ndarray-stats-0.5.1-Bump_approx_dependency.diff"
number = 10

[tests]
skip = [
    "entropy::tests::test_cross_entropy_with_noisy_negative_qs",
    "entropy::tests::test_kl_with_noisy_negative_qs",
]
comments = [
    "Probably using debug_assert!"
]
```

Comment 1 Cristian Le 2024-07-05 13:31:29 UTC
Spec URL: https://github.com/LecrisUT/rust-metris-rpmspec/raw/83dda26784f2c9cbe603473e461adaec238ddb34/rust-ndarray-stats/rust-ndarray-stats.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/packit/LecrisUT-rust-metris-rpmspec-main/fedora-rawhide-x86_64/07711191-rust-ndarray-stats/rust-ndarray-stats-0.5.1-1.fc41.src.rpm

rust2rpm.toml
```toml
[package]
summary = "Statistical routines for ArrayBase"
cargo-toml-patch-comments = [
    "- Bump approx dependency",
    "  https://github.com/rust-ndarray/ndarray-stats/issues/96",
]

[requires]
build = [
    "tomcli",
]

[scripts.prep]
post = [
    "# Do not depend on criterion; it is needed only for benchmarks.",
    "tomcli set Cargo.toml del dev-dependencies.criterion",
]

[tests]
skip = [
    "entropy::tests::test_cross_entropy_with_noisy_negative_qs",
    "entropy::tests::test_kl_with_noisy_negative_qs",
]
comments = [
    "Probably using debug_assert!"
]
```

ndarray-stats-fix-metadata.diff
```
--- ndarray-stats-0.5.1/Cargo.toml	1970-01-01T00:00:01+00:00
+++ ndarray-stats-0.5.1/Cargo.toml	2024-07-05T12:43:59.747453+00:00
@@ -69,7 +69,7 @@
 version = "0.8.3"
 
 [dev-dependencies.approx]
-version = "0.4"
+version = "0.5"
 
 [dev-dependencies.criterion]
 version = "0.3"
```

Comment 2 Fedora Review Service 2024-07-06 06:32:16 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7712635
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2283682-rust-ndarray-stats/fedora-rawhide-x86_64/07712635-rust-ndarray-stats/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 3 Fedora Review Service 2024-07-06 10:40:27 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7712858
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2283682-rust-ndarray-stats/fedora-rawhide-x86_64/07712858-rust-ndarray-stats/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 6 Fedora Review Service 2024-08-27 15:33:15 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7947947
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2283682-rust-ndarray-stats/fedora-rawhide-x86_64/07947947-rust-ndarray-stats/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 7 Fabio Valentini 2024-10-17 09:16:21 UTC
- You can drop the patch, indexmap 2.5 is now available everywhere.
- The tests don't use debug_asssert! (that would be pointless in tests), it loosks like the actual library code is wrong and makes incorrect assumptions about what operations panic for taking logarithms.

Looking at the implementation of f64::log in the Rust standard library, it doesn't panic for negative numbers, it just return NaN instead:
https://doc.rust-lang.org/stable/std/primitive.f64.html#method.log

Comment 9 Fedora Review Service 2024-10-17 12:55:46 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8150511
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2283682-rust-ndarray-stats/fedora-rawhide-x86_64/08150511-rust-ndarray-stats/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 10 Fabio Valentini 2024-10-20 13:16:20 UTC
Thanks! Looks good to me now.

===

Package was generated with rust2rpm, simplifying the review.

✅❌❓🫤

✅ package contains only permissible content
✅ package builds and installs without errors on rawhide
✅ test suite is run and all unit tests pass (two tests skipped with good justification)
✅ latest version of the crate is packaged
✅ license matches upstream specification and is acceptable for Fedora
✅ license files are included with %license in %files
✅ package complies with Rust Packaging Guidelines

Package APPROVED.

===

Recommended post-import rust-sig tasks:

- set up package on release-monitoring.org:
  project: $crate
  homepage: https://crates.io/crates/$crate
  backend: crates.io
  version scheme: semantic
  version (*NOT* pre-release) filter: alpha;beta;rc;pre
  distro: Fedora
  Package: rust-$crate

- add @rust-sig with "commit" access as package co-maintainer
  (should happen automatically)

- set bugzilla assignee overrides to @rust-sig (optional)

- track package in koschei for all built branches
  (should happen automatically once rust-sig is co-maintainer)

Comment 11 Cristian Le 2024-10-20 13:24:21 UTC
Thank you for the review, Fabio

Comment 12 Fedora Admin user for bugzilla script actions 2024-10-20 13:24:34 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-ndarray-stats

Comment 13 Fedora Update System 2024-10-20 13:43:48 UTC
FEDORA-2024-fe530a8f37 (rust-ndarray-stats-0.6.0-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-fe530a8f37

Comment 14 Fedora Update System 2024-10-20 13:46:08 UTC
FEDORA-2024-fe530a8f37 (rust-ndarray-stats-0.6.0-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.