-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: refactored into package, moved config.py, removed unused co…
…mponents
- Loading branch information
1 parent
f36a31a
commit e0b808e
Showing
27 changed files
with
249 additions
and
288 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,26 @@ | ||
from .dash_app import app | ||
from .flask_server import server | ||
from .cache import server_cache | ||
############################################################################### | ||
# 2020-04-15: Han: | ||
# | ||
# To run the app using Flask directly, please set environment variable with | ||
# $Env:FLASK_APP='ncov19_dash:server' for windows, or | ||
# export FLASK_APP=ncov19_dash:server for Linux. | ||
# | ||
# And `flask run` to run the app. Alternatively, do `python run.py` at the | ||
# project root directory for dev mode. | ||
# | ||
# Set default config to ProductionConfig unless STAGING environment | ||
# is set to true on Linux `export STAGING=True` or Windows Powershell | ||
# `$Env:STAGING="True"`. Using os.environ directly will throw errors | ||
# if not set. | ||
# | ||
# Changing the order of the imports might cause circular import problem. | ||
# Flask server is created before dash app to allow proper flask routing. | ||
############################################################################### | ||
from ncov19_dash.config import PACKAGE_ROOT, config | ||
from ncov19_dash.cache import server_cache | ||
from ncov19_dash.flask_server import server | ||
from ncov19_dash.dash_app import app | ||
|
||
# from ncov19_dash.app import create_app | ||
|
||
# app = create_app() | ||
with open(PACKAGE_ROOT / "VERSION") as version_file: | ||
__version__ = version_file.read().strip() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
# from .confirmed_cases_chart import confirmed_cases_chart | ||
from .daily_stats import daily_stats | ||
from .new_infection_trajectory_chart import new_infection_trajectory_chart | ||
from .infection_trajectory_chart import infection_trajectory_chart | ||
from .news_feed import news_feed | ||
from .scatter_mapbox import confirmed_scatter_mapbox, drive_thru_scatter_mapbox | ||
from .scatter_mapbox import confirmed_scatter_mapbox | ||
from .scatter_mapbox import drive_thru_scatter_mapbox | ||
from .twitter_feed import twitter_feed | ||
from .daily_stats_mobile import daily_stats_mobile | ||
from .column_stats import last_updated | ||
from .column_stats_mobile import mobile_last_updated | ||
from .last_updated import last_updated | ||
from .deaths_chart import deaths_chart | ||
from .cases_chart import cases_chart | ||
from .stats_table import stats_table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
ncov19_dash/components/column_stats.py → ncov19_dash/components/last_updated.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import requests | ||
import pandas as pd | ||
|
||
from ncov19_dash.utils import config | ||
from ncov19_dash import config | ||
|
||
|
||
try: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.