Skip to content

Commit cc5e1c6

Browse files
committed
Resolved conflicts
1 parent 0609700 commit cc5e1c6

12 files changed

+17
-20
lines changed

Diff for: src/acquisition/cdcp/cdc_dropbox_receiver.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,10 @@ def get_timestamp_string():
4444

4545
def trigger_further_processing():
4646
"""Add CDCP processing scripts to the Automation run queue."""
47-
4847
# connect
4948
u, p = secrets.db.auto
50-
cnx = mysql.connector.connect(user=u, password=p, database="automation")
49+
cnx = mysql.connector.connect(user=u, password=p, database="automation", host=secrets.db.host)
5150
cur = cnx.cursor()
52-
5351
# add step "Process CDCP Data" to queue
5452
cur.execute("CALL automation.RunStep(46)")
5553

Diff for: src/acquisition/cdcp/cdc_extract.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def extract(first_week=None, last_week=None, test_mode=False):
154154

155155
# connect
156156
u, p = secrets.db.epi
157-
cnx = mysql.connector.connect(user=u, password=p, database="epidata")
157+
cnx = mysql.connector.connect(user=u, password=p, database="epidata", host=secrets.db.host)
158158
cur = cnx.cursor()
159159

160160
# weeks to update

Diff for: src/acquisition/cdcp/cdc_upload.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
def upload(test_mode):
166166
# connect
167167
u, p = secrets.db.epi
168-
cnx = mysql.connector.connect(user=u, password=p, database="epidata")
168+
cnx = mysql.connector.connect(user=u, password=p, database="epidata", host=secrets.db.host)
169169
cur = cnx.cursor()
170170

171171
# insert (or update) table `cdc`

Diff for: src/acquisition/ecdc/ecdc_db_update.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
def ensure_tables_exist():
5050
(u, p) = secrets.db.epi
51-
cnx = mysql.connector.connect(user=u, password=p, database="epidata")
51+
cnx = mysql.connector.connect(user=u, password=p, database="epidata", host=secrets.db.host)
5252
try:
5353
cursor = cnx.cursor()
5454
cursor.execute(
@@ -98,7 +98,7 @@ def update_from_file(issue, date, dir, test_mode=False):
9898
# Read ECDC data from CSVs and insert into (or update) the database.
9999
# database connection
100100
u, p = secrets.db.epi
101-
cnx = mysql.connector.connect(user=u, password=p, database="epidata")
101+
cnx = mysql.connector.connect(user=u, password=p, database="epidata", host=secrets.db.host)
102102
rows1 = get_rows(cnx, "ecdc_ili")
103103
print(f"rows before: {int(rows1)}")
104104
insert = cnx.cursor()

Diff for: src/acquisition/ght/ght_update.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,10 @@
247247
"WY",
248248
]
249249

250-
251250
def update(locations, terms, first=None, last=None, countries=["US"]):
252251
# connect to the database
253252
u, p = secrets.db.epi
254-
cnx = mysql.connector.connect(user=u, password=p, database="epidata")
253+
cnx = mysql.connector.connect(user=u, password=p, database="epidata", host=secrets.db.host)
255254
cur = cnx.cursor()
256255

257256
def get_num_rows():

Diff for: src/acquisition/kcdc/kcdc_update.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
def ensure_tables_exist():
4747
(u, p) = secrets.db.epi
48-
cnx = mysql.connector.connect(user=u, password=p, database="epidata")
48+
cnx = mysql.connector.connect(user=u, password=p, database="epidata", host=secrets.db.host)
4949
try:
5050
cursor = cnx.cursor()
5151
cursor.execute(

Diff for: src/acquisition/nidss/taiwan_update.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def update(test_mode=False):
105105

106106
# Database connection
107107
u, p = secrets.db.epi
108-
cnx = mysql.connector.connect(user=u, password=p, database="epidata")
108+
cnx = mysql.connector.connect(user=u, password=p, database="epidata", host=secrets.db.host)
109109
rows1 = get_rows(cnx)
110110
print(f"rows before (flu): {int(rows1[0])}")
111111
print(f"rows before (dengue): {int(rows1[1])}")

Diff for: src/acquisition/paho/paho_db_update.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666

6767
def ensure_tables_exist():
6868
(u, p) = secrets.db.epi
69-
cnx = mysql.connector.connect(user=u, password=p, database="epidata")
69+
cnx = mysql.connector.connect(user=u, password=p, database="epidata", host=secrets.db.host)
7070
try:
7171
cursor = cnx.cursor()
7272
cursor.execute(
@@ -168,8 +168,8 @@ def update_from_file(issue, date, filename, test_mode=False):
168168
# Current code ignores PAHO-given issue, is based on argument 'issue'
169169

170170
# database connection
171-
u, p = secrets.db.epi
172-
cnx = mysql.connector.connect(user=u, password=p, database="epidata")
171+
172+
cnx = mysql.connector.connect(user=u, password=p, database="epidata", host=secrets.db.host)
173173
rows1 = get_rows(cnx, "paho_dengue")
174174
print(f"rows before: {int(rows1)}")
175175
insert = cnx.cursor()
@@ -226,7 +226,7 @@ def update_from_file(issue, date, filename, test_mode=False):
226226
rows2 = rows1
227227
else:
228228
cnx.commit()
229-
rows2 = get_rows(cnx)
229+
rows2 = get_rows(cnx, "paho_dengue")
230230
print(f"rows after: {int(rows2)} (added {int(rows2 - rows1)})")
231231
cnx.close()
232232

Diff for: src/acquisition/quidel/quidel_update.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ def update(locations, first=None, last=None, force_update=False, load_email=True
5858
if not qd.need_update and not force_update:
5959
print("Data not updated, nothing needs change.")
6060
return
61-
61+
6262
qd_data = qd.load_csv()
6363
qd_measurements = qd.prepare_measurements(qd_data, start_weekday=4)
6464
qd_ts = quidel.measurement_to_ts(qd_measurements, 7, startweek=first, endweek=last)
6565
# connect to the database
6666
u, p = secrets.db.epi
67-
cnx = mysql.connector.connect(user=u, password=p, database="epidata")
67+
cnx = mysql.connector.connect(user=u, password=p, database="epidata", host=secrets.db.host)
6868
cur = cnx.cursor()
6969

7070
def get_num_rows():

Diff for: src/acquisition/twtr/twitter_update.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
def run():
6363
# connect to the database
6464
u, p = secrets.db.epi
65-
cnx = mysql.connector.connect(user=u, password=p, database="epidata")
65+
cnx = mysql.connector.connect(user=u, password=p, database="epidata", host=secrets.db.host)
6666
cur = cnx.cursor()
6767

6868
def get_num_rows():

Diff for: src/acquisition/wiki/wiki_extract.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def get_timestamp(name):
6767
def run(job_limit=100):
6868
# connect to the database
6969
u, p = secrets.db.epi
70-
cnx = mysql.connector.connect(user=u, password=p, database="epidata")
70+
cnx = mysql.connector.connect(user=u, password=p, database="epidata", host=secrets.db.host)
7171
cur = cnx.cursor()
7272

7373
# # Some preparation for utf-8, and it is a temporary trick solution. The real solution should change those char set and collation encoding to utf8 permanently

Diff for: src/acquisition/wiki/wiki_update.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def get_manifest(year, month, optional=False):
9090
def run():
9191
# connect to the database
9292
u, p = secrets.db.epi
93-
cnx = mysql.connector.connect(user=u, password=p, database="epidata")
93+
cnx = mysql.connector.connect(user=u, password=p, database="epidata", host=secrets.db.host)
9494
cur = cnx.cursor()
9595

9696
# get the most recent job in wiki_raw

0 commit comments

Comments
 (0)