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

Add Category Enum and Refactor #174

Merged
merged 13 commits into from
Oct 20, 2024
Merged

Add Category Enum and Refactor #174

merged 13 commits into from
Oct 20, 2024

Conversation

jq1836
Copy link

@jq1836 jq1836 commented Oct 16, 2024

Resolves #145, #159

Overview

To allow us to have finite categories for matching, we make use of enums.

Complexity changes

  • easy -> Easy
  • medium -> Medium
  • Hard -> Hard

Category changes

No longer free text, but string enum instead, the following are current possible values:

  • Algorithms
  • Arrays
  • Bit Manipulation
  • Brainteaser
  • Databases
  • Data Structures
  • Recursion
  • Strings

Other changes

On top of the above, major refactoring of frontend and question-service was done to improve code quality.

@jq1836 jq1836 self-assigned this Oct 16, 2024
@jq1836
Copy link
Author

jq1836 commented Oct 16, 2024

Only merge after DB is prepared, i.e. all questions purged or updated to new format.

Copy link

@SelwynAng SelwynAng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, aside from some comments mainly for the question-service! To merge only after removing all existing questions in the database, since current question format will leads to errors on the frontend.

question-service/app/routers/questions.py Outdated Show resolved Hide resolved
question-service/app/routers/questions.py Outdated Show resolved Hide resolved
question-service/app/models/questions.py Outdated Show resolved Hide resolved
question-service/app/crud/questions.py Show resolved Hide resolved
question-service/app/crud/questions.py Show resolved Hide resolved
question-service/app/routers/questions.py Show resolved Hide resolved
question-service/app/routers/questions.py Show resolved Hide resolved
frontend/lib/api/question-service/bulk-create-question.ts Outdated Show resolved Hide resolved
@jq1836 jq1836 merged commit ff1ceae into main Oct 20, 2024
2 checks passed
@jq1836 jq1836 deleted the enhancement/question-cat-enum branch October 20, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Batch Question Upload bug
3 participants