1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, hatchling
5, mkdocs-material
6, mkdocs-mermaid2-plugin
7, mkdocstrings
8, networkx
9, pygraphviz
10, pytestCheckHook
11, pythonOlder
12, requests
13}:
14
15buildPythonPackage rec {
16 pname = "canals";
17 version = "0.8.1";
18 format = "pyproject";
19
20 disabled = pythonOlder "3.8";
21
22 src = fetchFromGitHub {
23 owner = "deepset-ai";
24 repo = pname;
25 rev = "refs/tags/v${version}";
26 hash = "sha256-XC4CxvDghz8/LReeYjHEVtd8j2ZN4jd+x7vP6N8BKpc=";
27 };
28
29 nativeBuildInputs = [
30 hatchling
31 ];
32
33 propagatedBuildInputs = [
34 networkx
35 ];
36
37 passthru.optional-dependencies = {
38 graphviz = [
39 pygraphviz
40 ];
41 mermaid = [
42 requests
43 ];
44 docs = [
45 mkdocs-material
46 mkdocs-mermaid2-plugin
47 mkdocstrings
48 ];
49 };
50
51 nativeCheckInputs = [
52 pytestCheckHook
53 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
54
55 disabledTestPaths = [
56 # Test requires internet connection to mermaid.ink
57 "test/pipelines/integration"
58 ];
59
60 disabledTests = [
61 # Path issue
62 "test_draw_pygraphviz"
63 ];
64
65 pythonImportsCheck = [
66 "canals"
67 ];
68
69 meta = with lib; {
70 description = "A component orchestration engine";
71 homepage = "https://github.com/deepset-ai/canals";
72 changelog = "https://github.com/deepset-ai/canals/releases/tag/v${version}";
73 license = licenses.asl20;
74 maintainers = with maintainers; [ happysalada ];
75 };
76}