Skip to content

Commit 9c67e7a

Browse files
committed
Merge commit 'd086b2f0cd181b1636d3d707f7317f4f95878726'
2 parents df73057 + d086b2f commit 9c67e7a

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

nowcasting_datamodel/models/metric.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ class MetricValueSQL(Base_Forecast, CreatedMixin):
151151
model_id = Column(Integer, ForeignKey("model.id"), index=True)
152152

153153

154-
155-
156154
class MetricValue(EnhancedBaseModel):
157155
"""Location that the forecast is for"""
158156

nowcasting_datamodel/read/blend/blend.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
3. blends them together
66
77
"""
8-
import logging
8+
99
from datetime import datetime
1010
from typing import List, Optional
1111

12+
import structlog
1213
from sqlalchemy.orm.session import Session
1314

1415
from nowcasting_datamodel.models.forecast import ForecastValue, ForecastValueSevenDaysSQL
@@ -23,7 +24,7 @@
2324
)
2425
from nowcasting_datamodel.read.read import get_forecast_values, get_forecast_values_latest
2526

26-
logger = logging.getLogger(__name__)
27+
logger = structlog.stdlib.get_logger()
2728

2829

2930
def get_blend_forecast_values_latest(

nowcasting_datamodel/read/blend/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"""Utils for blending forecasts together"""
2-
import logging
32
from datetime import datetime, timedelta, timezone
43
from typing import List, Union
54

65
import pandas as pd
6+
import structlog
77

88
from nowcasting_datamodel.models import ForecastValue
99

10-
logger = logging.getLogger(__name__)
10+
logger = structlog.stdlib.get_logger()
1111

1212

1313
def check_forecast_created_utc(forecast_values_all_model) -> List[Union[str, List[ForecastValue]]]:

nowcasting_datamodel/read/blend/weights.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
"""Functions to make weights for blending"""
2-
import logging
32
from datetime import datetime, timedelta, timezone
43
from typing import List, Optional
54

65
import numpy as np
76
import pandas as pd
7+
import structlog
88

9-
logger = logging.getLogger(__name__)
9+
logger = structlog.stdlib.get_logger()
1010

1111
default_weights = [
1212
{

nowcasting_datamodel/read/read_metric.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
from sqlalchemy.orm.session import Session
1111

12-
from nowcasting_datamodel.models import MLModelSQL
1312
from nowcasting_datamodel.models.metric import DatetimeIntervalSQL, MetricSQL, MetricValueSQL
1413

1514
logger = logging.getLogger(__name__)

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ numpy
66
alembic
77
click
88
freezegun
9+
structlog

0 commit comments

Comments
 (0)