nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 80 lines 1.9 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch2, 6 apricot-select, 7 numba, 8 numpy, 9 pytestCheckHook, 10 scikit-learn, 11 scipy, 12 setuptools, 13 torchvision, 14 tqdm, 15}: 16 17buildPythonPackage rec { 18 pname = "apricot-select"; 19 version = "0.6.1"; 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "jmschrei"; 24 repo = "apricot"; 25 tag = version; 26 hash = "sha256-v9BHFxmlbwXVipPze/nV35YijdFBuka3gAl85AlsffQ="; 27 }; 28 29 patches = [ 30 # migrate to pytest, https://github.com/jmschrei/apricot/pull/43 31 (fetchpatch2 { 32 url = "https://github.com/jmschrei/apricot/commit/ffa5cce97292775c0d6890671a19cacd2294383f.patch?full_index=1"; 33 hash = "sha256-9A49m4587kAPK/kzZBqMRPwuA40S3HinLXaslYUcWdM="; 34 }) 35 ]; 36 37 build-system = [ setuptools ]; 38 39 dependencies = [ 40 numba 41 numpy 42 scikit-learn 43 scipy 44 torchvision 45 tqdm 46 ]; 47 48 nativeCheckInputs = [ pytestCheckHook ]; 49 50 pythonImportsCheck = [ "apricot" ]; 51 52 disabledTestPaths = [ 53 # Tests require nose 54 "tests/test_optimizers/test_knapsack_facility_location.py" 55 "tests/test_optimizers/test_knapsack_feature_based.py" 56 ]; 57 58 # NOTE: These tests seem to be flaky. 59 disabledTests = [ 60 "test_digits_modular" 61 "test_digits_modular_object" 62 "test_digits_modular_sparse" 63 "test_digits_sqrt_modular" 64 "test_digits_sqrt_modular_object" 65 "test_digits_sqrt_modular_sparse" 66 ]; 67 68 # NOTE: Tests are disabled by default because they can run for hours and timeout on Hydra. 69 doCheck = false; 70 71 passthru.tests.check = apricot-select.overridePythonAttrs { doCheck = true; }; 72 73 meta = { 74 description = "Module for submodular optimization for the purpose of selecting subsets of massive data sets"; 75 homepage = "https://github.com/jmschrei/apricot"; 76 changelog = "https://github.com/jmschrei/apricot/releases/tag/${version}"; 77 license = lib.licenses.mit; 78 maintainers = with lib.maintainers; [ fab ]; 79 }; 80}