From 600d119649dde4e2c33d2ca08beb2e7da6a8ed54 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 14 Nov 2025 14:02:53 +0000 Subject: [PATCH] python3Packages.visions: skip failing tests, cleanup --- .../python-modules/visions/default.nix | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/visions/default.nix b/pkgs/development/python-modules/visions/default.nix index 9d9fa3e12107..66e0364944c1 100644 --- a/pkgs/development/python-modules/visions/default.nix +++ b/pkgs/development/python-modules/visions/default.nix @@ -2,21 +2,28 @@ lib, buildPythonPackage, fetchFromGitHub, - pythonOlder, - pytestCheckHook, + + # build-system setuptools, + + # dependencies attrs, - imagehash, - matplotlib, multimethod, networkx, numpy, pandas, - pillow, puremagic, + + # optional-dependencies + shapely, + imagehash, + pillow, + matplotlib, pydot, pygraphviz, - shapely, + + # tests + pytestCheckHook, }: buildPythonPackage rec { @@ -24,12 +31,10 @@ buildPythonPackage rec { version = "0.8.1"; pyproject = true; - disabled = pythonOlder "3.8"; - src = fetchFromGitHub { owner = "dylan-profiler"; repo = "visions"; - rev = "v${version}"; + tag = "v${version}"; hash = "sha256-MHseb1XJ0t7jQ45VXKQclYPgddrzmJAC7cde8qqYhNQ="; }; @@ -62,19 +67,29 @@ buildPythonPackage rec { ] ++ lib.flatten (builtins.attrValues optional-dependencies); + disabledTests = [ + # TypeError: Converting `np.inexact` or `np.floating` to a dtype not allowed + "test_declarative" + ]; + disabledTestPaths = [ # requires running Apache Spark: "tests/spark_/typesets/test_spark_standard_set.py" + + # multimethod.DispatchError + "tests/numpy_/typesets/test_standard_set.py::test_cast" + "tests/numpy_/typesets/test_standard_set.py::test_conversion" + "tests/numpy_/typesets/test_standard_set.py::test_inference" ]; - pythonImportsCheck = [ - "visions" - ]; + pythonImportsCheck = [ "visions" ]; - meta = with lib; { + meta = { description = "Type system for data analysis in Python"; homepage = "https://dylan-profiler.github.io/visions"; - license = licenses.bsdOriginal; - maintainers = with maintainers; [ bcdarwin ]; + downloadPage = "https://github.com/dylan-profiler/visions"; + changelog = "https://github.com/dylan-profiler/visions/releases/tag/${src.tag}"; + license = lib.licenses.bsdOriginal; + maintainers = with lib.maintainers; [ bcdarwin ]; }; }