1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 setuptools,
7 pytestCheckHook,
8 future,
9 numpy,
10 pillow,
11 scipy,
12 scikit-learn,
13 scikit-image,
14 threadpoolctl,
15}:
16
17buildPythonPackage rec {
18 pname = "batchgenerators";
19 version = "0.25";
20 pyproject = true;
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchFromGitHub {
25 owner = "MIC-DKFZ";
26 repo = "batchgenerators";
27 rev = "v${version}";
28 hash = "sha256-L2mWH2t8PN9o1M67KDdl1Tj2ZZ02MY4icsJY2VNrj3A=";
29 };
30
31 build-system = [ setuptools ];
32
33 dependencies = [
34 future
35 numpy
36 pillow
37 scipy
38 scikit-learn
39 scikit-image
40 threadpoolctl
41 ];
42
43 # see https://github.com/MIC-DKFZ/batchgenerators/pull/78
44 pythonRemoveDeps = [ "unittest2" ];
45
46 nativeCheckInputs = [ pytestCheckHook ];
47
48 # see https://github.com/MIC-DKFZ/batchgenerators/pull/78
49 disabledTestPaths = [ "tests/test_axis_mirroring.py" ];
50
51 pythonImportsCheck = [
52 "batchgenerators"
53 "batchgenerators.augmentations"
54 "batchgenerators.dataloading"
55 "batchgenerators.datasets"
56 "batchgenerators.transforms"
57 "batchgenerators.utilities"
58 ];
59
60 meta = with lib; {
61 description = "2D and 3D image data augmentation for deep learning";
62 homepage = "https://github.com/MIC-DKFZ/batchgenerators";
63 license = licenses.asl20;
64 maintainers = with maintainers; [ bcdarwin ];
65 };
66}