Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[do not merge] example to move inclusion override #257

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading