hummingbot icon indicating copy to clipboard operation
hummingbot copied to clipboard

FEAT: Improve Executors abstraction with Factory

Open MementoRC opened this issue 10 months ago • 3 comments

Before submitting this PR, please make sure:

  • [x] Your code builds clean without any errors or warnings
  • [x] You are using approved title ("feat/", "fix/", "docs/", "refactor/")

A description of the changes proposed in the pull request: The Executor factory allows to decouple the ExecutorOrchestrator from the specific implementation of Executors. Each Executor/Config registers itself into the factory

Continues/Replaces: https://github.com/hummingbot/hummingbot/pull/7427 - to conserve inline docs and pytest in local branch

Tests performed by the developer: WIP

Tips for QA testing:

MementoRC avatar Feb 12 '25 03:02 MementoRC

@cardosofede This is the solution you should have looked at, instead of the mapping

MementoRC avatar Apr 01 '25 19:04 MementoRC

the solution seems more robust but at the same time much more complex than just adding the mapping that is really simple and easy for anyone else to understand, what benefits this solution provides that we should take into account to implement it? sometimes I think that simple is better than complicated and if the two of them are solving the same problem and one is much more simpler I will pick that one. btw I like the update feature we should do that, and I also liked the decorator ;) but in this case I prefer the simpler one

cardosofede avatar Apr 01 '25 21:04 cardosofede

Well, this solution provide a complete separation of concerns. It could potentially resolve circular imports. devs can add executors without touch the orchestrator and potentially add mistakes. Users can have their own executors without having to introduce a merge conflict with the development branch.

MementoRC avatar Apr 02 '25 01:04 MementoRC

Obsolete

MementoRC avatar Jun 25 '25 16:06 MementoRC