nixpkgs-suyu/pkgs/development/python-modules/pomegranate/default.nix
Sergei Trofimovich 6338963691 python39Packages.pomegranate: disable two failing tests
Two tests started failing after commit cd7360f19f
("python38Packages.networkx: 2.5.1 -> 2.6.2"):
    test_exact_dp_structure_learning_exclude_edges
    test_constrained_slap_structure_learning_exclude_edges
Both failures are triggered by networkx commit 15b74c552
("Use bidirection_dijkstra as default in weighted shortest_path")

My guess is that among equal paths the different one is picked.
Which should be a benign test failure and not a real regression.

Let's disable the tests to fix package building on master.
2021-09-08 23:48:51 +09:00

50 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, numpy
, scipy
, cython
, networkx
, joblib
, pandas
, nose
, pyyaml
}:
buildPythonPackage rec {
pname = "pomegranate";
version = "0.13.5";
src = fetchFromGitHub {
repo = pname;
owner = "jmschrei";
rev = "v${version}";
sha256 = "1hbxchp3daykkf1fa79a9mh34p78bygqcf1nv4qwkql3gw0pd6l7";
};
patches = lib.optionals (lib.versionOlder version "13.6") [
# Fix compatibility with recent joblib release, will be part of the next
# pomegranate release after 0.13.5
(fetchpatch {
url = "https://github.com/jmschrei/pomegranate/commit/42d14bebc44ffd4a778b2a6430aa845591b7c3b7.patch";
sha256 = "0f9cx0fj9xkr3hch7jyrn76zjypilh5bqw734caaw6g2m49lvbff";
})
] ++ [
# Likely an upstream test bug and not a real problem:
# https://github.com/jmschrei/pomegranate/issues/939
./disable-failed-on-nextworkx-2.6.patch
] ;
propagatedBuildInputs = [ numpy scipy cython networkx joblib pyyaml ];
checkInputs = [ pandas nose ]; # as of 0.13.5, it depends explicitly on nose, rather than pytest.
meta = with lib; {
description = "Probabilistic and graphical models for Python, implemented in cython for speed";
homepage = "https://github.com/jmschrei/pomegranate";
license = licenses.mit;
maintainers = with maintainers; [ rybern ];
};
}