Accepting request 1219470 from devel:languages:python:numeric

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1219470
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-librosa?expand=0&rev=17
This commit is contained in:
Dominique Leuenberger 2024-10-30 16:39:33 +00:00 committed by Git OBS Bridge
commit c8e91650ed
8 changed files with 152 additions and 7 deletions

20
csr_matrix-attr-H.patch Normal file
View File

@ -0,0 +1,20 @@
From 44baef3d4e748135575e9b688894c01b37a3685b Mon Sep 17 00:00:00 2001
From: Brian McFee <brian.mcfee@nyu.edu>
Date: Wed, 26 Jun 2024 10:08:45 -0400
Subject: [PATCH] fix #1849
---
librosa/core/constantq.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/librosa/core/constantq.py
+++ b/librosa/core/constantq.py
@@ -707,7 +707,7 @@ def icqt(
)
# Transpose the basis
- inv_basis = fft_basis.H.todense()
+ inv_basis = fft_basis.conjugate().T.todense()
# Compute each filter's frequency-domain power
freq_power = 1 / np.sum(util.abs2(np.asarray(inv_basis)), axis=0)

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e25de58fc93497648ec665a900d3f206ad22e1f4579ca2a8a7d6f4dab5572eb8
size 2210436

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:531269ad17a727616cc683bc718222328e7aa3b6c143c67ea0bc283d1a5b284b
size 2334630

50
mark-network-tests.patch Normal file
View File

@ -0,0 +1,50 @@
---
setup.cfg | 2 ++
tests/test_multichannel.py | 1 +
tests/test_util.py | 3 +++
3 files changed, 6 insertions(+)
--- a/setup.cfg
+++ b/setup.cfg
@@ -14,6 +14,8 @@ addopts = --mpl --mpl-baseline-path=tes
filterwarnings =
ignore::DeprecationWarning:audioread.*
ignore::DeprecationWarning:resampy.*
+markers =
+ network: tests requiring network connection
[flake8]
count = True
--- a/tests/test_multichannel.py
+++ b/tests/test_multichannel.py
@@ -914,6 +914,7 @@ def test_click_multi():
assert np.allclose(yout[..., 2000:2100], click)
+@pytest.mark.network
def test_nnls_multi(s_multi):
# Verify that a stereo melspectrogram can be reconstructed
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -1385,17 +1385,20 @@ def test_phasor(dtype, angles, mag):
assert z2.dtype == librosa.util.dtype_r2c(dtype)
+@pytest.mark.network
def test_cite_released():
version = "0.10.1"
doi = "https://doi.org/10.5281/zenodo.8252662"
assert doi == librosa.cite(version=version)
+@pytest.mark.network
@pytest.mark.xfail(raises=librosa.ParameterError)
def test_cite_badversion():
librosa.cite(version="-1.5")
+@pytest.mark.network
@pytest.mark.xfail(raises=librosa.ParameterError)
def test_cite_unreleased():
librosa.cite("0.10.0.dev0")

View File

@ -1,3 +1,44 @@
-------------------------------------------------------------------
Wed Oct 2 20:59:35 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Add csr_matrix-attr-H.patch making the package compatible with
the most recent version of SciPy (gh#librosa/librosa#1849).
- Add sysinfo.py to provide upstream with the required debugging
information.
- Add mark-network-tests.patch marking tests which require
network connection to run.
-------------------------------------------------------------------
Fri Sep 20 22:12:01 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Update to 0.10.2.post1:
- Bump minimum matplotlib to 3.5.0
- Update to 0.10.2.post1:
- Multiple accidentals by @erabinov in #1739
- Avoid deprecated matplotlib functions by @bmcfee in #1755
- Mode support by @erabinov in #1756
- Mode support by @erabinov in #1762
- Switch from pkg_resources to importlib.resources by @mattpitkin in #1765
- Add python 3.11 to build matrix by @bmcfee in #1769
- Natural accidentals for out-of-key notes by @erabinov in #1770
- Fix docstring for the writeable argument of util.frame function by @alvingao in #1780
- Update test_util.py to remove problematic "dummy". by @dpwe in #1783
- Updates matplotlib colormap usage to remove deprecation warnings. by @psmskelton in #1782
- Better handling of warnings in test suite by @bmcfee in #1784
- Fix sample rate type annotations by @bmcfee in #1789
- Explicitly allow scalars in decibel conversion by @bmcfee in #1790
- Adding python 3.12 to build matrix, update tests for recent scipy / numpy by @bmcfee in #1808
- Resolve the performance issue of autocorrelate by @alumkal in #1813
- Correct phase advance for odd frame lengths in phase_vocoder by @bmcfee in #1814
- Multichannel peak, onset, and beat detection by @bmcfee in #1766
- Update actions for 2024 by @bmcfee in #1820
- doc copybutton, CI updates by @bmcfee in #1821
- exposed tempo min and max parameters in specshow by @bmcfee in #1822
- remove kwargs from effects.hpss and friends, passthru stft by @bmcfee in #1826
- Docstring and comment improvements by @bmcfee in #1827
- librosa.cite() by @bmcfee in #1829
- 0.10.2 release prep by @bmcfee in #1832
-------------------------------------------------------------------
Wed Apr 17 03:42:24 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>

View File

@ -18,7 +18,7 @@
%define static_test_data_commit 72bd79e448829187f6336818b3f6bdc2c2ae8f5a
Name: python-librosa
Version: 0.10.1
Version: 0.10.2.post1
Release: 0
Summary: Python module for audio and music processing
License: CC-BY-3.0 AND ISC
@ -30,6 +30,14 @@ Source1: librosa-create-pooch-cache.py
Source2: librosa-pooch-cache.tar.gz
# Static test data
Source3: https://github.com/librosa/librosa-test-data/archive/%{static_test_data_commit}.tar.gz#/librosa-static-test-data-%{version}.tar.gz
# Provide information required by upstream
Source20: sysinfo.py
# PATCH-FIX-UPSTREAM csr_matrix-attr-H.patch gh#librosa/librosa#1849 mcepl@suse.com
# csr_matrix.H in scipy has been removed
Patch0: csr_matrix-attr-H.patch
# PATCH-FIX-UPSTREAM mark-network-tests.patch mcepl@suse.com
# to skip test which require network access
Patch1: mark-network-tests.patch
BuildRequires: %{python_module SoundFile >= 0.12.1}
BuildRequires: %{python_module audioread >= 2.1.9}
BuildRequires: %{python_module base >= 3.7}
@ -38,7 +46,7 @@ BuildRequires: %{python_module joblib >= 0.14}
BuildRequires: %{python_module lazy_loader >= 0.1}
BuildRequires: %{python_module msgpack >= 1.0}
BuildRequires: %{python_module numba >= 0.51.0}
BuildRequires: %{python_module numpy >= 1.22.3}
BuildRequires: %{python_module numpy >= 1.22.3 with %python-numpy < 2}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pooch >= 1.0}
BuildRequires: %{python_module scikit-learn >= 0.20.0}
@ -98,6 +106,8 @@ sed -i '/addopts/ s/--cov-report.*--cov-report=xml//' setup.cfg
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_expand PYTHONPATH="%{buildroot}%{$python_sitelib}" $python %{SOURCE20}
export LIBROSA_DATA_DIR=$PWD/librosa-pooch-cache
# image files do not match without exact mpl version
donttest="test_display"
@ -142,8 +152,14 @@ notparallel+=" or test_remix"
notparallel+=" or test_chroma"
notparallel+=" or test_estimate_tuning"
notparallel+=" or test_zero_crossings"
%pytest -k "not (${donttest} or ${notparallel})" -n auto
%pytest -k "not (${donttest}) and (${notparallel})"
# gh#librosa/librosa#1879
donttest+=" or test_beat"
# gh#librosa/librosa#1880
donttest+=" or test_nnls_multiblock"
#
donttest+=" or test_subsegment_badn"
%pytest -k "not (${donttest} or ${notparallel} or network)" -n auto
%pytest -k "not (${donttest} or network) and (${notparallel})"
%files %{python_files}
%doc AUTHORS.md README.md

18
sysinfo.py Normal file
View File

@ -0,0 +1,18 @@
#!/usr/bin/python3
import platform
import sys
import numpy
import scipy
try:
import librosa
except ModuleNotFoundError:
librosa = None
print(platform.platform())
print("Python", sys.version)
print("NumPy", numpy.__version__)
print("SciPy", scipy.__version__)
if librosa is not None:
print("librosa", librosa.__version__)
librosa.show_versions()