-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add summation for generation * add forecast sum function * blacks * lint * add pydantic to requirements * update poetry lock file * add tests * lint
- Loading branch information
1 parent
24b8c2e
commit 6fa4d33
Showing
8 changed files
with
698 additions
and
381 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
""" Pydantic models.""" | ||
from datetime import datetime | ||
|
||
from pydantic import BaseModel, Field | ||
|
||
|
||
class GenerationSum(BaseModel): | ||
"""Sum of generation.""" | ||
|
||
power_kw: float = Field(..., description="Summed power in kW") | ||
start_utc: datetime = Field(..., description="Start datetime of this power") | ||
name: str = Field(..., description="Name of item sums. ") | ||
|
||
|
||
class ForecastValueSum(BaseModel): | ||
"""Sum of forecast values.""" | ||
|
||
power_kw: float = Field(..., description="Summed power in kW") | ||
start_utc: datetime = Field(..., description="Start datetime of this power") | ||
name: str = Field(..., description="Name of item sums. ") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters