to_kedro_viz.py
pipeline_to_kedro_viz(nodes, ios, output_directory)
Convert a pipeline to a kedro-viz static pipeline directory
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
nodes
|
set[Node]
|
set of |
required |
ios
|
dict[tuple[str, str], Input | Output]
|
dict of name and |
required |
output_directory
|
Path
|
path to write the output data to |
required |
Raises:
| Type | Description |
|---|---|
FileExistsError
|
if the output directory already exists |
Examples:
>>> from pathlib import Path
>>> from ordeq_viz import (
... pipeline_to_kedro_viz
... )
>>> import catalog as catalog_module # doctest: +SKIP
>>> import nodes as nodes_module # doctest: +SKIP
Gather all nodes and ios in your project:
>>> from ordeq._resolve import _resolve_runnables_to_nodes_and_ios
>>> nodes, ios = _resolve_runnables_to_nodes_and_ios( # doctest: +SKIP
... catalog_module,
... pipeline_module
... )
Create the kedro-viz output directory:
>>> pipeline_to_kedro_viz(
... nodes,
... ios,
... output_directory=Path("kedro-pipeline-example/")
... ) # doctest: +SKIP
Run with:
export KEDRO_DISABLE_TELEMETRY=true
kedro viz run --load-file kedro-pipeline-example