cmu-delphi / covidcast-indicators

Back end for producing indicators and loading them into the COVIDcast API.
https://cmu-delphi.github.io/delphi-epidata/api/covidcast.html
MIT License
12 stars 17 forks source link

Fix Env issue in staging #2082

Closed minhkhul closed 1 day ago

minhkhul commented 4 days ago

Context: https://delphi-org.slack.com/archives/C04LJ169KNF/p1732057138663599

minhkhul commented 4 days ago

Fix idea: Change cronicle command chunk from

cd /home/indicators/runtime/${ind_name} && env/bin/python -m delphi_utils.runner delphi_${ind_name}

to

source ~/.bashrc && cd /home/indicators/runtime/${ind_name} && rm -rf env && pyenv local 3.8.2 && pyenv exec python -m venv env && source env/bin/activate && pip install --upgrade pip && pip install . && env/bin/python -m delphi_utils.runner delphi_${ind_name}

or similar if runner not used.

Testing: Added staging test runs for the fix and ran them (without archive differ or create_csv_backup since delphi_util's not released yet): Google Symptoms Hospital Admissions NCHS NSSP Doctor Visits

minhkhul commented 1 day ago

Staging test run went well so applied to prod runs, which also went without issue on Friday and Saturday. Closing.