示例#1
0
def init_metadata(ctx, user_defined_path):
    """Load and initialize job metadata."""
    config = ctx.obj[CONFIG]
    meta_path = user_defined_path or config.metadata_path()
    if not meta_path:
        raise ConfigError("Job metadata file path not provided.")
    if not os.path.exists(meta_path):
        raise ConfigError(f"Job metadata file not found: {meta_path}")
    metadata_data = load_yaml(meta_path)
    ctx.obj[METADATA] = metadata_data

    return metadata_data
示例#2
0
def init_prov_config(path):
    """Load and initialize provisioning configuration."""
    config_data = load_yaml(path)
    config = ProvisioningConfig(config_data)
    return config
示例#3
0
文件: run.py 项目: pvoborni/mrack
def init_metadata(path):
    """Load and initialize job metadata."""
    metadata_data = load_yaml(path)
    return metadata_data