Merge: matrix-synapse: 1.122.0 -> 1.123.0 (#378018)
[NixPkgs.git] / pkgs / development / python-modules / scikit-learn-extra / default.nix
blob3c37f61c0b53ccb8fc740f72054ef8a369fc2f0e
2   lib,
3   fetchFromGitHub,
4   buildPythonPackage,
5   numpy,
6   cython,
7   scipy,
8   scikit-learn,
9   matplotlib,
10   pytestCheckHook,
13 buildPythonPackage rec {
14   pname = "scikit-learn-extra";
15   version = "0.3.0";
16   format = "setuptools";
18   src = fetchFromGitHub {
19     owner = "scikit-learn-contrib";
20     repo = pname;
21     tag = "v${version}";
22     sha256 = "sha256-dHOwo6NIuhcvIehpuJQ621JEg5O3mnXycAhpTZKaxns=";
23   };
25   nativeBuildInputs = [
26     numpy
27     cython
28   ];
29   propagatedBuildInputs = [
30     numpy
31     scipy
32     scikit-learn
33   ];
34   nativeCheckInputs = [
35     matplotlib
36     pytestCheckHook
37   ];
39   preCheck = ''
40     # Remove the package in the build dir, because Python defaults to it and
41     # ignores the one in Nix store with cythonized modules.
42     rm -r sklearn_extra
43   '';
45   pytestFlagsArray = [ "--pyargs sklearn_extra" ];
46   disabledTestPaths = [
47     "benchmarks"
48     "examples"
49     "doc"
50   ];
51   disabledTests = [
52     "build" # needs network connection
53     "test_all_estimators" # sklearn.exceptions.NotFittedError: Estimator fails to pass `check_is_fitted` even though it has been fit.
54   ];
56   # Check packages with cythonized modules
57   pythonImportsCheck = [
58     "sklearn_extra"
59     "sklearn_extra.cluster"
60     "sklearn_extra.robust"
61     "sklearn_extra.utils"
62   ];
64   meta = {
65     description = "Set of tools for scikit-learn";
66     homepage = "https://github.com/scikit-learn-contrib/scikit-learn-extra";
67     license = lib.licenses.bsd3;
68     maintainers = with lib.maintainers; [ yl3dy ];
69   };