*Proposed an alternative way to connect the DataTimeSeries class with the helper class via the Adapter design pattern. The need for such a change arises in the long run as it promotes modularity and allows for easier code management and simplification. It introduces an intermediate class that translates between the DataTimeSeries class and the functions in helper.py.
Proposed Changes
Helper.py file was changed from being a list of static methods to a static class with its list of methods
All files that imported the individual methods, now imported the new Static class instead.
This change was necessary to apply the Adapter Pattern as it is used to communicate between two classes
The New Helper Class was implemented according to the new Helper Interface
The DataTimeSeries Class was also made to implement the new DataTimeSeries Interface.
New DataTimeSeries Adapter Class implements the Helper Interface and holds an Instance of the DataTimeSeries Class
In order to use any of the methods in the Helper class, a DataTimeSeries object must call the appropriate methods in the DataTimeSeries Adapter.
Pytest was changed to reflect these additions
Additional Info
Other Classes in the get_data.py like the DailyReports can be easily made to use the same logic.
Related Issue:
*Proposed an alternative way to connect the DataTimeSeries class with the helper class via the Adapter design pattern. The need for such a change arises in the long run as it promotes modularity and allows for easier code management and simplification. It introduces an intermediate class that translates between the DataTimeSeries class and the functions in helper.py.
Proposed Changes
Additional Info
Checklist
Screenshots