2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-03-20 04:20:00 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, cython
|
|
|
|
, numpy
|
2021-03-20 04:20:00 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, scipy
|
2021-05-20 23:08:51 +00:00
|
|
|
, scikit-learn
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
|
|
|
, joblib
|
|
|
|
, six
|
2022-10-06 18:32:54 +00:00
|
|
|
, pythonRelaxDepsHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "hdbscan";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.8.33";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-V/q8Xw5F9I0kB7NccxGSq8iWN2QR/n5LuDb/oD04+Q0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
pythonRemoveDeps = [ "cython" ];
|
|
|
|
nativeBuildInputs = [ pythonRelaxDepsHook cython ];
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [ numpy scipy scikit-learn joblib six ];
|
2021-03-20 04:20:00 +00:00
|
|
|
preCheck = ''
|
|
|
|
cd hdbscan/tests
|
|
|
|
rm __init__.py
|
|
|
|
'';
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-05-20 23:08:51 +00:00
|
|
|
disabledTests = [
|
|
|
|
# known flaky tests: https://github.com/scikit-learn-contrib/hdbscan/issues/420
|
|
|
|
"test_mem_vec_diff_clusters"
|
|
|
|
"test_all_points_mem_vec_diff_clusters"
|
|
|
|
"test_approx_predict_diff_clusters"
|
2021-05-28 09:39:13 +00:00
|
|
|
# another flaky test https://github.com/scikit-learn-contrib/hdbscan/issues/421
|
|
|
|
"test_hdbscan_boruvka_balltree_matches"
|
2022-10-06 18:32:54 +00:00
|
|
|
# more flaky tests https://github.com/scikit-learn-contrib/hdbscan/issues/570
|
|
|
|
"test_hdbscan_boruvka_balltree"
|
|
|
|
"test_hdbscan_best_balltree_metric"
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
pythonImportsCheck = [ "hdbscan" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Hierarchical Density-Based Spatial Clustering of Applications with Noise, a clustering algorithm with a scikit-learn compatible API";
|
|
|
|
homepage = "https://github.com/scikit-learn-contrib/hdbscan";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|