Skip to content

Commit

Permalink
moved inclusion override
Browse files Browse the repository at this point in the history
  • Loading branch information
alanisaac committed Oct 1, 2024
1 parent 2145ffc commit a99ce92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 0 additions & 2 deletions rules-engine/src/rules_engine/pydantic_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand Down
6 changes: 5 additions & 1 deletion rules-engine/tests/test_rules_engine/test_utils.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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
Expand All @@ -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):
Expand Down

0 comments on commit a99ce92

Please sign in to comment.