![]() |
PyHelios 0.1.11
|
Functions | |
| validate_input (Dict[str, Callable] param_validators=None, Dict[str, Callable] type_coercions=None) | |
| Decorator for comprehensive parameter validation. | |
| bool | is_finite_numeric (Any value) |
| Check if value is a finite number (not NaN or inf). | |
| validate_positive_value (Any value, str param_name="value", str function_name=None) | |
| Validate value is positive and finite. | |
| validate_non_negative_value (Any value, str param_name="value", str function_name=None) | |
| Validate value is non-negative and finite. | |
| 'vec3' | coerce_to_vec3 (Any value, str param_name="parameter") |
| Safely coerce list/tuple to vec3 with validation. | |
| 'vec2' | coerce_to_vec2 (Any value, str param_name="parameter") |
| Safely coerce list/tuple to vec2 with validation. | |
| 'vec2' pyhelios.validation.core.coerce_to_vec2 | ( | Any | value, |
| str | param_name = "parameter" ) |
Safely coerce list/tuple to vec2 with validation.
| value | Value to coerce (vec2, list, or tuple) |
| param_name | Parameter name for error messages |
| ValidationError | If coercion fails or values are invalid |
| 'vec3' pyhelios.validation.core.coerce_to_vec3 | ( | Any | value, |
| str | param_name = "parameter" ) |
Safely coerce list/tuple to vec3 with validation.
| value | Value to coerce (vec3, list, or tuple) |
| param_name | Parameter name for error messages |
| ValidationError | If coercion fails or values are invalid |
| bool pyhelios.validation.core.is_finite_numeric | ( | Any | value | ) |
| pyhelios.validation.core.validate_input | ( | Dict[str, Callable] | param_validators = None, |
| Dict[str, Callable] | type_coercions = None ) |
Decorator for comprehensive parameter validation.
Performs type coercion first, then validation, following the pattern:
| param_validators | Dict mapping parameter names to validation functions |
| type_coercions | Dict mapping parameter names to coercion functions |
| pyhelios.validation.core.validate_non_negative_value | ( | Any | value, |
| str | param_name = "value", | ||
| str | function_name = None ) |
Validate value is non-negative and finite.
| value | Value to validate |
| param_name | Parameter name for error messages |
| function_name | Function name for error messages |
| ValidationError | If value is negative or not finite |
| pyhelios.validation.core.validate_positive_value | ( | Any | value, |
| str | param_name = "value", | ||
| str | function_name = None ) |
Validate value is positive and finite.
| value | Value to validate |
| param_name | Parameter name for error messages |
| function_name | Function name for error messages |
| ValidationError | If value is not positive or not finite |