1{ 2 lib, 3 bokeh, 4 buildPythonPackage, 5 colorcet, 6 datashader, 7 fetchFromGitHub, 8 holoviews, 9 matplotlib, 10 numba, 11 numpy, 12 pandas, 13 pynndescent, 14 pytestCheckHook, 15 pythonOlder, 16 scikit-image, 17 scikit-learn, 18 scipy, 19 seaborn, 20 tbb, 21 tensorflow, 22 tensorflow-probability, 23 tqdm, 24}: 25 26buildPythonPackage rec { 27 pname = "umap-learn"; 28 version = "0.5.6"; 29 format = "setuptools"; 30 31 disabled = pythonOlder "3.6"; 32 33 src = fetchFromGitHub { 34 owner = "lmcinnes"; 35 repo = "umap"; 36 rev = "refs/tags/release-${version}"; 37 hash = "sha256-fqYl8T53BgCqsquY6RJHqpDFsdZA0Ihja69E/kG3YGU="; 38 }; 39 40 propagatedBuildInputs = [ 41 numba 42 numpy 43 pynndescent 44 scikit-learn 45 scipy 46 tqdm 47 ]; 48 49 passthru.optional-dependencies = rec { 50 plot = [ 51 bokeh 52 colorcet 53 datashader 54 holoviews 55 matplotlib 56 pandas 57 scikit-image 58 seaborn 59 ]; 60 61 parametric_umap = [ 62 tensorflow 63 tensorflow-probability 64 ]; 65 66 tbb = [ tbb ]; 67 68 all = plot ++ parametric_umap ++ tbb; 69 }; 70 71 nativeCheckInputs = [ pytestCheckHook ]; 72 73 preCheck = '' 74 export HOME=$TMPDIR 75 ''; 76 77 disabledTests = [ 78 # Plot functionality requires additional packages. 79 # These test also fail with 'RuntimeError: cannot cache function' error. 80 "test_plot_runs_at_all" 81 "test_umap_plot_testability" 82 "test_umap_update_large" 83 84 # Flaky test. Fails with AssertionError sometimes. 85 "test_sparse_hellinger" 86 "test_densmap_trustworthiness_on_iris_supervised" 87 88 # tensorflow maybe incompatible? https://github.com/lmcinnes/umap/issues/821 89 "test_save_load" 90 ]; 91 92 meta = with lib; { 93 description = "Uniform Manifold Approximation and Projection"; 94 homepage = "https://github.com/lmcinnes/umap"; 95 license = licenses.bsd3; 96 maintainers = with maintainers; [ ]; 97 }; 98}