
from kedro.pipeline import Pipeline, node, pipeline

from .nodes import (parse_xml_collection, make_json_collection,
                   add_xmlcontent_tojson)


def create_pipeline(**kwargs) -> Pipeline:
    return pipeline(
        [
            node(
                func=parse_xml_collection,
                inputs=["bourbon"],
                outputs="bourbon_xmlcontent",
                name="bourbon_ds_collection",
            ),
            node(
                func=make_json_collection,
                inputs="bourbon_json",
                outputs="bourbon_jsonoutput",
                name="bourbon_json_ds_collection",
            ),
            node(
                func=add_xmlcontent_tojson,
                inputs=["bourbon_jsonoutput", "bourbon_pseudoxmlcontent"],
                outputs="bourbon_fulljsonoutput",
                name="bourbon_fulljson_ds_collection",
            ),

#            node(
#                func=parse_xml_collection,
#                inputs="berry",
#                outputs="berry_xmlcontent",
#                name="berry_ds_collection",
#            ),
#            node(
#                func=parse_xml_collection,
#                inputs="anjou",
#                outputs=None, # "anjou_xmlcontent",
#                name="anjou_ds_collection",
#            ),

        ]
    )

