Skip to content

Commit af1cf53

Browse files
committed
add comments
1 parent f3b858c commit af1cf53

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

nowcasting_datamodel/models/convert.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ def convert_df_to_national_forecast(
103103
if "forecast_mw_plevel_10" in forecast_values_df.columns:
104104
forecast_value_sql.properties = {
105105
"10": forecast_value.forecast_mw_plevel_10,
106+
}
107+
108+
if "forecast_mw_plevel_90" in forecast_values_df.columns:
109+
forecast_value_sql.properties = {
106110
"90": forecast_value.forecast_mw_plevel_90,
107111
}
108112

nowcasting_datamodel/models/forecast.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,8 @@ class ForecastValue(EnhancedBaseModel):
318318
"The _ at the start means it is not expose in the API",
319319
)
320320

321+
# This its better to keep this out of the current pydantic models used by the API.
322+
# A new pydantic mode can be made that includes the forecast plevels, perhaps in the API.
321323
_properties: dict = Field(
322324
None,
323325
description="Dictionary to hold properties of the forecast, like p_levels. "

0 commit comments

Comments
 (0)