You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GitHub REST API implementation gitscribe/apis/github.py and the Discord Bot gitscribe/_discord.py are all currently implemented in a functional programming paradigm. Although a welcoming point for beginners, it can be extremely limiting when expanding the project. Let's make use of what Python is great at and refactor the codebase to an object-oriented approach.
Checkpoints:
gitscribe/_discord.py
should define a DiscordBot class instead of having a pre-defined bot object which is the current implementation.
gitscribe/apis/github.py
should have different classes for Repository, Issue, etc.
requires discussion:
is there a better GitHub REST API python wrapper?
would it be more logical to shift to the GitHub GraphQL API for our needs?
scripts/gitscribe
Should build an object of the new DiscordBot class and run it from within
Proposal for Refactoring Gitscribe to an Object-Oriented Approach with DDD Principles
Hi @shreyass-ranganatha ,
I would like to propose a refactor of the Gitscribe codebase to adopt an object-oriented approach while incorporating Domain-Driven Design (DDD) principles. This will help us create a more maintainable, scalable, and robust architecture. Here are the key points:
Refactor Discord Bot: Create a DiscordBot class to encapsulate all functionalities, enhancing modularity and flexibility.
Refactor GitHub API: Introduce classes for different entities (e.g., Repository, Issue) based on DDD principles to ensure that our code aligns with the business domain and improves clarity.
Domain Model Creation: Develop a domain model that accurately reflects the core concepts and relationships within the project, facilitating better collaboration and understanding among team members.
Explore Alternatives: Consider using established GitHub API wrappers (like PyGithub or Github3.py) and evaluate the benefits of transitioning to the GitHub GraphQL API for more efficient data retrieval.
I believe these changes will greatly benefit the project. I’d love to discuss this further and align on the refactoring strategy. Thank you for considering!
The GitHub REST API implementation
gitscribe/apis/github.py
and the Discord Botgitscribe/_discord.py
are all currently implemented in a functional programming paradigm. Although a welcoming point for beginners, it can be extremely limiting when expanding the project. Let's make use of what Python is great at and refactor the codebase to an object-oriented approach.Checkpoints:
gitscribe/_discord.py
should define a
DiscordBot
class instead of having a pre-definedbot
object which is the current implementation.gitscribe/apis/github.py
should have different classes for
Repository
,Issue
, etc.requires discussion:
scripts/gitscribe
Should build an object of the new
DiscordBot
class and run it from withinRef: #23
The text was updated successfully, but these errors were encountered: