1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 isPy27,
6 setuptools,
7 pytestCheckHook,
8 scipy,
9 numpy,
10 scikit-learn,
11 pandas,
12 matplotlib,
13 joblib,
14}:
15
16buildPythonPackage rec {
17 pname = "mlxtend";
18 version = "0.23.4";
19 pyproject = true;
20
21 disabled = isPy27;
22
23 src = fetchFromGitHub {
24 owner = "rasbt";
25 repo = "mlxtend";
26 tag = "v${version}";
27 hash = "sha256-xoAHYRmqN5SrEWlc18ntTZ6WAznBlVZdf+x5Yev3ysE=";
28 };
29
30 build-system = [ setuptools ];
31
32 dependencies = [
33 scipy
34 numpy
35 scikit-learn
36 pandas
37 matplotlib
38 joblib
39 ];
40
41 patches = [
42 # https://github.com/rasbt/mlxtend/issues/1117
43 ./0001-StackingCVClassifier-fit-ensure-compatibility-with-s.patch
44 ];
45
46 nativeCheckInputs = [ pytestCheckHook ];
47
48 pytestFlags = [ "-sv" ];
49
50 disabledTests = [
51 # Type changed in numpy2 test should be updated
52 "test_invalid_labels_1"
53 "test_default"
54 "test_nullability"
55 ];
56
57 disabledTestPaths = [
58 "mlxtend/evaluate/f_test.py" # need clean
59 "mlxtend/evaluate/tests/test_feature_importance.py" # urlopen error
60 "mlxtend/evaluate/tests/test_bias_variance_decomp.py" # keras.api._v2
61 "mlxtend/evaluate/tests/test_bootstrap_point632.py" # keras.api._v2
62 # Failing tests, most likely an upstream issue. See https://github.com/rasbt/mlxtend/issues/1117
63 "mlxtend/classifier/tests/test_ensemble_vote_classifier.py"
64 "mlxtend/classifier/tests/test_stacking_classifier.py"
65 "mlxtend/classifier/tests/test_stacking_cv_classifier.py"
66 ];
67
68 meta = {
69 description = "Library of Python tools and extensions for data science";
70 homepage = "https://github.com/rasbt/mlxtend";
71 license = lib.licenses.bsd3;
72 maintainers = with lib.maintainers; [ evax ];
73 platforms = lib.platforms.unix;
74 };
75}