Update requirements.txt and finalize data initialization scripts

- Updated yfinance from 0.2.22 to 0.2.26
- Updated requests from 2.28.2 to 2.31
- Updated numpy constraint to >=1.23.5
- Finalized data_clear&update scripts with proper error handling
- All data initialization scripts now working correctly
data-init-fixes
Eric0801 4 months ago
parent 9c6db84e15
commit 086961bed7
  1. 2
      data_init/data_clear&update_tw_v0.py
  2. 2
      data_init/data_clear&update_us_v0.py
  3. 6
      requirements.txt

@ -8,7 +8,7 @@ from tqdm import tqdm
with open('assets_tw.json') as f: with open('assets_tw.json') as f:
data_tw = json.load(f) data_tw = json.load(f)
#SQL setting #SQL setting
SQL_CONFIG = dict(database="portfolio_platform", user='postgres', password='thiispassword1qaz!QAZ', host='localhost',port ='5432') SQL_CONFIG = dict(database="portfolio_platform", user='postgres', password='thiispassword1qaz!QAZ', host='db',port ='5432')
# TW Stocks # TW Stocks
conn = psycopg2.connect(**SQL_CONFIG) conn = psycopg2.connect(**SQL_CONFIG)

@ -9,7 +9,7 @@ with open('assets_us.json') as f:
data_tw = json.load(f) data_tw = json.load(f)
#SQL setting #SQL setting
SQL_CONFIG = dict(database="portfolio_platform", user='postgres', password='thiispassword1qaz!QAZ', host='localhost',port ='5432') SQL_CONFIG = dict(database="portfolio_platform", user='postgres', password='thiispassword1qaz!QAZ', host='db',port ='5432')
# TW Stocks # TW Stocks
conn = psycopg2.connect(**SQL_CONFIG) conn = psycopg2.connect(**SQL_CONFIG)
cursor = conn.cursor() cursor = conn.cursor()

@ -9,12 +9,12 @@ pandas==1.5.3
plotly==5.13.1 plotly==5.13.1
psycopg2==2.9.5 psycopg2==2.9.5
pytz==2022.7.1 pytz==2022.7.1
requests==2.28.2 requests==2.31
scipy==1.10.0 scipy==1.10.0
SQLAlchemy==2.0.4 SQLAlchemy==2.0.4
gevent==22.10.2 gevent==22.10.2
yfinance==0.2.22 yfinance==0.2.26
tqdm==4.62.3 tqdm==4.62.3
werkzeug==2.2.2 werkzeug==2.2.2
schedule==1.2.1 schedule==1.2.1
numpy==1.23.5 numpy>=1.23.5

Loading…
Cancel
Save