config_utils
non_schema_checks(config)
Do additional voluntary checks for config consistency beyond what the schema validates.
Source code in emodpy_malaria/utils/config_utils.py
validate_allele_combo(species_params, allele_combo)
Validate that a user provided an acceptable allele_combo where it is a two dimensional array of strings and the inner array has two elements where each element is an allele of the same gene.
Source code in emodpy_malaria/utils/config_utils.py
validate_bins(bins, param_name, min_value=None, max_value=None)
Validate that a list of bin edges is in strictly ascending order and within optional bounds.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bins
|
list
|
List of numeric bin edges. |
required |
param_name
|
str
|
Name of the parameter (for error messages). |
required |
min_value
|
float
|
If set, all values must be >= this. |
None
|
max_value
|
float
|
If set, all values must be <= this. |
None
|
Returns:
| Type | Description |
|---|---|
list
|
The validated list of bins. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If bins are not in ascending order or out of bounds. |