Skip to content

Commit

Permalink
nowcasting_datamodel==1.5.36, and update pydantic models
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Mar 13, 2024
1 parent 69d8e7e commit 1532dfa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ uvicorn[standard]
pydantic
numpy
requests
nowcasting_datamodel==1.5.34
pydantic==2.3
nowcasting_datamodel==1.5.36
sqlalchemy
psycopg2-binary
geopandas
Expand Down
4 changes: 2 additions & 2 deletions src/pydantic_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class GSPYieldGroupByDatetime(EnhancedBaseModel):
"""gsp yields for one a singel datetime"""

datetime_utc: datetime = Field(..., description="The timestamp of the gsp yield")
generation_kw_by_gsp_id: Dict[str, str] = Field(
generation_kw_by_gsp_id: Dict[int, float] = Field(
...,
description="List of generations by gsp_id. Key is gsp_id, value is generation_kw. "
"We keep this as a dictionary to keep the size of the file small ",
Expand All @@ -65,7 +65,7 @@ class OneDatetimeManyForecastValues(EnhancedBaseModel):
"""One datetime with many forecast values"""

datetime_utc: datetime = Field(..., description="The timestamp of the gsp yield")
forecast_values: Dict[str, float] = Field(
forecast_values: Dict[int, float] = Field(
...,
description="List of forecasts by gsp_id. Key is gsp_id, value is generation_kw. "
"We keep this as a dictionary to keep the size of the file small ",
Expand Down

0 comments on commit 1532dfa

Please sign in to comment.