config_loader¶
config_loader ¶
Configuration loader for YAML and JSON files.
Enables loading pipeline configurations from declarative files.
ConfigLoader ¶
Loads pipeline configurations from YAML or JSON files.
Follows Single Responsibility: only handles config file loading.
from_yaml
staticmethod
¶
Load configuration from YAML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
str | Path
|
Path to YAML file |
required |
Returns:
| Type | Description |
|---|---|
PipelineSpecifications
|
PipelineSpecifications |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If file doesn't exist |
ValueError
|
If invalid YAML or configuration |
Source code in ondine/config/config_loader.py
from_json
staticmethod
¶
Load configuration from JSON file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
str | Path
|
Path to JSON file |
required |
Returns:
| Type | Description |
|---|---|
PipelineSpecifications
|
PipelineSpecifications |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If file doesn't exist |
ValueError
|
If invalid JSON or configuration |
Source code in ondine/config/config_loader.py
to_yaml
staticmethod
¶
Save specifications to YAML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
specifications
|
PipelineSpecifications
|
Pipeline specifications |
required |
file_path
|
str | Path
|
Destination file path |
required |
Source code in ondine/config/config_loader.py
to_json
staticmethod
¶
Save specifications to JSON file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
specifications
|
PipelineSpecifications
|
Pipeline specifications |
required |
file_path
|
str | Path
|
Destination file path |
required |