|
21 | 21 | "\n",
|
22 | 22 | "\n",
|
23 | 23 | "@pipefunc(output_name=\"c\")\n",
|
24 |
| - "def f(a, b): # noqa: ANN202\n", |
| 24 | + "def f(a, b):\n", |
25 | 25 | " return a + b\n",
|
26 | 26 | "\n",
|
27 | 27 | "\n",
|
28 | 28 | "@pipefunc(output_name=\"d\")\n",
|
29 |
| - "def g(b, c, x=1): # noqa: ANN202\n", |
| 29 | + "def g(b, c, x=1):\n", |
30 | 30 | " return b * c * x\n",
|
31 | 31 | "\n",
|
32 | 32 | "\n",
|
33 | 33 | "@pipefunc(output_name=\"e\")\n",
|
34 |
| - "def h(c, d, x=1): # noqa: ANN202\n", |
| 34 | + "def h(c, d, x=1):\n", |
35 | 35 | " return c * d * x\n",
|
36 | 36 | "\n",
|
37 | 37 | "\n",
|
38 |
| - "pipeline = Pipeline(\n", |
39 |
| - " [f, g, h],\n", |
40 |
| - " debug=True, # optionally print debug information\n", |
41 |
| - " profile=True, # optionally profile the pipeline\n", |
42 |
| - " cache_type=\"hybrid\", # optionally cache the pipeline\n", |
43 |
| - ")\n", |
| 38 | + "pipeline = Pipeline([f, g, h])\n", |
44 | 39 | "\n",
|
45 | 40 | "dot_source = pipeline.visualize_graphviz(return_type=\"graphviz\").source"
|
46 | 41 | ]
|
|
51 | 46 | "metadata": {},
|
52 | 47 | "outputs": [],
|
53 | 48 | "source": [
|
54 |
| - "from graphviz_anywidget import GraphvizWidget\n", |
| 49 | + "from graphviz_anywidget import GraphvizWidget, graph_widget\n", |
55 | 50 | "\n",
|
56 |
| - "GraphvizWidget(dot_source=dot_source)" |
| 51 | + "graph_widget(dot_string=dot_source)" |
57 | 52 | ]
|
58 | 53 | },
|
59 | 54 | {
|
60 | 55 | "cell_type": "code",
|
61 | 56 | "execution_count": null,
|
62 | 57 | "metadata": {},
|
63 | 58 | "outputs": [],
|
64 |
| - "source": [] |
| 59 | + "source": [ |
| 60 | + "GraphvizWidget(dot_source=dot_source)" |
| 61 | + ] |
65 | 62 | }
|
66 | 63 | ],
|
67 | 64 | "metadata": {
|
|
0 commit comments