2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, numba
|
|
|
|
, numpy
|
2024-04-21 15:54:59 +00:00
|
|
|
, pynose
|
2024-01-02 11:29:13 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, scikit-learn
|
|
|
|
, scipy
|
|
|
|
, setuptools
|
2024-04-21 15:54:59 +00:00
|
|
|
, torchvision
|
2024-01-02 11:29:13 +00:00
|
|
|
, tqdm
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "apricot-select";
|
|
|
|
version = "0.6.1";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jmschrei";
|
|
|
|
repo = "apricot";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-v9BHFxmlbwXVipPze/nV35YijdFBuka3gAl85AlsffQ=";
|
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i '/"nose"/d' setup.py
|
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
2024-01-02 11:29:13 +00:00
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2024-01-02 11:29:13 +00:00
|
|
|
numba
|
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
tqdm
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
pynose
|
2024-01-02 11:29:13 +00:00
|
|
|
pytestCheckHook
|
|
|
|
scikit-learn
|
2024-04-21 15:54:59 +00:00
|
|
|
torchvision
|
2024-01-02 11:29:13 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"apricot"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Tests require nose
|
|
|
|
"tests/test_optimizers/test_knapsack_facility_location.py"
|
|
|
|
"tests/test_optimizers/test_knapsack_feature_based.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module for submodular optimization for the purpose of selecting subsets of massive data sets";
|
|
|
|
homepage = "https://github.com/jmschrei/apricot";
|
|
|
|
changelog = "https://github.com/jmschrei/apricot/releases/tag/${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|