ONSdigital / SDG_11.2.1

Analysis for the UN Sustainable Development Goal 11.2.1
https://onsdigital.github.io/SDG_11.2.1/
Apache License 2.0
5 stars 7 forks source link

Turn data ingest into OOP #85

Open jwestw opened 3 years ago

jwestw commented 3 years ago

Improve the organisation of the code

jwestw commented 3 years ago

(Editing this ticket to make the requirements clearer)

Consider whether the zip file needs to be written out before extracting. It might be that it can be unzipped in memory. Or maybe request a single file from the zip.

Class attributes:

Methods:

jwestw commented 3 years ago

I have referred to this issue in #120 .

It might be a good idea to solve this ticket before that.

Not only would the any_to_pd function be better as a class, but also it also needs to:

jwestw commented 2 years ago

Make use of ABC's abstractmethod

See the Core Programming section in the BPI. There is a section on Classes and using the abstractmethod decorator.