|
3 | 3 | import dash
|
4 | 4 | import dash_bootstrap_components as dbc
|
5 | 5 | import pandas as pd
|
6 |
| -from callbacks import (download_full, download_full_prices, download_small, download_small_prices, get_update_balances, get_update_prices, |
7 |
| - update_forecast_chart, update_price_chart, update_summary) |
8 | 6 | from dash import dcc, html
|
9 | 7 | from dash.dependencies import Input, Output, State
|
10 |
| -from data import get_gecko_spot, lookup_balance |
| 8 | + |
| 9 | +from treasury.callbacks import (download_full, download_full_prices, download_small, download_small_prices, get_update_balances, |
| 10 | + get_update_prices, update_forecast_chart, update_price_chart, update_summary) |
| 11 | +from treasury.data import get_gecko_spot, lookup_balance |
11 | 12 |
|
12 | 13 | # defaults for startup
|
13 | 14 | FORECAST_PERIODS = 90
|
@@ -164,7 +165,7 @@ def get_app(price_data_loc, account_data_loc, serve, base_path, start_date, end_
|
164 | 165 | dcc.Store(id='small-sims'),
|
165 | 166 | dcc.Interval(
|
166 | 167 | id='auto-update-trigger',
|
167 |
| - interval=auto_update_delay_seconds*1000, # in milliseconds |
| 168 | + interval=auto_update_delay_seconds*1000, |
168 | 169 | n_intervals=0)
|
169 | 170 | ], fluid=True)
|
170 | 171 |
|
@@ -236,16 +237,15 @@ def get_app(price_data_loc, account_data_loc, serve, base_path, start_date, end_
|
236 | 237 |
|
237 | 238 | def main():
|
238 | 239 | parser = argparse.ArgumentParser(description='webapp that processes data files and renders fork information')
|
239 |
| - # parser.add_argument('--resources', help='directory containing resources', required=True) |
240 | 240 | parser.add_argument('--host', help='host ip, defaults to localhost', default='127.0.0.1')
|
241 | 241 | parser.add_argument('--port', type=int, help='port for webserver', default=8080)
|
242 | 242 | parser.add_argument('--proxy', help='proxy spec of the form ip:port::gateway to render urls', default=None)
|
243 |
| - parser.add_argument('--base_path', help='extension if server is not at root of url', default=None) |
| 243 | + parser.add_argument('--base-path', help='extension if server is not at root of url', default=None) |
244 | 244 | parser.add_argument('--serve', action='store_true', help='flag to indicate whether server will recieve external requests')
|
245 |
| - parser.add_argument('--price_data_loc', help='path to flat file storing collected data', default='../data/price_data.csv') |
246 |
| - parser.add_argument('--account_data_loc', help='path to csv with account information', default='../data/accounts.csv') |
247 |
| - parser.add_argument('--start_date', help='default start date', default='2021-12-01') |
248 |
| - parser.add_argument('--end_date', help='default end date', default=None) |
| 245 | + parser.add_argument('--price-data-loc', help='path to flat file storing collected data', default='../data/price_data.csv') |
| 246 | + parser.add_argument('--account-data-loc', help='path to csv with account information', default='../data/accounts.csv') |
| 247 | + parser.add_argument('--start-date', help='default start date', default='2021-12-01') |
| 248 | + parser.add_argument('--end-date', help='default end date', default=None) |
249 | 249 | args = parser.parse_args()
|
250 | 250 |
|
251 | 251 | if args.end_date is None:
|
|
0 commit comments