A suggestion of applying State Design Pattern in the covid_api_v2_model.py file.
Proposed Changes
In the file covid_api_v2_model.py, there is a lot of a different kind of model, such as CurrentModel, CurrentUSModel, etc. All the models are used in the covid_api_v2_integrator.pyclass, and they are called by their class name. Apply State Design Patterncan help the client switching from one model to another easier. The design avoids the client from accessing the implementation of each of the models.
Addtional Info
The design helps the project follow the Single Responsibility Principle and Open/Closed Principle.
Related Issue:
covid_api_v2_model.py
file.Proposed Changes
covid_api_v2_model.py
, there is a lot of a different kind of model, such asCurrentModel
,CurrentUSModel
, etc. All the models are used in thecovid_api_v2_integrator.py
class, and they are called by their class name. ApplyState Design Pattern
can help the client switching from one model to another easier. The design avoids the client from accessing the implementation of each of the models.Addtional Info
Single Responsibility Principle
andOpen/Closed Principle.
Checklist
Screenshots