stock_reminder_bot
stock_reminder_bot copied to clipboard
Refactor bot.py
Just how the test suite was split into several modules, the same should probably be done for bot.py since the code is getting a bit spaghetti.
Some ideas of how it could be broken down:
- Modules for methods with outside API calls vs methods that don't have outside calls
- One module for each feature e.g.
reply_mentions.py,publish_reminders.py,generate_report.py
It might make sense to follow a composition approach as in: https://github.com/luisgc93/chamath2cash/commit/9c9b706869e550b3caa82be97a2b33f1fa98b44c I.e. To create a Bot class that contains all the different clients plus some business logic.
WIP in branch refactor-with-composition-approach