diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 51fdfb025..e10c0c411 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 4.1.37 +current_version = 4.1.38 commit = False tag = False diff --git a/dev/local/setup.cfg b/dev/local/setup.cfg index ffe488456..d4025d35b 100644 --- a/dev/local/setup.cfg +++ b/dev/local/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = Delphi Development -version = 4.1.37 +version = 4.1.38 [options] packages = diff --git a/docs/symptom-survey/publications.md b/docs/symptom-survey/publications.md index 2da66182f..bf0c576c7 100644 --- a/docs/symptom-survey/publications.md +++ b/docs/symptom-survey/publications.md @@ -26,6 +26,10 @@ Pandemic"](https://www.pnas.org/topic/548) in *PNAS*: Research publications using the survey data include: +- S. Pampati, E.A. Stuart, J. Lessler et al (2024). [Impact of School-Based + Infection Prevention Strategies on Household COVID-19 and Respiratory + Disease Outcomes: a Cross-Sectional Study](https://doi.org/10.1016/j.annepidem.2025.10.019). + *Annals of Epidemiology*. - K.B. Smith, S. Shen, and B.T. Denton (2025). [Can past variants of SARS-CoV-2 predict the impact of future variants? Machine learning for early warning of US counties at risk](https://doi.org/10.1007/s10729-025-09728-4). diff --git a/src/acquisition/fluview/impute_missing_values.py b/src/acquisition/fluview/impute_missing_values.py index c795d9cce..3fc4b06e8 100644 --- a/src/acquisition/fluview/impute_missing_values.py +++ b/src/acquisition/fluview/impute_missing_values.py @@ -293,7 +293,11 @@ def impute_missing_values(database, test_mode=False): known_values["pr"] = (0, 0, 0) # get the imputation matrix and lists of known and unknown locations - F, known, unknown = get_fusion_parameters(known_values.keys()) + try: + F, known, unknown = get_fusion_parameters(known_values.keys()) + except StatespaceException as e: + print(e) + continue # finally, impute the missing values z = np.array([known_values[k] for k in known]) diff --git a/src/client/delphi_epidata.R b/src/client/delphi_epidata.R index d72ae8359..9a180a576 100644 --- a/src/client/delphi_epidata.R +++ b/src/client/delphi_epidata.R @@ -15,7 +15,7 @@ Epidata <- (function() { # API base url BASE_URL <- getOption('epidata.url', default = 'https://api.delphi.cmu.edu/epidata/') - client_version <- '4.1.37' + client_version <- '4.1.38' auth <- getOption("epidata.auth", default = NA) diff --git a/src/client/delphi_epidata.js b/src/client/delphi_epidata.js index 186a74f32..f9d5928b7 100644 --- a/src/client/delphi_epidata.js +++ b/src/client/delphi_epidata.js @@ -22,7 +22,7 @@ } })(this, function (exports, fetchImpl, jQuery) { const BASE_URL = "https://api.delphi.cmu.edu/epidata/"; - const client_version = "4.1.37"; + const client_version = "4.1.38"; // Helper function to cast values and/or ranges to strings function _listitem(value) { diff --git a/src/client/packaging/npm/package.json b/src/client/packaging/npm/package.json index 4d4a4b43f..e6708b4da 100644 --- a/src/client/packaging/npm/package.json +++ b/src/client/packaging/npm/package.json @@ -2,7 +2,7 @@ "name": "delphi_epidata", "description": "Delphi Epidata API Client", "authors": "Delphi Group", - "version": "4.1.37", + "version": "4.1.38", "license": "MIT", "homepage": "https://github.com/cmu-delphi/delphi-epidata", "bugs": { diff --git a/src/ddl/migrations/flusurv_age_sex_race_strata.sql b/src/ddl/migrations/flusurv_age_sex_race_strata.sql index 88ff37c24..b212a0902 100644 --- a/src/ddl/migrations/flusurv_age_sex_race_strata.sql +++ b/src/ddl/migrations/flusurv_age_sex_race_strata.sql @@ -1,23 +1,23 @@ -- Add new age, race, and sex strata, and season descriptor (YYYY-YY format) ALTER TABLE `flusurv` ADD ( - `rate_age_18t29` double DEFAULT NULL, - `rate_age_30t39` double DEFAULT NULL, - `rate_age_40t49` double DEFAULT NULL, - `rate_age_5t11` double DEFAULT NULL, - `rate_age_12t17` double DEFAULT NULL, - `rate_age_lt18` double DEFAULT NULL, - `rate_age_gte18` double DEFAULT NULL, - `rate_race_white` double DEFAULT NULL, - `rate_race_black` double DEFAULT NULL, - `rate_race_hisp` double DEFAULT NULL, - `rate_race_asian` double DEFAULT NULL, - `rate_race_natamer` double DEFAULT NULL, - `rate_sex_male` double DEFAULT NULL, - `rate_sex_female` double DEFAULT NULL, - `rate_age_0tlt1` double DEFAULT NULL, - `rate_age_1t4` double DEFAULT NULL, - `rate_age_gte75` double DEFAULT NULL, - `rate_flu_a` double DEFAULT NULL, - `rate_flu_b` double DEFAULT NULL, - `season` char(7) DEFAULT NULL, + `season` char(7) DEFAULT NULL, + `rate_age_18t29` double DEFAULT NULL, + `rate_age_30t39` double DEFAULT NULL, + `rate_age_40t49` double DEFAULT NULL, + `rate_age_5t11` double DEFAULT NULL, + `rate_age_12t17` double DEFAULT NULL, + `rate_age_lt18` double DEFAULT NULL, + `rate_age_gte18` double DEFAULT NULL, + `rate_age_1t4` double DEFAULT NULL, + `rate_age_gte75` double DEFAULT NULL, + `rate_age_0tlt1` double DEFAULT NULL, + `rate_race_white` double DEFAULT NULL, + `rate_race_black` double DEFAULT NULL, + `rate_race_hisp` double DEFAULT NULL, + `rate_race_asian` double DEFAULT NULL, + `rate_race_natamer` double DEFAULT NULL, + `rate_sex_male` double DEFAULT NULL, + `rate_sex_female` double DEFAULT NULL, + `rate_flu_a` double DEFAULT NULL, + `rate_flu_b` double DEFAULT NULL ); diff --git a/src/ddl/migrations/flusurv_new_signals.sql b/src/ddl/migrations/flusurv_new_signals.sql deleted file mode 100644 index f9cd80d1d..000000000 --- a/src/ddl/migrations/flusurv_new_signals.sql +++ /dev/null @@ -1,23 +0,0 @@ -ALTER TABLE flusurv ADD ( - `season` char(7) DEFAULT NULL, - - `rate_age_18t29` double DEFAULT NULL, - `rate_age_30t39` double DEFAULT NULL, - `rate_age_40t49` double DEFAULT NULL, - `rate_age_5t11` double DEFAULT NULL, - `rate_age_12t17` double DEFAULT NULL, - `rate_age_lt18` double DEFAULT NULL, - `rate_age_gte18` double DEFAULT NULL, - `rate_age_1t4` double DEFAULT NULL, - `rate_age_gte75` double DEFAULT NULL, - `rate_age_0tlt1` double DEFAULT NULL, - `rate_race_white` double DEFAULT NULL, - `rate_race_black` double DEFAULT NULL, - `rate_race_hisp` double DEFAULT NULL, - `rate_race_asian` double DEFAULT NULL, - `rate_race_natamer` double DEFAULT NULL, - `rate_sex_male` double DEFAULT NULL, - `rate_sex_female` double DEFAULT NULL, - `rate_flu_a` double DEFAULT NULL, - `rate_flu_b` double DEFAULT NULL -); diff --git a/src/server/_config.py b/src/server/_config.py index bac0e853b..776de4a0f 100644 --- a/src/server/_config.py +++ b/src/server/_config.py @@ -7,7 +7,7 @@ load_dotenv() -VERSION = "4.1.37" +VERSION = "4.1.38" MAX_RESULTS = int(10e6) MAX_COMPATIBILITY_RESULTS = int(3650) diff --git a/tests/acquisition/fluview/test_impute_missing_values.py b/tests/acquisition/fluview/test_impute_missing_values.py index 96338d467..328d262a1 100644 --- a/tests/acquisition/fluview/test_impute_missing_values.py +++ b/tests/acquisition/fluview/test_impute_missing_values.py @@ -2,8 +2,10 @@ # standard library import argparse +import sys import unittest from unittest.mock import MagicMock +from io import StringIO # first party from delphi.utils.geo.locations import Locations @@ -11,7 +13,6 @@ get_argument_parser, get_lag_and_ili, impute_missing_values, - StatespaceException, ) # py3tester coverage target @@ -87,8 +88,12 @@ def test_impute_missing_values_vipr(self): db.get_known_values.return_value = known_data db.find_missing_rows.return_value = [(201340, 201340)] - with self.assertRaises(Exception): - impute_missing_values(db, test_mode=True) + + capturedOutput = StringIO() + sys.stdout = capturedOutput + impute_missing_values(db, test_mode=True) + sys.stdout = sys.__stdout__ + self.assertTrue("system is underdetermined" in capturedOutput.getvalue().split("\n")) db.find_missing_rows.return_value = [(201339, 201339)] impute_missing_values(db, test_mode=True) @@ -131,5 +136,8 @@ def test_impute_missing_values_underdetermined(self): db.find_missing_rows.return_value = [(201740, 201740)] db.get_known_values.return_value = known_data - with self.assertRaises(StatespaceException): - impute_missing_values(db, test_mode=True) + capturedOutput = StringIO() + sys.stdout = capturedOutput + impute_missing_values(db, test_mode=True) + sys.stdout = sys.__stdout__ + self.assertTrue("system is underdetermined" in capturedOutput.getvalue().split("\n"))