Skip to content

Commit dd4e3b4

Browse files
authored
Merge pull request #1948 from cmu-delphi/release/indicators_v0.3.53_utils_v0.3.23
Release covidcast-indicators 0.3.53
2 parents 82a7224 + 495756d commit dd4e3b4

File tree

16 files changed

+45
-16
lines changed

16 files changed

+45
-16
lines changed

.bumpversion.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.3.52
2+
current_version = 0.3.53
33
commit = True
44
message = chore: bump covidcast-indicators to {new_version}
55
tag = False

_delphi_utils_python/.bumpversion.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.3.22
2+
current_version = 0.3.23
33
commit = True
44
message = chore: bump delphi_utils to {new_version}
55
tag = False

_delphi_utils_python/delphi_utils/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
from .nancodes import Nans
1616
from .weekday import Weekday
1717

18-
__version__ = "0.3.22"
18+
__version__ = "0.3.23"

_delphi_utils_python/setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"freezegun",
1313
"gitpython",
1414
"mock",
15-
"moto",
15+
"moto~=4.2.14",
1616
"numpy",
1717
"pandas>=1.1.0",
1818
"pydocstyle",
@@ -27,7 +27,7 @@
2727

2828
setup(
2929
name="delphi_utils",
30-
version="0.3.22",
30+
version="0.3.23",
3131
description="Shared Utility Functions for Indicators",
3232
long_description=long_description,
3333
long_description_content_type="text/markdown",

changehc/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"delphi-utils",
1313
"covidcast",
1414
"boto3",
15-
"moto",
15+
"moto~=4.2.14",
1616
"paramiko"
1717
]
1818

changehc/version.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
current_version = 0.3.52
1+
current_version = 0.3.53

claims_hosp/delphi_claims_hosp/backfill.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ def store_backfill_file(claims_filepath, _end_date, backfill_dir):
4444
backfilldata = gmpr.add_geocode(backfilldata, from_code="fips", new_code="state_id",
4545
from_col="fips", new_col="state_id")
4646
#Store one year's backfill data
47-
_start_date = _end_date.replace(year=_end_date.year-1)
47+
if _end_date.day == 29 and _end_date.month == 2:
48+
_start_date = datetime(_end_date.year-1, 2, 28)
49+
else:
50+
_start_date = _end_date.replace(year=_end_date.year-1)
4851
selected_columns = ['time_value', 'fips', 'state_id',
4952
'den', 'num']
5053
backfilldata = backfilldata.loc[(backfilldata["time_value"] >= _start_date)

claims_hosp/version.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
current_version = 0.3.52
1+
current_version = 0.3.53

doctor_visits/version.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
current_version = 0.3.52
1+
current_version = 0.3.53

google_symptoms/version.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
current_version = 0.3.52
1+
current_version = 0.3.53

hhs_hosp/version.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
current_version = 0.3.52
1+
current_version = 0.3.53

nchs_mortality/tests/test_run.py

+23
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,26 @@ def test_output_file_format(self, run_as_module, date):
6969
"missing_val", "missing_se", "missing_sample_size"
7070
]
7171
assert (df.columns.values == expected_columns).all()
72+
73+
# the 14th was a Monday
74+
@pytest.mark.parametrize("date", ["2020-09-14", "2020-09-17", "2020-09-18"])
75+
def test_national_prop(self, run_as_module, date):
76+
is_mon_or_thurs = dt.datetime.strptime(date, "%Y-%m-%d").weekday() == (0 or 3)
77+
78+
folders = ["daily_cache"]
79+
if is_mon_or_thurs:
80+
folders.append("receiving")
81+
82+
for output_folder in folders:
83+
num = pd.read_csv(
84+
join(output_folder, f"weekly_202026_nation_deaths_covid_incidence_num.csv")
85+
)
86+
prop = pd.read_csv(
87+
join(output_folder, f"weekly_202026_nation_deaths_covid_incidence_prop.csv")
88+
)
89+
# hardcoded value from the geomapper CSV
90+
US_POPULATION = 334103109
91+
INCIDENCE_BASE = 100000
92+
numeric_value = num.iloc[0]["val"] / US_POPULATION * INCIDENCE_BASE
93+
assert(numeric_value > 0)
94+
assert(prop.iloc[0]["val"] == round(numeric_value, 7))

nchs_mortality/version.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
current_version = 0.3.52
1+
current_version = 0.3.53

quidel_covidtest/delphi_quidel_covidtest/backfill.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ def store_backfill_file(df, _end_date, backfill_dir):
4545
"totalTest_age_0_17": "den_age_0_17"},
4646
axis=1, inplace=True)
4747
#Store one year's backfill data
48-
_start_date = _end_date.replace(year=_end_date.year-1)
48+
if _end_date.day == 29 and _end_date.month == 2:
49+
_start_date = datetime(_end_date.year-1, 2, 28)
50+
else:
51+
_start_date = _end_date.replace(year=_end_date.year-1)
4952
selected_columns = ['time_value', 'fips', 'state_id',
5053
'den_total', 'num_total',
5154
'num_age_0_4', 'den_age_0_4',

quidel_covidtest/version.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
current_version = 0.3.52
1+
current_version = 0.3.53

sir_complainsalot/version.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
current_version = 0.3.52
1+
current_version = 0.3.53

0 commit comments

Comments
 (0)