Skip to content

Commit

Permalink
Merge pull request #526 from openeemeter/normalize-warning-name-acros…
Browse files Browse the repository at this point in the history
…s-data-models

Ensures the model.warnings/model.disqualification fields exist across both models
  • Loading branch information
jason-recurve authored Jan 6, 2025
2 parents bec797d + 9f9e1f0 commit a2ca76b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Changelog
Development
-----------

* Rename HourlyBaselineData.sufficiency_warnings -> HourlyBaselineData.warnings
* Add disqualification field to HourlyBaselineData and HourlyReportingData
* Fix bug where HourlyBaselineData and HourlyReportingData wasn't actually NaNning zero rows when `is_electricity=True`.
* Constrain eemeter daily model balance points to T_min_seg and T_max_seg rather than T_min and T_max.

Expand Down
5 changes: 4 additions & 1 deletion eemeter/eemeter/models/hourly/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def __init__(self, df: pd.DataFrame, is_electricity_data: bool):
df = self._correct_frequency(df)

self.df = df
self.warnings = []
self.disqualification = []

def _correct_frequency(self, df: pd.DataFrame):
meter = df["observed"]
Expand Down Expand Up @@ -90,7 +92,8 @@ def __init__(self, df: pd.DataFrame, is_electricity_data: bool):
df = self._correct_frequency(df)

self.df = df
self.sufficiency_warnings = self._check_data_sufficiency()
self.warnings = self._check_data_sufficiency()
self.disqualification = []

def _check_data_sufficiency(self):
meter = self.df["observed"].rename("meter_value")
Expand Down

0 comments on commit a2ca76b

Please sign in to comment.