Files
cosma-log-analyzer/src/cosma_log_analyzer/rules/__init__.py
2026-04-19 15:20:17 +00:00

35 lines
811 B
Python

"""Deterministic rules v0.
Adding a new rule = subclass Rule, register it in `ALL_RULES`, add a test.
"""
from __future__ import annotations
from .base import Rule
from .battery_low import BatteryLowRule
from .imu_outliers import ImuOutliersRule
from .usbl_distance_spike import UsblDistanceSpikeRule
from .usbl_snr_low import UsblSnrLowRule
from .watchdog_imu import WatchdogImuRule
def all_rules() -> list[Rule]:
"""Default rule set, instantiated with env/default thresholds."""
return [
ImuOutliersRule(),
WatchdogImuRule(),
UsblSnrLowRule(),
UsblDistanceSpikeRule(),
BatteryLowRule(),
]
__all__ = [
"Rule",
"ImuOutliersRule",
"WatchdogImuRule",
"UsblSnrLowRule",
"UsblDistanceSpikeRule",
"BatteryLowRule",
"all_rules",
]