MarketSquare / MarketSquare/robotframework-ai

Quality: use dependency injection for supplying the AI_Interface to each module

Open
#18 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Python
Stars
38
Forks
6
PR merge metrics
No merged PRs in 30d

Description

At the moment the Module abstract class creates an AI_Interface on initialization. With three different module, three AI_Interface instances will be created. This is unnecessary as there are no special configurations per module for the AI_Interface; they should all use the same instance. Instead this instance should be initialized before creating all module instances and pass it as a parameter when creating those module instances. This will not only reduce the memory usage (no three instances of the same class) as well as all other benefits dependency injection provides.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Module abstract class and trace the entry point that creates all module instances. Check where AI_Interface is initialized and how it is passed through module construction. Done means the modules use one shared AI_Interface instance rather than creating one per module.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.