Hi everyone, I have the following files: `setting...
# questions
f
Hi everyone, I have the following files:
settings.py
Copy code
CONFIG_LOADER_ARGS = {
    "base_env": "base",
    "default_run_env": "local",
    "config_patterns": {
        # Also include models.yml in the catalog
        "catalog": [
            "catalog*",
            "models*",
            "catalog*/**",
            "models*/**",
            "**/catalog*",
            "**/models*",

        ],
    }
}
conftest.py
Copy code
from kedro.framework.project import settings


@fixture(scope='session')
def config_loader():
    kwargs = settings.CONFIG_LOADER_ARGS
    kwargs.update(env="test", base_env="base", default_run_env="test")

    return OmegaConfigLoader(
        conf_source=str(PROJECT_PATH / settings.CONF_SOURCE), **kwargs,
    )
I expect my settings valued to loaded but this doesnt seem to be the case as I can't get config patters in the dict itself. Any idea why is that?
Copy code
@fixture(scope='session')
def config_loader():
    bootstrap_project(PROJECT_PATH)

    kwargs = settings.CONFIG_LOADER_ARGS
    kwargs.update(env="test", base_env="base", default_run_env="test")

    return OmegaConfigLoader(
        conf_source=str(PROJECT_PATH / settings.CONF_SOURCE), **kwargs,
    )
adding
boostrap_project
makes it work, I guess i have to add this
n
^ I missed this question completely. You either have to
bootstrap_project
to make sure project settings are read (because you are creating the class directly). Or you can pass in the kwargs explicitly (i.e. passing env=test if you have a separate test env)
f
kwargs only doesn't work as you see kwargs includes
env
but without bootstrap didn't work. That's why i needed to add the bootstrap function