Skip to content

Commit adefef9

Browse files
authored
Merge pull request #1309 from cmu-delphi/release/delphi-epidata-4.1.11
Release Delphi Epidata 4.1.11
2 parents 814cef3 + 46ab6d8 commit adefef9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+968
-914
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 4.1.10
2+
current_version = 4.1.11
33
commit = False
44
tag = False
55

dev/local/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = Delphi Development
3-
version = 4.1.10
3+
version = 4.1.11
44

55
[options]
66
packages =

docs/new_endpoint_tutorial.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,9 @@ Here's what we add to each client:
123123
def fluview_meta():
124124
"""Fetch FluView metadata."""
125125
# Set up request
126-
params = {
127-
'endpoint': 'fluview_meta',
128-
}
126+
params = {}
129127
# Make the API call
130-
return Epidata._request(params)
128+
return Epidata._request("fluview_meta", params)
131129
```
132130
133131
- [`delphi_epidata.R`](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R)

docs/symptom-survey/publications.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ Pandemic"](https://www.pnas.org/topic/548) in *PNAS*:
2626

2727
Research publications using the survey data include:
2828

29+
- Ma, M.Z., Chen, S.X. (2023). [Beyond the surface: accounting for confounders
30+
in understanding the link between collectivism and COVID-19 pandemic in the
31+
United States](https://doi.org/10.1186/s12889-023-16384-2). *BMC Public
32+
Health* 23, 1513.
2933
- C.K. Ettman, E. Badillo Goicoechea, and E.A. Stuart (2023). [Evolution of
3034
depression and anxiety over the COVID-19 pandemic and across demographic
3135
groups in a large sample of U.S. adults](https://doi.org/10.1016/j.focus.2023.100140).
@@ -62,7 +66,7 @@ Research publications using the survey data include:
6266
- Rönn MM, Menzies NA, Salomon JA (2023). [Vaccination and voting patterns in
6367
the United States: analysis of COVID-19 and flu surveys from 2010 to
6468
2022](https://doi.org/10.1016/j.amepre.2023.03.001). *American Journal of
65-
Preventive Medicine.*
69+
Preventive Medicine* 65 (3), 458-466.
6670
- Taube JC, Susswein Z, Bansal S (2023). [Spatiotemporal Trends in Self-Reported
6771
Mask-Wearing Behavior in the United States: Analysis of a Large
6872
Cross-sectional Survey](https://doi.org/10.2196/42128). *JMIR Public Health

integrations/acquisition/covid_hosp/facility/test_scenarios.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def setUp(self):
2828
self.test_utils = UnitTestUtils(__file__)
2929

3030
# use the local instance of the Epidata API
31-
Epidata.BASE_URL = 'http://delphi_web_epidata/epidata/api.php'
31+
Epidata.BASE_URL = 'http://delphi_web_epidata/epidata'
3232
Epidata.auth = ('epidata', 'key')
3333

3434
# use the local instance of the epidata database

integrations/acquisition/covid_hosp/state_daily/test_scenarios.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def setUp(self):
3232
self.test_utils = UnitTestUtils(__file__)
3333

3434
# use the local instance of the Epidata API
35-
Epidata.BASE_URL = 'http://delphi_web_epidata/epidata/api.php'
35+
Epidata.BASE_URL = 'http://delphi_web_epidata/epidata'
3636
Epidata.auth = ('epidata', 'key')
3737

3838
# use the local instance of the epidata database

integrations/acquisition/covid_hosp/state_timeseries/test_scenarios.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def setUp(self):
2828
self.test_utils = UnitTestUtils(__file__)
2929

3030
# use the local instance of the Epidata API
31-
Epidata.BASE_URL = 'http://delphi_web_epidata/epidata/api.php'
31+
Epidata.BASE_URL = 'http://delphi_web_epidata/epidata'
3232
Epidata.auth = ('epidata', 'key')
3333

3434
# use the local instance of the epidata database

integrations/acquisition/covidcast/test_covidcast_meta_caching.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
)
2323

2424
# use the local instance of the Epidata API
25-
BASE_URL = 'http://delphi_web_epidata/epidata/api.php'
25+
BASE_URL = 'http://delphi_web_epidata/epidata'
2626

2727

2828
class CovidcastMetaCacheTests(unittest.TestCase):
@@ -82,8 +82,8 @@ def tearDown(self):
8282

8383
@staticmethod
8484
def _make_request():
85-
params = {'endpoint': 'covidcast_meta', 'cached': 'true'}
86-
response = requests.get(Epidata.BASE_URL, params=params, auth=Epidata.auth)
85+
params = {'cached': 'true'}
86+
response = requests.get(f"{Epidata.BASE_URL}/covidcast_meta", params=params, auth=Epidata.auth)
8787
response.raise_for_status()
8888
return response.json()
8989

integrations/acquisition/covidcast/test_csv_uploading.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def setUp(self):
6969
epidata_cnx.close()
7070

7171
# use the local instance of the Epidata API
72-
Epidata.BASE_URL = 'http://delphi_web_epidata/epidata/api.php'
72+
Epidata.BASE_URL = 'http://delphi_web_epidata/epidata'
7373
Epidata.auth = ('epidata', 'key')
7474

7575
def tearDown(self):
@@ -132,7 +132,7 @@ def test_uploading(self):
132132
main(args)
133133
response = Epidata.covidcast('src-name', signal_name, 'day', 'state', 20200419, '*')
134134

135-
expected_values = pd.concat([values, pd.DataFrame({ "time_value": [20200419] * 3, "signal": [signal_name] * 3, "direction": [None] * 3})], axis=1).rename(columns=uploader_column_rename).to_dict(orient="records")
135+
expected_values = pd.concat([values, pd.DataFrame({ "geo_type": "state", "source": "src-name", "time_type": "day", "time_value": [20200419] * 3, "signal": [signal_name] * 3, "direction": [None] * 3})], axis=1).rename(columns=uploader_column_rename).to_dict(orient="records")
136136
expected_response = {'result': 1, 'epidata': self.apply_lag(expected_values), 'message': 'success'}
137137

138138
self.assertEqual(response, expected_response)
@@ -161,6 +161,9 @@ def test_uploading(self):
161161
response = Epidata.covidcast('src-name', signal_name, 'day', 'state', 20200419, '*')
162162

163163
expected_values = pd.concat([values, pd.DataFrame({
164+
"geo_type": "state",
165+
"source": "src-name",
166+
"time_type": "day",
164167
"time_value": [20200419] * 3,
165168
"signal": [signal_name] * 3,
166169
"direction": [None] * 3,
@@ -194,7 +197,7 @@ def test_uploading(self):
194197
main(args)
195198
response = Epidata.covidcast('src-name', signal_name, 'day', 'state', 20200419, '*')
196199

197-
expected_response = {'result': -2, 'message': 'no results'}
200+
expected_response = {'epidata': [], 'result': -2, 'message': 'no results'}
198201

199202
self.assertEqual(response, expected_response)
200203
self.verify_timestamps_and_defaults()
@@ -220,6 +223,9 @@ def test_uploading(self):
220223
response = Epidata.covidcast('src-name', signal_name, 'day', 'state', 20200419, '*')
221224

222225
expected_values_df = pd.concat([values, pd.DataFrame({
226+
"geo_type": "state",
227+
"source": "src-name",
228+
"time_type": "day",
223229
"time_value": [20200419],
224230
"signal": [signal_name],
225231
"direction": [None]})], axis=1).rename(columns=uploader_column_rename)
@@ -253,6 +259,9 @@ def test_uploading(self):
253259
response = Epidata.covidcast('src-name', signal_name, 'day', 'state', 20200419, '*')
254260

255261
expected_values = pd.concat([values, pd.DataFrame({
262+
"geo_type": "state",
263+
"source": "src-name",
264+
"time_type": "day",
256265
"time_value": [20200419],
257266
"signal": [signal_name],
258267
"direction": [None]
@@ -283,7 +292,7 @@ def test_uploading(self):
283292
main(args)
284293
response = Epidata.covidcast('src-name', signal_name, 'day', 'state', 20200419, '*')
285294

286-
expected_response = {'result': -2, 'message': 'no results'}
295+
expected_response = {'epidata': [], 'result': -2, 'message': 'no results'}
287296

288297
self.assertEqual(response, expected_response)
289298
self.verify_timestamps_and_defaults()

integrations/acquisition/covidcast_nowcast/test_csv_uploading.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def setUp(self):
5555
secrets.db.epi = ('user', 'pass')
5656

5757
# use the local instance of the Epidata API
58-
Epidata.BASE_URL = 'http://delphi_web_epidata/epidata/api.php'
58+
Epidata.BASE_URL = 'http://delphi_web_epidata/epidata'
5959
Epidata.auth = ('epidata', 'key')
6060

6161
def tearDown(self):

0 commit comments

Comments
 (0)