sift_client.util.test_results.bounds
¶
| FUNCTION | DESCRIPTION |
|---|---|
assign_value_to_measurement |
Resolve value type from a given value and assign it to a measurement. |
evaluate_measurement_bounds |
Update a measurement with the resolved bounds type and result of evaluating the given value against those bounds. |
assign_value_to_measurement
¶
assign_value_to_measurement(
measurement: TestMeasurement
| TestMeasurementCreate
| TestMeasurementUpdate,
value: float | str | bool,
) -> None
Resolve value type from a given value and assign it to a measurement.
| PARAMETER | DESCRIPTION |
|---|---|
measurement
|
The measurement to assign the value to.
TYPE:
|
value
|
The value to resolve and assign to the measurement.
TYPE:
|
evaluate_measurement_bounds
¶
evaluate_measurement_bounds(
measurement: TestMeasurement
| TestMeasurementCreate
| TestMeasurementUpdate,
value: float | str | bool,
bounds: dict[str, float]
| NumericBounds
| str
| bool
| None,
) -> bool
Update a measurement with the resolved bounds type and result of evaluating the given value against those bounds.
| PARAMETER | DESCRIPTION |
|---|---|
measurement
|
The measurement to update.
TYPE:
|
value
|
The value to evaluate the bounds of.
TYPE:
|
bounds
|
The bounds to evaluate the value against. Either a dictionary with "min" and "max" keys, a NumericBounds object, a string, a boolean, or None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the value is within the bounds, False otherwise. |