1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 hatchling,
7 hatch-vcs,
8 attrs,
9 click,
10 click-default-group,
11 networkx,
12 optree,
13 packaging,
14 pluggy,
15 rich,
16 sqlalchemy,
17 universal-pathlib,
18 pytestCheckHook,
19 nbmake,
20 pexpect,
21 pytest-xdist,
22 syrupy,
23 git,
24 tomli,
25}:
26buildPythonPackage rec {
27 pname = "pytask";
28 version = "0.5.2";
29 pyproject = true;
30 disabled = pythonOlder "3.8";
31
32 src = fetchFromGitHub {
33 owner = "pytask-dev";
34 repo = "pytask";
35 tag = "v${version}";
36 hash = "sha256-YJouWQ9Edj27nD72m7EDSH9TXcrsu6X+pGDo5fgGU5U=";
37 };
38
39 build-system = [
40 hatchling
41 hatch-vcs
42 ];
43
44 dependencies = [
45 attrs
46 click
47 click-default-group
48 networkx
49 optree
50 packaging
51 pluggy
52 rich
53 sqlalchemy
54 universal-pathlib
55 ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
56
57 nativeCheckInputs = [
58 pytestCheckHook
59 git
60 nbmake
61 pexpect
62 pytest-xdist
63 syrupy
64 ];
65
66 # The test suite runs the installed command for e2e tests
67 preCheck = ''
68 export PATH="$PATH:$out/bin";
69 '';
70
71 disabledTests = [
72 # This accesses the network
73 "test_download_file"
74 # Racy
75 "test_more_nested_pytree_and_python_node_as_return_with_names"
76 ];
77
78 meta = with lib; {
79 description = "Workflow management system that facilitates reproducible data analyses";
80 homepage = "https://github.com/pytask-dev/pytask";
81 changelog = "https://github.com/pytask-dev/pytask/releases/tag/v${version}";
82 license = licenses.mit;
83 maintainers = with maintainers; [ erooke ];
84 };
85}