"""
Sentinel Health Score computation.
"""


class HealthScore:
    """
    Compute the equipment Health Score.
    """

    @staticmethod
    def compute(
        compressor_stress: float,
    ) -> float:
        """
        Convert compressor stress into a Health Score from 0 to 100.
        """
        return round(
            max(0.0, min(100.0, 100.0 - compressor_stress)),
            2,
        )