Skip to content

Commit f99601d

Browse files
committed
Full example
1 parent ca0ed17 commit f99601d

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

example.ipynb

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,21 @@
2121
"\n",
2222
"\n",
2323
"@pipefunc(output_name=\"c\")\n",
24-
"def f(a, b): # noqa: ANN202\n",
24+
"def f(a, b):\n",
2525
" return a + b\n",
2626
"\n",
2727
"\n",
2828
"@pipefunc(output_name=\"d\")\n",
29-
"def g(b, c, x=1): # noqa: ANN202\n",
29+
"def g(b, c, x=1):\n",
3030
" return b * c * x\n",
3131
"\n",
3232
"\n",
3333
"@pipefunc(output_name=\"e\")\n",
34-
"def h(c, d, x=1): # noqa: ANN202\n",
34+
"def h(c, d, x=1):\n",
3535
" return c * d * x\n",
3636
"\n",
3737
"\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",
4439
"\n",
4540
"dot_source = pipeline.visualize_graphviz(return_type=\"graphviz\").source"
4641
]
@@ -51,17 +46,19 @@
5146
"metadata": {},
5247
"outputs": [],
5348
"source": [
54-
"from graphviz_anywidget import GraphvizWidget\n",
49+
"from graphviz_anywidget import GraphvizWidget, graph_widget\n",
5550
"\n",
56-
"GraphvizWidget(dot_source=dot_source)"
51+
"graph_widget(dot_string=dot_source)"
5752
]
5853
},
5954
{
6055
"cell_type": "code",
6156
"execution_count": null,
6257
"metadata": {},
6358
"outputs": [],
64-
"source": []
59+
"source": [
60+
"GraphvizWidget(dot_source=dot_source)"
61+
]
6562
}
6663
],
6764
"metadata": {

0 commit comments

Comments
 (0)