Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nowcast/.pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ disable=logging-format-interpolation,
[BASIC]

# Allow arbitrarily short-named variables.
variable-rgx=[a-z_][a-z0-9_]*
argument-rgx=[a-z_][a-z0-9_]*
attr-rgx=[a-z_][a-z0-9_]*
variable-rgx=[A-Za-z_][a-z0-9_]*
argument-rgx=[A-Za-z_][a-z0-9_]*
attr-rgx=[A-Za-z_][a-z0-9_]*

[DESIGN]

Expand Down
2 changes: 1 addition & 1 deletion nowcast/delphi_nowcast/deconvolution/deconvolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def deconvolve_double_smooth_ntf(
x_k = None
alpha_0 = np.zeros(n - k - 1)
u_0 = np.zeros(n - k - 1)
for t in range(n_iters):
for _ in range(n_iters):
x_k = x_update_1 @ (Cty + rho * D.T @ (alpha_0 + u_0))
Dx = D @ x_k
alpha_k = _soft_thresh(Dx - u_0, lam / rho)
Expand Down
47 changes: 0 additions & 47 deletions nowcast/delphi_nowcast/deconvolution/ground_truth.py

This file was deleted.

4 changes: 3 additions & 1 deletion nowcast/delphi_nowcast/sensorization/ar_model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from datetime import datetime, timedelta, date
"""Fit autoregression models."""

from datetime import timedelta, date
from typing import Tuple

import numpy as np
Expand Down
4 changes: 3 additions & 1 deletion nowcast/delphi_nowcast/sensorization/regression_model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from datetime import datetime, timedelta, date
"""Fit linear regression mdels."""

from datetime import timedelta, date

import numpy as np

Expand Down
5 changes: 2 additions & 3 deletions nowcast/delphi_nowcast/sensorization/sensor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Functions to run sensorization."""
import os
from collections import defaultdict
from typing import List, DefaultDict
from datetime import timedelta, date
Expand Down Expand Up @@ -54,7 +53,7 @@ def compute_sensors(as_of_date: date,
(sensor.source, sensor.signal, loc.geo_type, loc.geo_value)
)
if not covariates:
# TODO convert to log statements #689
# TODO convert to log statements #689 # pylint: disable=fixme
print(f"No data: {(sensor.source, sensor.signal, loc.geo_type, loc.geo_value)}")
continue
reg_sensor = compute_regression_sensor(sensor_pred_date, covariates, loc, REG_INTERCEPT)
Expand Down Expand Up @@ -95,7 +94,7 @@ def historical_sensors(start_date: date,
output = defaultdict(list)
for location in ground_truths:
for sensor in sensors:
sensor_vals, missing_dates = get_historical_sensor_data(
sensor_vals, _ = get_historical_sensor_data(
sensor, location, start_date, end_date
)
if sensor_vals.data:
Expand Down