uktrade / public-data-api

The source for the Department for International Trade's Public Data API
https://data.api.trade.gov.uk/
MIT License
5 stars 1 forks source link

refactor: to support sqlite to csv generation #106

Closed michalc closed 2 years ago

michalc commented 2 years ago

The main point of this PR is to have the structure of the main conversion loop be more like

  1. ~code common to JSON and SQLite datasets
  2. convert_json_to_csvs
  3. ~code common to JSON and SQLite datasets

to be able to more easily add in different conversions in step 2

The second point of this PR is reducing the nesting level of functions/how many functions there are. To me, this makes the main loop a touch clearer.


Reviews can be commit-by-commit: each should be a step forward in the overall refactor