GreenInfo-Network / nyc-crash-mapper-etl-script

Extract, Transform, and Load script for fetching new data from the NYC Open Data Portal's vehicle collision data and loading into the NYC Crash Mapper table on CARTO.
3 stars 0 forks source link

Discussion: Upgrade to Python 3 #27

Closed danrademacher closed 4 years ago

danrademacher commented 4 years ago

Over in #26 @fahadkirmani recommended we upgrade to Python 3. Seems reasonable, but what's involved?

fahadkirmani commented 4 years ago

@danrademacher There is not much involved in the upgrade as we are using the default libraries of python. So we need to do the following steps for the upgrade. No changes involved in the code.

sudo yum install python3     
pip install -r requirements.txt 
python3 main.py 
danrademacher commented 4 years ago

Well, that's easy. I think we might also need to upgrade the Heroku instance, since those I believe come with specific python versions installed. Probably also a good thing that Heroku would demand eventually anyway

gregallensworth commented 4 years ago

The script ran perfectly from CLI.

I have deployed this to Heroku, confirming that the instance now uses Python 3.8, installed packages successfully, and gave no warnings. Tomorrow's run should be smooth.