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.5";
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-0e1pJzoszTW8n+uFJlEeYstvHf4v+I2Is7oEHJ1qV7o=";
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 ]
56 ++ lib.optionals (pythonOlder "3.11") [ tomli ];
57
58 nativeCheckInputs = [
59 pytestCheckHook
60 git
61 nbmake
62 pexpect
63 pytest-xdist
64 syrupy
65 ];
66
67 # The test suite runs the installed command for e2e tests
68 preCheck = ''
69 export PATH="$PATH:$out/bin";
70 '';
71
72 disabledTests = [
73 # This accesses the network
74 "test_download_file"
75 # Racy
76 "test_more_nested_pytree_and_python_node_as_return_with_names"
77 ];
78
79 meta = with lib; {
80 description = "Workflow management system that facilitates reproducible data analyses";
81 homepage = "https://github.com/pytask-dev/pytask";
82 changelog = "https://github.com/pytask-dev/pytask/releases/tag/${src.tag}";
83 license = licenses.mit;
84 maintainers = with maintainers; [ erooke ];
85 };
86}