18 buildPythonPackage rec {
19 pname = "apricot-select";
23 disabled = pythonOlder "3.7";
25 src = fetchFromGitHub {
28 rev = "refs/tags/${version}";
29 hash = "sha256-v9BHFxmlbwXVipPze/nV35YijdFBuka3gAl85AlsffQ=";
33 # migrate to pytest, https://github.com/jmschrei/apricot/pull/43
35 url = "https://github.com/jmschrei/apricot/commit/ffa5cce97292775c0d6890671a19cacd2294383f.patch?full_index=1";
36 hash = "sha256-9A49m4587kAPK/kzZBqMRPwuA40S3HinLXaslYUcWdM=";
40 build-system = [ setuptools ];
51 nativeCheckInputs = [ pytestCheckHook ];
53 pythonImportsCheck = [ "apricot" ];
57 "tests/test_optimizers/test_knapsack_facility_location.py"
58 "tests/test_optimizers/test_knapsack_feature_based.py"
61 # NOTE: These tests seem to be flaky.
64 "test_digits_modular_object"
65 "test_digits_modular_sparse"
66 "test_digits_sqrt_modular"
67 "test_digits_sqrt_modular_object"
68 "test_digits_sqrt_modular_sparse"
71 # NOTE: Tests are disabled by default because they can run for hours and timeout on Hydra.
74 passthru.tests.check = apricot-select.overridePythonAttrs { doCheck = true; };
77 description = "Module for submodular optimization for the purpose of selecting subsets of massive data sets";
78 homepage = "https://github.com/jmschrei/apricot";
79 changelog = "https://github.com/jmschrei/apricot/releases/tag/${version}";
80 license = licenses.mit;
81 maintainers = with maintainers; [ fab ];