From a99ce92b7f8a5ca4a1290a4c1c69bb1617148c60 Mon Sep 17 00:00:00 2001 From: Alan Pinkert Date: Tue, 1 Oct 2024 19:57:35 -0400 Subject: [PATCH] moved inclusion override --- rules-engine/src/rules_engine/pydantic_models.py | 2 -- rules-engine/tests/test_rules_engine/test_utils.py | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/rules-engine/src/rules_engine/pydantic_models.py b/rules-engine/src/rules_engine/pydantic_models.py index 1677b3cf..b9b72f49 100644 --- a/rules-engine/src/rules_engine/pydantic_models.py +++ b/rules-engine/src/rules_engine/pydantic_models.py @@ -84,7 +84,6 @@ class OilPropaneBillingRecordInput(BaseModel): period_end_date: date = Field(description="Oil-Propane!B") gallons: float = Field(description="Oil-Propane!C") - inclusion_override: Optional[bool] = Field(description="Oil-Propane!F") class OilPropaneBillingInput(BaseModel): @@ -100,7 +99,6 @@ class NaturalGasBillingRecordInput(BaseModel): period_start_date: date = Field(description="Natural Gas!A") period_end_date: date = Field(description="Natural Gas!B") usage_therms: float = Field(description="Natural Gas!D") - inclusion_override: Optional[bool] = Field(description="Natural Gas!E") class NaturalGasBillingInput(BaseModel): diff --git a/rules-engine/tests/test_rules_engine/test_utils.py b/rules-engine/tests/test_rules_engine/test_utils.py index be42d2c0..a5bfaa37 100644 --- a/rules-engine/tests/test_rules_engine/test_utils.py +++ b/rules-engine/tests/test_rules_engine/test_utils.py @@ -1,7 +1,9 @@ import csv from datetime import date, datetime, timedelta from pathlib import Path -from typing import Any, Sequence +from typing import Any, Optional, Sequence + +from pydantic import Field from rules_engine.pydantic_models import ( FuelType, @@ -33,6 +35,7 @@ class NaturalGasBillingRecordExampleInput(NaturalGasBillingRecordInput): """ whole_home_heat_loss_rate: float + inclusion_override: Optional[bool] = Field(description="Natural Gas!E") # Then overload NG Billing Input to contain new NG Billing Record Example Input subclass @@ -54,6 +57,7 @@ class OilPropaneBillingRecordExampleInput(OilPropaneBillingRecordInput): """ whole_home_heat_loss_rate: float + inclusion_override: Optional[bool] = Field(description="Oil-Propane!F") class OilPropaneBillingExampleInput(OilPropaneBillingInput):