andreagrandi/covid-api

Refactor the code to support additional sources of data

andreagrandi opened this issue · 0 comments

covid-api is currently supporting only the John Hopkins data. We are going to support additional source of data soon (see #27 ) but before doing that we need to refactor the code, which at the moment assumes there is only one data source.

Things to be done:

  • serve /v1/daily-reports/ from /v1/jh/daily-reports/
  • rename DailyReport model to JHDailyReport and change __tablename__ = "jh_daily_reports" (this will force us to reimport the existing data but it's not a problem since it only takes a few minutes)
  • rename DailyReport schema to JHDailyReport
  • move crud operation under a dedicated class
  • update existing import_script.py and rename it to import_script_jh.py (after the new code has been deployed we need to update the scheduler configuration on Heroku)