Skip to content

Commit

Permalink
validation rules
Browse files Browse the repository at this point in the history
  • Loading branch information
JrtPec committed Dec 8, 2023
1 parent 38912be commit 799c91a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
2 changes: 1 addition & 1 deletion openenergyid/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Open Energy ID Python SDK."""

__version__ = "0.1.3"
__version__ = "0.1.4"

from .enums import Granularity
from .models import TimeSeries
Expand Down
17 changes: 0 additions & 17 deletions openenergyid/mvlr/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,3 @@ def resample_input_data(
return data.resample(rule=pandas_granularity_map[granularity]).agg(
aggregation_methods,
)


def temperature_equivalent_to_degree_days(
temperature_equivalent: pd.Series, base_temperature: float, cooling: bool = False
) -> pd.Series:
"""
Convert temperature equivalent to degree days.
Use cooling=True to convert cooling degree days.
"""

if cooling:
result = temperature_equivalent - base_temperature
else:
result = base_temperature - temperature_equivalent

return result.clip(lower=0)
4 changes: 2 additions & 2 deletions openenergyid/mvlr/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class IndependentVariable(BaseModel):

name: str
coef: float
t_stat: Optional[float] = Field(ge=0, le=1, default=None, alias="tStat")
t_stat: Optional[float] = Field(default=None, alias="tStat")
p_value: Optional[float] = Field(ge=0, le=1, default=None, alias="pValue")
std_err: Optional[float] = Field(ge=0, le=1, default=None, alias="stdErr")
std_err: Optional[float] = Field(default=None, alias="stdErr")
confidence_interval: Optional[ConfidenceInterval] = Field(
default=None, alias="confidenceInterval"
)
Expand Down

0 comments on commit 799c91a

Please sign in to comment.