Skip to content

[GitHub classroom] BE changes to track points earned through GitHub classroom #56

Description

@omkar309

Requirement:
BE changes are required to store the data received through GitHub classroom APIs so that they can be moderated and be reflected on the leaderboard on the website.

Acceptance criteria:
A GitHub classroom has been created by Yash from the engg team, and the idea is to let interested contributors register themselves on the GitHub classroom, after which we track the points that they are earning by completing assignments by going through the accompanying tutorial

There are 20 assignments, and each assignment is of 10 marks. So the maximum a contributor can earn by completing the assignments is 200 points but we have to moderate it at the backend so that,

  • 200 points= 100 points
  • Points <200 and >=150 points = 75 points
  • Points <150 and >=100 points = 50 points
  • Points <100= 0 points

The updated data is to be fetched every 6 hours so that any progress/new points earned by contributors can be captured in a table in supabase.
The points earned will directly be reflected on the C4GT website leaderboard.

There will also be a button created by the FE designed to which the GitHub classroom link needs to be linked, so that everytime a contributor clicks on the button on the website they are redirected on the GitHub classroom on a new tab.

Resources:

  1. Classroom to be read from: https://github.com/proxy/classroom.github.com/a/mN4BQq05
  2. API reference to pull grades: https://github.com/proxy/docs.github.com/en/rest/classroom/classroom?apiVersion=2022-11-28#get-assignment-grades

Reason:
25% weightage to the applications for DMP 2024 will be given to those who have earned points through community contribution. And since only 134 open tickets are there to solve, and 5000 applications are expected, we are starting a GitHub classroom to meet the demand of interested contributors who want to earn community contribution points before applying to DMP 2024.

Activity

  1. omkar309 commented on Mar 18, 2024

    @omkar309
    Author

    @sasi2312 to pick this

  2. SwethaSureshCogni commented on Mar 19, 2024

    @SwethaSureshCogni

    As per our analysis without webhook or any event we have come up with below possibilities
    Quart Schedular: Call the API as per the scheduled time.
    Django cron job: wr we are gng to call the API using Django cron job schedular, for this we have to only configure Django on server. This we are confident we can do this if we can do Django setup.
    Kafka: We can use kafka also to schedule cron job in Quart but we have to work on it, since we are not aware of Quart FW limitations.

    Pros and Cons of Quart Vs Django
    Quart schedular: Pros: No need to have any additional setup.
    Cons: Have to check on the response time.
    Django schedular: Pros: As per the sample test response was faster then Quart schedular
    Cons: Additional Django setup must be done on the server.
    Above are some of the observations done.

    As per the discussion we started to work on Quart schedular..

  3. SwethaSureshCogni commented on Mar 19, 2024

    @SwethaSureshCogni

    Considering the percentage for moderation
    200 points= 100 points (100%)
    Points <200 and >=150 points = 75 points (75-99%)
    Points <150 and >=100 points = 50 points (50-74%)
    Points <100= 0 points (<50%)

  4. omkar309 commented on Mar 20, 2024

    @omkar309
    Author
    • Cron job creation date, getting data from GitHub classroom done
    • Leaderboard changes in definition- Kanav<>Sasi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions