2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-01-19 23:45:15 +00:00
|
|
|
, pythonOlder
|
2020-05-03 17:38:23 +00:00
|
|
|
, fetchFromGitHub
|
2020-10-11 12:50:04 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, future
|
|
|
|
, numpy
|
2020-05-03 17:38:23 +00:00
|
|
|
, pillow
|
2022-01-19 23:45:15 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, scipy
|
2021-05-20 23:08:51 +00:00
|
|
|
, scikit-learn
|
2020-04-24 23:36:52 +00:00
|
|
|
, scikitimage
|
|
|
|
, threadpoolctl
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "batchgenerators";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "0.24";
|
2022-01-19 23:45:15 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MIC-DKFZ";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-08-21 13:32:41 +00:00
|
|
|
hash = "sha256-47jAeHMJPBk7GpUvXtQuJchgiSy6M50anftsuXWk2ag=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-01-19 23:45:15 +00:00
|
|
|
future
|
|
|
|
numpy
|
|
|
|
pillow
|
|
|
|
scipy
|
|
|
|
scikit-learn
|
|
|
|
scikitimage
|
|
|
|
threadpoolctl
|
|
|
|
];
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
# see https://github.com/MIC-DKFZ/batchgenerators/pull/78
|
2022-01-19 23:45:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace '"unittest2",' ""
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-21 13:32:41 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
# see https://github.com/MIC-DKFZ/batchgenerators/pull/78
|
|
|
|
disabledTestPaths = [ "tests/test_axis_mirroring.py" ];
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"batchgenerators"
|
2022-08-21 13:32:41 +00:00
|
|
|
"batchgenerators.augmentations"
|
|
|
|
"batchgenerators.dataloading"
|
|
|
|
"batchgenerators.datasets"
|
|
|
|
"batchgenerators.transforms"
|
|
|
|
"batchgenerators.utilities"
|
2022-01-19 23:45:15 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "2D and 3D image data augmentation for deep learning";
|
|
|
|
homepage = "https://github.com/MIC-DKFZ/batchgenerators";
|
2022-01-19 23:45:15 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|