diff --git a/python/examples/ingestion_with_yaml_config/rule_modules/velocity.yml b/python/examples/ingestion_with_yaml_config/rule_modules/velocity.yml index 63a13edd..2e82617b 100644 --- a/python/examples/ingestion_with_yaml_config/rule_modules/velocity.yml +++ b/python/examples/ingestion_with_yaml_config/rule_modules/velocity.yml @@ -9,3 +9,4 @@ rules: - name: vehicle_not_stopped description: Makes sure vehicle velocity remains 0 while stopped expression: $1 == "Stopped" && $2 > 0 + type: review diff --git a/python/examples/ingestion_with_yaml_config/rule_modules/voltage.yml b/python/examples/ingestion_with_yaml_config/rule_modules/voltage.yml index c99ae8bb..b47e7216 100644 --- a/python/examples/ingestion_with_yaml_config/rule_modules/voltage.yml +++ b/python/examples/ingestion_with_yaml_config/rule_modules/voltage.yml @@ -9,3 +9,4 @@ rules: - name: undervoltage description: Checks for undervoltage while accelerating expression: $1 == "Accelerating" && $2 < 40 + type: review diff --git a/python/examples/ingestion_with_yaml_config/telemetry_config.py b/python/examples/ingestion_with_yaml_config/telemetry_config.py index faa53cda..653e70db 100644 --- a/python/examples/ingestion_with_yaml_config/telemetry_config.py +++ b/python/examples/ingestion_with_yaml_config/telemetry_config.py @@ -16,12 +16,12 @@ def nostromos_lv_426() -> TelemetryConfig: telemetry_config_path = TELEMETRY_CONFIGS_DIR.joinpath(telemetry_config_name) - # Load your telemetry config with your reusable expressions modules + # Load your telemetry config with your reusable expressions modules and rule modules return TelemetryConfig.try_from_yaml( telemetry_config_path, [ EXPRESSION_MODULES_DIR.joinpath("kinematics.yml"), EXPRESSION_MODULES_DIR.joinpath("string.yml"), ], - [RULE_MODULES_DIR.joinpath("voltage.yml")], + [RULE_MODULES_DIR], ) diff --git a/python/lib/sift_py/ingestion/config/telemetry.py b/python/lib/sift_py/ingestion/config/telemetry.py index 61a3e7f0..1f805a8f 100644 --- a/python/lib/sift_py/ingestion/config/telemetry.py +++ b/python/lib/sift_py/ingestion/config/telemetry.py @@ -205,6 +205,7 @@ def _from_yaml( if not found_rule: # TODO: Maybe we should try and catch this earlier? raise ValueError(f"Could not find rule name {rule['name']} in {namespace}") + rule = found_rule annotation_type = RuleActionAnnotationKind.from_str(rule["type"])