From 6fe1428ce75b25b5626f387680688c963457b446 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 6 Mar 2026 23:57:36 +0000 Subject: [PATCH] python3Packages.pynndescent: skip failing tests --- .../python-modules/pynndescent/default.nix | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/pynndescent/default.nix b/pkgs/development/python-modules/pynndescent/default.nix index 22d4e586f3bd..4be6ffb850da 100644 --- a/pkgs/development/python-modules/pynndescent/default.nix +++ b/pkgs/development/python-modules/pynndescent/default.nix @@ -17,7 +17,7 @@ pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "pynndescent"; version = "0.6.0"; pyproject = true; @@ -25,7 +25,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "lmcinnes"; repo = "pynndescent"; - tag = "release-${version}"; + tag = "release-${finalAttrs.version}"; hash = "sha256-RfIbPPyx+Y7niuFrLjA02cUDHTSv9s5E4JiXv4ZBNEc="; }; @@ -39,14 +39,24 @@ buildPythonPackage rec { scipy ]; + pythonImportsCheck = [ "pynndescent" ]; + nativeCheckInputs = [ pytestCheckHook ]; - pythonImportsCheck = [ "pynndescent" ]; + disabledTests = [ + # AssertionError: Arrays are not almost equal to 6 decimals + "test_seuclidean" + + # sklearn.utils._param_validation.InvalidParameterError: The 'metric' parameter of + # pairwise_distances must be a str among ... + "test_binary_check" + "test_sparse_binary_check" + ]; meta = { description = "Nearest Neighbor Descent"; homepage = "https://github.com/lmcinnes/pynndescent"; - changelog = "https://github.com/lmcinnes/pynndescent/releases/tag/release-${src.tag}"; + changelog = "https://github.com/lmcinnes/pynndescent/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.bsd2; maintainers = with lib.maintainers; [ mic92 ]; badPlatforms = [ @@ -55,4 +65,4 @@ buildPythonPackage rec { "aarch64-linux" ]; }; -} +})