Yueh-Shun Li 76e2a397c2 treewide: pytestFlagsArray -> pytestFlags and join flag and option argument
This treewide change targets Python packages
that specifies pytest flags with pytestFlagsArray,
and whose flags cannot be consructed by other pytestCheckHook-honoured arguments.

Use the __structuredAttrs-agnostic argument pytestFlags
instead of the deprecated pytestFlagsArray.

For flags with option arguments,
join each flag and their option argument into a single command-line argument
following POSIX Utility Argument Syntax[1]
for easier overriding (remove/replace).

Examples:

* [ "-W" "ignore:message:WarningClass" ] ->
  [ "-Wignore:message:WarningClass" ]

* [ "--reruns" "3" ] ->
  [ "--reruns=3" ]

[1]: https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html
2025-06-16 01:02:16 +08:00

76 lines
1.7 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
isPy27,
setuptools,
pytestCheckHook,
scipy,
numpy,
scikit-learn,
pandas,
matplotlib,
joblib,
}:
buildPythonPackage rec {
pname = "mlxtend";
version = "0.23.4";
pyproject = true;
disabled = isPy27;
src = fetchFromGitHub {
owner = "rasbt";
repo = "mlxtend";
tag = "v${version}";
hash = "sha256-xoAHYRmqN5SrEWlc18ntTZ6WAznBlVZdf+x5Yev3ysE=";
};
build-system = [ setuptools ];
dependencies = [
scipy
numpy
scikit-learn
pandas
matplotlib
joblib
];
patches = [
# https://github.com/rasbt/mlxtend/issues/1117
./0001-StackingCVClassifier-fit-ensure-compatibility-with-s.patch
];
nativeCheckInputs = [ pytestCheckHook ];
pytestFlags = [ "-sv" ];
disabledTests = [
# Type changed in numpy2 test should be updated
"test_invalid_labels_1"
"test_default"
"test_nullability"
];
disabledTestPaths = [
"mlxtend/evaluate/f_test.py" # need clean
"mlxtend/evaluate/tests/test_feature_importance.py" # urlopen error
"mlxtend/evaluate/tests/test_bias_variance_decomp.py" # keras.api._v2
"mlxtend/evaluate/tests/test_bootstrap_point632.py" # keras.api._v2
# Failing tests, most likely an upstream issue. See https://github.com/rasbt/mlxtend/issues/1117
"mlxtend/classifier/tests/test_ensemble_vote_classifier.py"
"mlxtend/classifier/tests/test_stacking_classifier.py"
"mlxtend/classifier/tests/test_stacking_cv_classifier.py"
];
meta = {
description = "Library of Python tools and extensions for data science";
homepage = "https://github.com/rasbt/mlxtend";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ evax ];
platforms = lib.platforms.unix;
};
}