1{
2 lib,
3 awkward,
4 buildPythonPackage,
5 cachetools,
6 dask,
7 dask-histogram,
8 distributed,
9 fetchFromGitHub,
10 hatch-vcs,
11 hatchling,
12 hist,
13 pandas,
14 pyarrow,
15 pytestCheckHook,
16 pythonOlder,
17 pythonRelaxDepsHook,
18 typing-extensions,
19 uproot,
20}:
21
22buildPythonPackage rec {
23 pname = "dask-awkward";
24 version = "2024.3.0";
25 pyproject = true;
26
27 disabled = pythonOlder "3.8";
28
29 src = fetchFromGitHub {
30 owner = "dask-contrib";
31 repo = "dask-awkward";
32 rev = "refs/tags/${version}";
33 hash = "sha256-Lkbp/XrDHOekMpT71pbxtuozgzU9iiGF2GJZ+tuV/yM=";
34 };
35
36 pythonRelaxDeps = [ "awkward" ];
37
38 nativeBuildInputs = [
39 hatch-vcs
40 hatchling
41 pythonRelaxDepsHook
42 ];
43
44 propagatedBuildInputs = [
45 awkward
46 cachetools
47 dask
48 typing-extensions
49 ];
50
51 passthru.optional-dependencies = {
52 io = [ pyarrow ];
53 };
54
55 checkInputs = [
56 dask-histogram
57 distributed
58 hist
59 pandas
60 pytestCheckHook
61 uproot
62 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
63
64 pythonImportsCheck = [ "dask_awkward" ];
65
66 disabledTests = [
67 # Tests require network access
68 "test_remote_double"
69 "test_remote_single"
70 "test_from_text"
71 # ValueError: not a ROOT file: first four bytes...
72 "test_basic_root_works"
73 ];
74
75 __darwinAllowLocalNetworking = true;
76
77 meta = with lib; {
78 description = "Native Dask collection for awkward arrays, and the library to use it";
79 homepage = "https://github.com/dask-contrib/dask-awkward";
80 changelog = "https://github.com/dask-contrib/dask-awkward/releases/tag/${version}";
81 license = licenses.bsd3;
82 maintainers = with maintainers; [ veprbl ];
83 };
84}