python312Packages.torch-audiomentations: refactor

- enable tests
This commit is contained in:
Fabian Affolter
2024-08-17 16:19:32 +02:00
parent 6a4715fd1a
commit 3c70aa8423
@@ -2,13 +2,15 @@
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
wheel,
julius,
librosa,
pytest-cov-stub,
pytestCheckHook,
pythonOlder,
setuptools,
torch-pitch-shift,
torch,
torchaudio,
torch-pitch-shift,
}:
buildPythonPackage rec {
@@ -16,6 +18,8 @@ buildPythonPackage rec {
version = "0.11.1";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "asteroid-team";
repo = "torch-audiomentations";
@@ -23,7 +27,11 @@ buildPythonPackage rec {
hash = "sha256-0+5wc+mP4c221q6mdaqPalfumTOtdnkjnIPtLErOp9E=";
};
propagatedBuildInputs = [
pythonRelaxDeps = [ "torchaudio" ];
build-system = [ setuptools ];
dependencies = [
julius
librosa
torch
@@ -31,16 +39,27 @@ buildPythonPackage rec {
torch-pitch-shift
];
nativeBuildInputs = [
setuptools
wheel
nativeCheckInputs = [
pytest-cov-stub
pytestCheckHook
];
pythonImportsCheck = [ "torch_audiomentations" ];
disabledTestPaths = [
# librosa issues
"tests/test_mix.py"
"tests/test_convolution.py"
"tests/test_impulse_response.py"
"tests/test_background_noise.py"
];
disabledTests = [ "test_transform_is_differentiable" ];
meta = with lib; {
description = "Fast audio data augmentation in PyTorch. Inspired by audiomentations. Useful for deep learning";
description = "Fast audio data augmentation in PyTorch";
homepage = "https://github.com/asteroid-team/torch-audiomentations";
changelog = "https://github.com/asteroid-team/torch-audiomentations/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ matthewcroughan ];
};