Skip to content

Release covidcast-indicators 0.3.60 #2117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 62 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
c78ae21
nssp patching code
minhkhul Jul 23, 2024
7694c0a
lint
minhkhul Jul 23, 2024
a3ed4c2
add test
minhkhul Jul 24, 2024
1628d34
add test
minhkhul Jul 24, 2024
2536b94
Add patching how-to to readme
minhkhul Jul 24, 2024
e4d45e5
adjust current_issue_dir name for weekly data instead of daily.
minhkhul Jul 25, 2024
db906fc
lint
minhkhul Jul 25, 2024
8f0bb32
adjust test for more cases
minhkhul Jul 25, 2024
7f151f5
add custom_run flag
minhkhul Aug 6, 2024
c093349
handle custom flag on but bad config
minhkhul Aug 6, 2024
a967416
make patch config check readable
minhkhul Aug 6, 2024
c020da6
make good_patch_config check comprehensive
minhkhul Aug 6, 2024
9a6130b
rewrite good_patch_config for clarity
minhkhul Aug 7, 2024
b8a2177
add unit tests for good_patch_config check
minhkhul Aug 7, 2024
a7d9443
add test_pull unit test for patching case + cleanup format
minhkhul Aug 7, 2024
e29e07e
split test cases + move to pytest
minhkhul Aug 8, 2024
0a4bfb6
add test for multi-week patching
minhkhul Aug 9, 2024
6c0abad
rename tests for clarity + restructure test_patch tests to clarify pu…
minhkhul Aug 15, 2024
7078dd0
make expected issue dates explicit in test_patch_confirm_dir_structur…
minhkhul Aug 15, 2024
d435bf0
add log to distinguish grabbing records from socrata vs locally store…
minhkhul Aug 15, 2024
8734daa
Update nssp/README.md
minhkhul Aug 28, 2024
5a6f8b6
Update nssp/README.md
minhkhul Aug 28, 2024
4356494
Add auto-download source backup data + update docs + test
minhkhul Aug 29, 2024
ca427a4
adjust custom_run flag to leave room for non-patch custom runs
minhkhul Aug 30, 2024
f58b068
move pull logic from run.py into pull.py
minhkhul Aug 30, 2024
5e93175
logger to static
minhkhul Aug 30, 2024
2d8670d
adjust unit tests
minhkhul Aug 30, 2024
f0335f6
more unit test adjustment
minhkhul Aug 31, 2024
7e06f94
move get_source_data to pull.py + make get_source_data run when sourc…
minhkhul Sep 3, 2024
e678ce6
auto-remove source_dir content after finish patch run
minhkhul Sep 3, 2024
bc1d7a7
lint happy
minhkhul Sep 3, 2024
84cba84
Update pull.py
minhkhul Sep 10, 2024
742737b
Update pull.py - remove stat debug
minhkhul Sep 10, 2024
e13d3db
add progress log for source file download
minhkhul Sep 10, 2024
9cec6ff
lint
minhkhul Sep 10, 2024
5450d8b
lint
minhkhul Sep 10, 2024
0a8da1e
Merge remote-tracking branch 'origin/main' into nssp_patching
minhkhul Dec 19, 2024
ab4b542
rewrite get_source_data to get source data from prod backup_dir + add…
minhkhul Jan 3, 2025
14b4e6f
various bug fixes
minhkhul Jan 5, 2025
d9e1f74
remove source data from local after patch run
minhkhul Jan 6, 2025
ca5294b
fix tests in test_pull
minhkhul Jan 6, 2025
49c4f67
Add new + fix current patch tests + fix duplicated data
minhkhul Jan 7, 2025
fb3fbf2
use set comprehension in get_patch_dates
minhkhul Jan 7, 2025
1f5a4dc
lint
minhkhul Jan 8, 2025
32f550e
make user param optional when no source data download needed
minhkhul Jan 8, 2025
2214f87
linter
minhkhul Jan 8, 2025
d407d6c
Merge pull request #2110 from cmu-delphi/bot/sync-prod-main
minhkhul Jan 22, 2025
51620ea
Define new conjunctivitis signal in `google-symptoms` (#2112)
nmdefries Jan 29, 2025
9ce6cab
Merge branch 'main' into nssp_patching
minhkhul Feb 6, 2025
633399b
lint
minhkhul Feb 6, 2025
83e5a8c
adjust readme
minhkhul Feb 6, 2025
552d036
add test for pull source data + remove misc secondary trace
minhkhul Feb 6, 2025
c4dd3b2
darker linting
nmdefries Feb 6, 2025
a4c4aec
add tests for remote source download vs local
minhkhul Feb 7, 2025
7c77be5
Merge branch 'nssp_patching' of https://github.com/cmu-delphi/covidca…
minhkhul Feb 7, 2025
5f383a6
change source host to params + add if logger before use in create_bac…
minhkhul Feb 7, 2025
d70d6e1
lint
minhkhul Feb 7, 2025
2a67c27
fix test
minhkhul Feb 7, 2025
2b70e4a
Merge pull request #2000 from cmu-delphi/nssp_patching
minhkhul Feb 7, 2025
2b54b67
chore: bump delphi_utils to 0.3.27
Feb 10, 2025
a8fcbda
chore: bump covidcast-indicators to 0.3.60
Feb 10, 2025
e3520f2
[create-pull-request] automated change
melange396 Feb 10, 2025
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
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.3.59
current_version = 0.3.60
commit = True
message = chore: bump covidcast-indicators to {new_version}
tag = False
2 changes: 1 addition & 1 deletion _delphi_utils_python/.bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.3.26
current_version = 0.3.27
commit = True
message = chore: bump delphi_utils to {new_version}
tag = False
Expand Down
2 changes: 1 addition & 1 deletion _delphi_utils_python/delphi_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
from .utils import read_params
from .weekday import Weekday

__version__ = "0.3.26"
__version__ = "0.3.27"
3 changes: 2 additions & 1 deletion _delphi_utils_python/delphi_utils/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,5 @@ def create_backup_csv(
)
# pylint: disable=W0703
except Exception as e:
logger.info("Backup file creation failed", msg=e)
if logger:
logger.info("Backup file creation failed", msg=e)
2 changes: 1 addition & 1 deletion _delphi_utils_python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "delphi-utils"
version = "0.3.26"
version = "0.3.27"
description = "Shared Utility Functions for Indicators"
readme = "README.md"
requires-python = "== 3.8.*"
Expand Down
1 change: 1 addition & 0 deletions ansible/templates/google_symptoms-params-prod.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"s04_smoothed_search",
"s05_smoothed_search",
"s06_smoothed_search",
"s07_smoothed_search",
"scontrol_smoothed_search"
]
}
Expand Down
2 changes: 1 addition & 1 deletion changehc/version.cfg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
current_version = 0.3.59
current_version = 0.3.60
2 changes: 1 addition & 1 deletion claims_hosp/version.cfg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
current_version = 0.3.59
current_version = 0.3.60
2 changes: 1 addition & 1 deletion doctor_visits/version.cfg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
current_version = 0.3.59
current_version = 0.3.60
5 changes: 1 addition & 4 deletions google_symptoms/delphi_google_symptoms/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@
"s02": ["Nasal congestion", "Post nasal drip", "Rhinorrhea", "Sinusitis",
"Rhinitis", "Common cold"],
"s03": ["Fever", "Hyperthermia", "Chills", "Shivering", "Low grade fever"],
#"s04": ["Fatigue", "Weakness", "Muscle weakness", "Myalgia", "Pain"],
"s04": ["Shortness of breath", "Wheeze", "Croup", "Pneumonia", "Asthma",
"Crackles", "Acute bronchitis", "Bronchitis"],
"s05": ["Anosmia", "Dysgeusia", "Ageusia"],
#"s07": ["Nausea", "Vomiting", "Diarrhea", "Indigestion", "Abdominal pain"],
"s06": ["Laryngitis", "Sore throat", "Throat irritation"],
#"s09": ["Headache", "Migraine", "Cluster headache", "Dizziness", "Lightheadedness"],
#"s10": ["Night sweats","Perspiration", "hyperhidrosis"],
"s07": ["Conjunctivitis", "Red eye", "Epiphora", "Eye pain", "Rheum"],
"scontrol": ["Type 2 diabetes", "Urinary tract infection", "Hair loss",
"Candidiasis", "Weight gain"]
}
Expand Down
24 changes: 11 additions & 13 deletions google_symptoms/delphi_google_symptoms/date_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from delphi_utils.validator.utils import lag_converter
from pandas import to_datetime

from .constants import COMBINED_METRIC, FULL_BKFILL_START_DATE, PAD_DAYS, SMOOTHERS
from .constants import COMBINED_METRIC, PAD_DAYS, SMOOTHERS


def generate_patch_dates(params: Dict) -> Dict[date, Dict[str, Union[date, int]]]:
Expand Down Expand Up @@ -85,22 +85,20 @@ def generate_num_export_days(params: Dict, logger) -> [int]:

if sensor_names.difference(set(gs_metadata.signal)):
# If any signal not in metadata yet, we need to backfill its full history.
logger.warning("Signals missing in the epidata; backfilling full history")
num_export_days = (export_end_date - FULL_BKFILL_START_DATE).days + 1
else:
latest_date_diff = (datetime.today() - to_datetime(min(gs_metadata.max_time))).days + 1
logger.warning("Signals missing in the epidata; need to patch full history")
latest_date_diff = (datetime.today() - to_datetime(min(gs_metadata.max_time))).days + 1

expected_date_diff = params["validation"]["common"].get("span_length", 14)
expected_date_diff = params["validation"]["common"].get("span_length", 14)

# there's an expected lag of 4 days behind if running from today
if export_end_date.date() == datetime.today().date():
global_max_expected_lag = get_max_lag(params)
expected_date_diff += global_max_expected_lag
# there's an expected lag of 4 days behind if running from today
if export_end_date.date() == datetime.today().date():
global_max_expected_lag = get_max_lag(params)
expected_date_diff += global_max_expected_lag

if latest_date_diff > expected_date_diff:
logger.info("Lag is more than expected", expected_lag=expected_date_diff, lag=latest_date_diff)
if latest_date_diff > expected_date_diff:
logger.info("Lag is more than expected", expected_lag=expected_date_diff, lag=latest_date_diff)

num_export_days = expected_date_diff
num_export_days = expected_date_diff

return num_export_days

Expand Down
1 change: 1 addition & 0 deletions google_symptoms/params.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"s04_smoothed_search",
"s05_smoothed_search",
"s06_smoothed_search",
"s07_smoothed_search",
"scontrol_smoothed_search"
]
}
Expand Down
12 changes: 12 additions & 0 deletions google_symptoms/tests/test_data/covid_metadata.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1955,6 +1955,18 @@ google-symptoms,s06_smoothed_search,day,hrr,2020-02-20,2024-07-13,304,0.0,2.4442
google-symptoms,s06_smoothed_search,day,msa,2020-02-20,2024-07-13,379,0.0,2.942381,0.6269093,0.2474402,2024-07-17 13:15:36,20240717,4,732
google-symptoms,s06_smoothed_search,day,nation,2020-02-20,2024-07-13,1,0.4007222,1.5691818,0.8043518,0.2252896,2024-07-17 13:15:36,20240717,4,732
google-symptoms,s06_smoothed_search,day,state,2020-02-20,2024-07-13,51,0.1852381,2.0328571,0.7772562,0.2522011,2024-07-17 13:15:36,20240717,4,732
google-symptoms,s07_raw_search,day,county,2020-02-14,2024-07-13,869,0.0733333,3.8166667,0.7171405,0.2509621,2024-07-17 13:15:32,20240717,4,738
google-symptoms,s07_raw_search,day,hhs,2020-02-14,2024-07-13,10,0.3065122,1.9331217,0.7831431,0.2417782,2024-07-17 13:15:33,20240717,4,738
google-symptoms,s07_raw_search,day,hrr,2020-02-14,2024-07-13,304,8.36e-05,2.6907692,0.5563906,0.2612786,2024-07-17 13:15:34,20240717,4,738
google-symptoms,s07_raw_search,day,msa,2020-02-14,2024-07-13,379,0.0698392,3.6766667,0.6513573,0.2451345,2024-07-17 13:15:36,20240717,4,738
google-symptoms,s07_raw_search,day,nation,2020-02-14,2024-07-13,1,0.3923812,1.7562711,0.8039715,0.2280758,2024-07-17 13:15:36,20240717,4,738
google-symptoms,s07_raw_search,day,state,2020-02-14,2024-07-13,51,0.1533333,2.2033333,0.7768827,0.2577945,2024-07-17 13:15:36,20240717,4,738
google-symptoms,s07_smoothed_search,day,county,2020-02-20,2024-07-13,869,0.0,2.942381,0.6715739,0.2519801,2024-07-17 13:15:32,20240717,4,732
google-symptoms,s07_smoothed_search,day,hhs,2020-02-20,2024-07-13,10,0.3288689,1.804973,0.783512,0.2387222,2024-07-17 13:15:33,20240717,4,732
google-symptoms,s07_smoothed_search,day,hrr,2020-02-20,2024-07-13,304,0.0,2.4442007,0.5435988,0.263496,2024-07-17 13:15:34,20240717,4,732
google-symptoms,s07_smoothed_search,day,msa,2020-02-20,2024-07-13,379,0.0,2.942381,0.6269093,0.2474402,2024-07-17 13:15:36,20240717,4,732
google-symptoms,s07_smoothed_search,day,nation,2020-02-20,2024-07-13,1,0.4007222,1.5691818,0.8043518,0.2252896,2024-07-17 13:15:36,20240717,4,732
google-symptoms,s07_smoothed_search,day,state,2020-02-20,2024-07-13,51,0.1852381,2.0328571,0.7772562,0.2522011,2024-07-17 13:15:36,20240717,4,732
google-symptoms,scontrol_raw_search,day,county,2020-02-14,2024-07-13,1438,0.25,14.124,3.3171389,1.0021697,2024-07-17 13:15:32,20240717,4,738
google-symptoms,scontrol_raw_search,day,hhs,2020-02-14,2024-07-13,10,2.097142,10.5574026,3.561163,0.4858404,2024-07-17 13:15:33,20240717,4,738
google-symptoms,scontrol_raw_search,day,hrr,2020-02-14,2024-07-13,306,0.0535164,12.348618,3.1551263,0.8088133,2024-07-17 13:15:34,20240717,4,738
Expand Down
Loading