forked from xeroc/stakemachine
-
Notifications
You must be signed in to change notification settings - Fork 131
Closed
Labels
Description
Currently I was assigned to the task #517, and the question appeared for me: Why I'm writing tests for the code which will be refactored soon instead of doing refactoring of that code and writing tests immediately? So, I decided to summarize the decisions which I considering as strange:
- Refactoring of strategies (base.py refactor #542, Staggered Orders Refactor #541) before refactoring the core (Core Refactor: Worker, MP asyncio #538) will require refactoring again
- We have unittests tasks in progress for the code which going to be refactored right after (Base Strategy Unit Test #516, Staggered Orders Unit Test #517, Relative Orders Unit Test #518) . So current pipeline is to "write tests for strategies -> refactor strategies -> refactor tests". Why not refactor code and write unittests for the new code in parallel? This would save us huge amount of time.
- External feeds + their tests refactor was started (refactor external feeds to be External Price and Order Engine + fix unit tests #524), but was interrupted in favor of Staggered Orders Unit Test #517. Isn't it a fail of planning?
- Base strategy unittests Base Strategy Unit Test #516 are being developed without basing it on Strategy Test Interface to omit Real node interaction and API calls. #515 (strategy test interface to use local testnet). This means additional work of refactoring base.py unittests to Strategy Test Interface to omit Real node interaction and API calls. #515
- Plugin infrastructure 500 plugin infrastructure #502 was implemented but didn't used and even merged. Wouldn't it be better to spend time on more priority tasks than?
- KOTH strategy (454 1 sat bot strategy (KOTH) #479) has been implemented covering all initial requirements. The work has not been accepted, unittest requirement added despite it was not present in initial requirements.
- Seems like most of discussions on development planning are happening in private chats, then final decisions are published without letting all interested parties to participate. This is the root of unoptimalities I described above
How would I plan the work:
- Do architecture planning of how all dexbot components should interact together (Core Refactor: Worker, MP asyncio #538)
- Refactor core (Core Refactor: Worker, MP asyncio #538)
- Refactor strategies + write tests in parallel using new testsuite base (Strategy Test Interface to omit Real node interaction and API calls. #515)
- Implement new features, plugins, etc