kedro/framework/cli/cli.py
def _check_config_ok(config_path: str, config: Dict[str, Any]) -> Dict[str, Any]:
    """Check that the configuration file contains all needed variables.

    Args:
        config_path: The path of the config file.
        config: The config as a dictionary.

    Returns:
        Config dictionary.

    Raises:
        KedroCliError: If the config file is empty or does not contain all
            keys from template/cookiecutter.json and output_dir.

    """
    if config is None:
        _show_example_config()
        raise KedroCliError(config_path + " is empty")

    missing_keys = _get_default_config().keys() - config.keys()

    if missing_keys:
        click.echo(f"\n{config_path}:")
        click.echo(yaml.dump(config, default_flow_style=False))
        _show_example_config()

        missing_keys_str = ", ".join(str(k) for k in missing_keys)
        raise KedroCliError(f"[{missing_keys_str}] not found in {config_path}")

    config["output_dir"] = _fix_user_path(config["output_dir"])
    _assert_output_dir_ok(config["output_dir"])
    _assert_repo_name_ok(config["repo_name"])
    _assert_pkg_name_ok(config["python_package"])
    _assert_include_example_ok(config["include_example"])
    return config
Check that the configuration file contains all needed variables.

    Args:
        config_path: The path of the config file.
        config: The config as a dictionary.

    Returns:
        Config dictionary.

    Raises:
        KedroCliError: If the config file is empty or does not contain all
            keys from template/cookiecutter.json and output_dir.

    
Check that the configuration file contains all needed variables.
Check that the configuration file contains all needed variables .
def _check_config_ok(config_path: str, config: Dict[str, Any]) -> Dict[str, Any]:
    if config is None:
        _show_example_config()
        raise KedroCliError(config_path + " is empty")
    missing_keys = _get_default_config().keys() - config.keys()
    if missing_keys:
        click.echo(f"\n{config_path}:")
        click.echo(yaml.dump(config, default_flow_style=False))
        _show_example_config()
        missing_keys_str = ", ".join(str(k) for k in missing_keys)
        raise KedroCliError(f"[{missing_keys_str}] not found in {config_path}")
    config["output_dir"] = _fix_user_path(config["output_dir"])
    _assert_output_dir_ok(config["output_dir"])
    _assert_repo_name_ok(config["repo_name"])
    _assert_pkg_name_ok(config["python_package"])
    _assert_include_example_ok(config["include_example"])
    return config
def _check_config_ok ( config_path : str , config : Dict [ str , Any ] ) -> Dict [ str , Any ] : if config is None : _show_example_config ( ) raise KedroCliError ( config_path + " is empty" ) missing_keys = _get_default_config ( ) . keys ( ) - config . keys ( ) if missing_keys : click . echo ( f"\n{config_path}:" ) click . echo ( yaml . dump ( config , default_flow_style = False ) ) _show_example_config ( ) missing_keys_str = ", " . join ( str ( k ) for k in missing_keys ) raise KedroCliError ( f"[{missing_keys_str}] not found in {config_path}" ) config [ "output_dir" ] = _fix_user_path ( config [ "output_dir" ] ) _assert_output_dir_ok ( config [ "output_dir" ] ) _assert_repo_name_ok ( config [ "repo_name" ] ) _assert_pkg_name_ok ( config [ "python_package" ] ) _assert_include_example_ok ( config [ "include_example" ] ) return config
Check that the configuration file contains all needed variables.
Check that the configuration file contains all needed variables .
"""Check that the configuration file contains all needed variables.

    Args:
        config_path: The path of the config file.
        config: The config as a dictionary.

    Returns:
        Config dictionary.

    Raises:
        KedroCliError: If the config file is empty or does not contain all
            keys from template/cookiecutter.json and output_dir.

    """
None
If the config file is empty or does not contain all
keys from template/cookiecutter.json and output_dir.
If the config file is empty or does not contain all keys from template / cookiecutter . json and output_dir .
KedroCliError
config_path
str
The path of the config file.
The path of the config file .
config
Dict[str, Any]
The config as a dictionary.
The config as a dictionary .