mafw.processor.utils
Standalone utility helpers for the Processor package.
This module provides validation helpers that are used across the processor
sub-package but do not belong to any specific class. Currently it contains
validate_database_conf(), which checks that a steering-file database
section carries the minimum required fields before a database connection
is attempted.
Added in version 2.3: Extracted from the monolithic processor.py module for improved
maintainability and focused testing.
Functions
|
Validate the database configuration dictionary. |
- mafw.processor.utils.validate_database_conf(database_conf: dict[str, Any] | None = None) dict[str, Any] | None[source]
Validate the database configuration dictionary.
This function is called during processor initialisation to ensure that the supplied database configuration contains the minimum required fields (currently just
URL). If the configuration is a full steering file, theDBConfigurationsection is extracted automatically.- Parameters:
database_conf (dict, Optional) – The input database configuration. Defaults to None.
- Returns:
Either the validated database configuration or None if it is invalid.
- Return type:
dict, None