

# config_manager

`config.config_manager`

Configuration management for Nova EC.

## Functions

| Name | Description |
|----|----|
| [find_shapefile](#nova_ec.config.config_manager.find_shapefile) | Find a shapefile given a base path and relative path. |
| [get_ec_paths](#nova_ec.config.config_manager.get_ec_paths) | Get energy community file paths for a specific year. |
| [load_config](#nova_ec.config.config_manager.load_config) | Load configuration from a YAML file. |
| [process_variable_substitution](#nova_ec.config.config_manager.process_variable_substitution) | Process variable substitution in configuration values. |
| [validate_config](#nova_ec.config.config_manager.validate_config) | Validate configuration and ensure all required values are present. |
| [validate_ec_data](#nova_ec.config.config_manager.validate_ec_data) | Validate that required energy community data files exist. |

### find_shapefile

``` python
config.config_manager.find_shapefile(base_path, relative_path)
```

Find a shapefile given a base path and relative path.

Args: base_path: Base path for the project relative_path: Relative path to the shapefile or directory

Returns: Path to the shapefile if found, None otherwise

### get_ec_paths

``` python
config.config_manager.get_ec_paths(config, year, debug=False)
```

Get energy community file paths for a specific year.

Args: config: Configuration dictionary year: Year to get paths for (2023 or 2024) debug: Whether to print debug information about paths

Returns: Dictionary of paths for energy community files

### load_config

``` python
config.config_manager.load_config(config_path)
```

Load configuration from a YAML file.

Args: config_path: Path to the YAML configuration file

Returns: Configuration dictionary

Raises: FileNotFoundError: If the configuration file doesn’t exist ValueError: If the configuration is invalid or missing required values

### process_variable_substitution

``` python
config.config_manager.process_variable_substitution(config)
```

Process variable substitution in configuration values.

Args: config: Configuration dictionary

Returns: Processed configuration dictionary

### validate_config

``` python
config.config_manager.validate_config(config)
```

Validate configuration and ensure all required values are present.

Args: config: Configuration dictionary to validate

Raises: ValueError: If any required configuration is missing

### validate_ec_data

``` python
config.config_manager.validate_ec_data(config, debug=False)
```

Validate that required energy community data files exist.

Args: config: Configuration dictionary debug: Whether to print debug information about paths

Returns: List of warning messages for missing files
