2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
cython,
|
|
|
|
numpy,
|
|
|
|
pytestCheckHook,
|
|
|
|
scipy,
|
|
|
|
scikit-learn,
|
|
|
|
fetchPypi,
|
|
|
|
joblib,
|
|
|
|
six,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "hdbscan";
|
2024-06-24 18:47:55 +00:00
|
|
|
version = "0.8.37";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-06-24 18:47:55 +00:00
|
|
|
hash = "sha256-3EeHE0DRhT5WnF2Pb4/IB+nDEx7dKRafx3pHBnSqibA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
pythonRemoveDeps = [ "cython" ];
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
];
|
|
|
|
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";
|
2024-06-05 15:53:02 +00:00
|
|
|
homepage = "https://github.com/scikit-learn-contrib/hdbscan";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|