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