Skip to content
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

fix: remove mobile update link; robots.txt #185

Merged
merged 23 commits into from
Apr 14, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a4bea8a
[CodeFactor] Apply fixes
code-factor Apr 9, 2020
9c77d5e
han: coverage
leehanchung Apr 9, 2020
703eb25
Merge branch 'staging'
leehanchung Apr 9, 2020
70351fb
Merge branch 'master' into refactoring
leehanchung Apr 9, 2020
b722663
Merge branch 'master' of https://github.com/ncov19-us/front-end
leehanchung Apr 9, 2020
78cd91a
Merge branch 'master' into refactoring
leehanchung Apr 9, 2020
c42c0a8
han: codebase cleanup
leehanchung Apr 9, 2020
7d2dd5c
han: added error handling for empty exceptions
leehanchung Apr 9, 2020
4fd3d96
han: removed unused files
leehanchung Apr 9, 2020
d593ab1
han: removed unused lines
leehanchung Apr 9, 2020
5efce75
han: merged staging into current branch
leehanchung Apr 10, 2020
21243ad
han: fixing stats_table.py pandas deprecation warning, fixing utils._…
leehanchung Apr 10, 2020
631c2d0
han: fixing stats_table.py pandas deprecation warning, fixing utils._…
leehanchung Apr 10, 2020
0c8d4d4
Merge pull request #180 from ncov19-us/refactoring
hurshd0 Apr 10, 2020
4fcc37f
style: make all font sizes variables
elizabethts Apr 12, 2020
d8b19a3
style: change max height of sidebars to 700px
elizabethts Apr 12, 2020
14f9468
Merge pull request #181 from ncov19-us/font-fixes
hurshd0 Apr 13, 2020
f99889f
chore: added sms update button
hurshd0 Apr 13, 2020
cb313fd
Merge pull request #182 from ncov19-us/adding-sms-button
hurshd0 Apr 13, 2020
5f6ab94
chore: updating pipefile.lock
hurshd0 Apr 13, 2020
0d8ac0f
Merge pull request #183 from ncov19-us/pipfile-issue
leehanchung Apr 13, 2020
9311099
chore: removed-sms-btn
hurshd0 Apr 13, 2020
5ac8fb2
Merge pull request #184 from ncov19-us/remove-sms-btn
leehanchung Apr 13, 2020
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
Prev Previous commit
Next Next commit
han: added error handling for empty exceptions
  • Loading branch information
leehanchung committed Apr 9, 2020
commit 7d2dd5c1d46c202fdd3f30f8e924b7e9a51a1d22
4 changes: 2 additions & 2 deletions components/daily_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_daily_stats(state="United States") -> Dict:
else:
payload = json.dumps({"state": state})
response = requests.post(url=URL, data=payload)
except ex:
except Exception as ex:
print(f"[ERROR] get_daily_stats error accessing ncov19.us API, {ex}")

# return all zeros if response statsus code is not 200
Expand All @@ -50,7 +50,7 @@ def get_daily_stats(state="United States") -> Dict:
todays_confirmed = data["todays_confirmed"]
deaths = data["deaths"]
todays_deaths = data["todays_deaths"]
except ex:
except Exception as ex:
print(f"[ERROR] get_daily_stats error parsing ncov19.us API, {ex}")
tested, confirmed, todays_confirmed, deaths, todays_deaths = 0, 0, 0, 0, 0

Expand Down
4 changes: 2 additions & 2 deletions components/daily_stats_mobile.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_daily_stats_mobile(state="United States") -> Dict:
else:
payload = json.dumps({"state": state})
response = requests.post(url=url, data=payload)
except ex:
except Exception as ex:
print(f"[ERROR] get_daily_stats_mobile error accessing ncov19.us API, {ex}")

# return all zeros if response statsus code is not 200
Expand All @@ -51,7 +51,7 @@ def get_daily_stats_mobile(state="United States") -> Dict:
todays_confirmed = data["todays_confirmed"]
deaths = data["deaths"]
todays_deaths = data["todays_deaths"]
except ex:
except Exception as ex:
print(f"[ERROR] get_daily_stats_mobile error parsing ncov19.us API, {ex}")
tested, confirmed, todays_confirmed, deaths, todays_deaths = 0, 0, 0, 0, 0

Expand Down
2 changes: 1 addition & 1 deletion components/scatter_mapbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def get_drive_thru_testing_centers():
drive_thru_df = pd.read_csv(config.DRIVE_THRU_URL)
drive_thru_df["Street Address"] = drive_thru_df["Street Address"].fillna("")
except Exception as ex:
print(ex)
print(f'[ERROR] get_drive_thru_testing_center error, {ex}')
return drive_thru_df


Expand Down
2 changes: 1 addition & 1 deletion components/stats_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def stats_table(state="US"):
URL = config.NCOV19_API + config.COUNTY
try:
response = requests.get(URL)
except ex:
except Exception as ex:
print(f"[ERROR] stats_table error accessing ncov19.us API, {ex}")
data = {"state_name": "john", "county_name": "cena", "confirmed": 0, "death": 0}

Expand Down