SDK Reference
Log In
SDK Reference

Print the structure of the pipeline

Print the structure of the pipeline. It is possible to check the ID, Name, Status, and Parent IDs of the pipeline components that make up the pipeline, as well as the Name, Type, and Value information of the pipeline parameters.

The pipeline structure can be printed in two ways:

pipeline.print()
print(pipeline)

Example

from mrx_link.sdk.utils import *

# Code cell
code1 = """
x = 1
"""
code2 = """
print(f"{x=}, {y=}")
"""

if __name__ == "__main__":
    # Create components
    component1 = create_link_component(identifier="111-1", name="test", code=code1)
    component2 = create_link_component(identifier="111-2", name="test2", code=code2)
    components = [component1, component2]

    # Create edges
    edge1 = create_link_edge(parent_id="111-1", child_id="111-2")
    edges = [edge1]

    # Create pipeline parameters
    parameter1 = create_link_parameter(name="x", value="123")
    parameter2 = create_link_parameter(name="y", value="baregasdv")
    parameters = [parameter1, parameter2]

    # Create pipeline
    pipeline = create_link_pipeline(components=components, parameters=parameters, edges=edges)

    # Print pipeline 1
    pipeline.print()

    # Print pipeline 2
    print(pipeline)

Output

##### PIPELINE #####
ID     Name    Status    Parent IDs
-----  ------  --------  ------------
111-1  test    Ready     []
111-2  test2   Ready     ['111-1']

##### PARAMETERS #####
Name    Type    Value
------  ------  -----------
x       str     "123"
y       str     "baregasdv"


##### PIPELINE #####
ID     Name    Status    Parent IDs
-----  ------  --------  ------------
111-1  test    Ready     []
111-2  test2   Ready     ['111-1']

##### PARAMETERS #####
Name    Type    Value
------  ------  -----------
x       str     "123"
y       str     "baregasdv"

<mrx_link.sdk.pipeline.LinkPipeline object at 0x150729630>