This pull request (PR) introduces a significant refactor of the project to adopt an Object-Oriented Programming (OOP) architecture. The primary changes are divided into three modules:
AIService
SocialService
Util
Each module has been refactored to adhere to OOP principles, improving the maintainability and extensibility of the code.
Key Changes
AIService
Introduced the main class AIService that encapsulates all AI service-related logic.
Files:
AIRender.py: It converts ai_option to the specific model
AIService.py: It contains the abstract methods for the AIModels and private methods
AIModel: As a directory it contains the modules of a single AI Model
SocialService
Created the SocialService class to get all social interactions, user communications and profiles
Files:
SocialRender.py: It converts platform_option to the specific social service
SocialService.py: It contains the abstract methods for the Social
Social: As a directory it contains the modules of a single Social
Util
Introduced the Util class for general utility methods and functions shared across modules.
Files:
Const: It contains all the constants necessary for the project
Helper: It contains functions used in many files
Benefits
Modularity: The code is now more modular and divided into well-defined components, making it easier to maintain and extend.
Maintainability: Classes and interfaces are designed to be easily extended without modifying existing code.
Testability: The separation of concerns and dependency injection improve the testability of individual components.
OOP Implemented
Description
This pull request (PR) introduces a significant refactor of the project to adopt an Object-Oriented Programming (OOP) architecture. The primary changes are divided into three modules:
Each module has been refactored to adhere to OOP principles, improving the maintainability and extensibility of the code.
Key Changes
AIService
Introduced the main class
AIService
that encapsulates all AI service-related logic.Files:
AIRender.py
: It convertsai_option
to the specific modelAIService.py
: It contains the abstract methods for theAIModels
and private methodsSocialService
Created the SocialService class to get all social interactions, user communications and profiles
Files:
SocialRender.py
: It convertsplatform_option
to the specific social serviceSocialService.py
: It contains the abstract methods for theSocial
Util
Introduced the Util class for general utility methods and functions shared across modules.
Files:
Const
: It contains all theconstants
necessary for the projectHelper
: It contains functions used in many filesBenefits
Issue
1