Something went wrong. Try again.
lol
Something went wrong. Try again.
2.0 kB · 89 lines
Nix
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990{ lib, buildPythonPackage, fetchFromGitHub, setuptools, setuptools-scm, joblib, keras, numpy, pandas, scikit-learn, scipy, tensorflow, threadpoolctl, pytestCheckHook, python, sklearn-compat,}:
buildPythonPackage rec { pname = "imbalanced-learn"; version = "0.14.1"; pyproject = true;
src = fetchFromGitHub { owner = "scikit-learn-contrib"; repo = "imbalanced-learn"; tag = version; hash = "sha256-nY8Hn+EsKOXqAQV9TtuZaQY+XnxNNzIaHYM2n0gD5rY="; };
build-system = [ setuptools setuptools-scm ];
dependencies = [ joblib numpy scikit-learn scipy threadpoolctl sklearn-compat ];
optional-dependencies = { optional = [ keras pandas tensorflow ]; };
pythonImportsCheck = [ "imblearn" ];
nativeCheckInputs = [ pytestCheckHook pandas ];
preCheck = '' export HOME=$TMPDIR # The GitHub source contains too many files picked up by pytest like # examples and documentation files which can't pass. cd $out/${python.sitePackages} '';
disabledTestPaths = [ # require tensorflow and keras, but we don't want to # add them to nativeCheckInputs just for this tests "imblearn/keras" "imblearn/tensorflow" # even with precheck directory change, pytest still tries to test docstrings "imblearn/tests/test_docstring_parameters.py" # Skip dependencies test - pythonImportsCheck already does this "imblearn/utils/tests/test_min_dependencies.py" ];
meta = { description = "Library offering a number of re-sampling techniques commonly used in datasets showing strong between-class imbalance"; homepage = "https://github.com/scikit-learn-contrib/imbalanced-learn"; changelog = "https://github.com/scikit-learn-contrib/imbalanced-learn/releases/tag/${src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ rmcgibbo philipwilk ]; };}