Skip to content

Commit ba353e9

Browse files
authored
Merge pull request #1019 from cmu-delphi/fix_quidel_covidtest
Add export_day_range into params.json
2 parents db42ff8 + e1b5be4 commit ba353e9

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

quidel_covidtest/delphi_quidel_covidtest/constants.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
MIN_OBS = 50 # minimum number of observations in order to compute a proportion.
44
POOL_DAYS = 7 # number of days in the past (including today) to pool over
55
END_FROM_TODAY_MINUS = 5 # report data until - X days
6-
EXPORT_DAY_RANGE = 40 # Number of dates to report
76
# Signal names
87
SMOOTHED_POSITIVE = "covid_ag_smoothed_pct_positive"
98
RAW_POSITIVE = "covid_ag_raw_pct_positive"

quidel_covidtest/delphi_quidel_covidtest/run.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
get_structured_logger
1515
)
1616

17-
from .constants import (END_FROM_TODAY_MINUS, EXPORT_DAY_RANGE,
17+
from .constants import (END_FROM_TODAY_MINUS,
1818
SMOOTHED_POSITIVE, RAW_POSITIVE,
1919
SMOOTHED_TEST_PER_DEVICE, RAW_TEST_PER_DEVICE,
2020
GEO_RESOLUTIONS, SENSORS, SMOOTHERS)
@@ -64,6 +64,7 @@ def run_module(params: Dict[str, Any]):
6464
export_dir = params["common"]["export_dir"]
6565
export_start_date = params["indicator"]["export_start_date"]
6666
export_end_date = params["indicator"]["export_end_date"]
67+
export_day_range = params["indicator"]["export_day_range"]
6768

6869
# Pull data and update export date
6970
df, _end_date = pull_quidel_covidtest(params["indicator"])
@@ -73,7 +74,7 @@ def run_module(params: Dict[str, Any]):
7374
export_end_date = check_export_end_date(export_end_date, _end_date,
7475
END_FROM_TODAY_MINUS)
7576
export_start_date = check_export_start_date(export_start_date,
76-
export_end_date, EXPORT_DAY_RANGE)
77+
export_end_date, export_day_range)
7778

7879
first_date, last_date = df["timestamp"].min(), df["timestamp"].max()
7980

quidel_covidtest/params.json.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"export_end_date": "",
1111
"pull_start_date": "2020-05-26",
1212
"pull_end_date":"",
13+
"export_day_range":40,
1314
"aws_credentials": {
1415
"aws_access_key_id": "",
1516
"aws_secret_access_key": ""

quidel_covidtest/tests/test_run.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class TestRun:
2323
"export_end_date": "",
2424
"pull_start_date": "2020-07-09",
2525
"pull_end_date":"",
26+
"export_day_range":40,
2627
"aws_credentials": {
2728
"aws_access_key_id": "",
2829
"aws_secret_access_key": ""

0 commit comments

Comments
 (0)