Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Flag Feedback and Recommendation Feedback Models #4477

Closed
ozer550 opened this issue Mar 20, 2024 · 0 comments · Fixed by #4490
Closed

Implement Flag Feedback and Recommendation Feedback Models #4477

ozer550 opened this issue Mar 20, 2024 · 0 comments · Fixed by #4490
Assignees
Labels
DEV: backend P1 - important Priority: High impact on UX python Pull requests that update Python code TAG: unit tests

Comments

@ozer550
Copy link
Member

ozer550 commented Mar 20, 2024

Overview

The goal of this issue is to implement a set of Django models that will serve as the foundation for handling feedback and recommendations within the Studio. These models are designed to capture user feedback on various content and interaction events. The models to be implemented include BaseFeedback, BaseFeedbackEvent, BaseFeedbackInteractionEvent, FlagFeedbackEvent, RecommendationsInteractionEvent, and RecommendationsEvent.

Description and outcomes

Base Models Implementation:

  • BaseFeedback Model: implement an abstract base model named BaseFeedback with fields for id, context, created_at, contentnode_id, and content_id.
  • BaseFeedbackEvent Model: implement an abstract base model named BaseFeedbackEvent including a user ForeignKey linking to settings.AUTH_USER_MODEL and target_channel_id.
  • BaseFeedbackInteractionEvent Model: implement an abstract base model named BaseFeedbackInteractionEvent with fields for feedback_type and feedback_reason.

Concrete Models Implementation:

  • FlagFeedbackEvent Model: implement a model named FlagFeedbackEvent inheriting from BaseFeedback, BaseFeedbackEvent, and BaseFeedbackInteractionEvent.
  • RecommendationsInteractionEvent Model: implement a model named RecommendationsInteractionEvent inheriting from BaseFeedback and BaseFeedbackInteractionEvent, including a field for recommendation_event_id.
  • RecommendationsEvent Model: implement a model named RecommendationsEvent inheriting from BaseFeedback and BaseFeedbackEvent, including a field for target_topic_id.
  • Ensure Proper Migration Files: generate migration files for the new models ensuring they accurately represent the models' structure and relationships.
  • Unit Tests: write comprehensive unit tests verifying the integrity of the models, their relationships, and any custom logic. This includes testing model inheritance and field validation.

Acceptance criteria

  • The models must be correctly defined with all specified fields and inheritances, adhering to the project's coding standards.
  • Migration files should be created and successfully applied to the database without errors.
  • All unit tests must pass, ensuring the models' reliability and the correctness of their implementation.
  • The implementation should allow easy extension of the models if additional feedback mechanisms are introduced in the future
@ozer550 ozer550 added P1 - important Priority: High impact on UX TAG: unit tests DEV: backend python Pull requests that update Python code labels Mar 20, 2024
@ozer550 ozer550 added this to the Studio: Feedback Mechanism milestone Mar 20, 2024
@ozer550 ozer550 self-assigned this Mar 21, 2024
@ozer550 ozer550 mentioned this issue Mar 27, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DEV: backend P1 - important Priority: High impact on UX python Pull requests that update Python code TAG: unit tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant