From 1532dfab696e7aafb9532d3787496612101e5034 Mon Sep 17 00:00:00 2001 From: peterdudfield Date: Wed, 13 Mar 2024 16:45:07 +0000 Subject: [PATCH] nowcasting_datamodel==1.5.36, and update pydantic models --- requirements.txt | 3 +-- src/pydantic_models.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index e683dcf..e39de05 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/src/pydantic_models.py b/src/pydantic_models.py index 7f812f8..74a0978 100644 --- a/src/pydantic_models.py +++ b/src/pydantic_models.py @@ -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 ", @@ -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 ",