Hey everyone, I struggle writing an integration te...
# questions
j
Hey everyone, I struggle writing an integration test for one pipeline. Is anyone willing to share example code, where I can see how it's done in the best way?
d
j
@datajoely TL;DR: I want to use parameters.yaml in tests; but I cannot access parameters with kedros own syntax e.g. "params:random_seed.option1" I'd like to have a central configuration file for all tests of a pipeline (integration test). Therefore I build a catalog as follows:
Copy code
def DATA_CATALOG(basic_data):
    conf_loader = ConfigLoader(conf_source= Path("/workspace/pipeline/src/tests/conf/"))
    return DataCatalog(
        data_sets={"basic_data": MemoryDataset(basic_data)},
        feed_dict=???
    )
Unfortunately I cannot use the parameter selection like shown below:
Copy code
def test_example_pipeline(DATA_CATALOG):
    # Initialize Kedro context and runner
    runner = SequentialRunner()
    #pipe = create_pipeline(inputs = "basic_data", outputs = "outputs")
    pipe = pipeline(
        [
            node(func=increment_random_seed, 
                 inputs={"random_seed": "params:random_seed.option1"},
                 outputs="output_inrs", 
                 name="split_data"),
            node(func=multiply_arr,
                 inputs={"arr": "basic_data",
                         "random_seed": "output_inrs"},
                 outputs="outputs") 
        ],
        tags="DL_Pipeline"
How could I solve this?