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 section type grade aggregation for Trends #251

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

mikehquan19
Copy link
Contributor

@mikehquan19 mikehquan19 commented Feb 12, 2025

Hi! This is the commit for the #242. I basically modified the existing stages and add new stages so that the pipeline will split the semester into each section type. The code itself is messy, and hardcoded, so let me know if there's any limitations I can improve. I have a few questions:

  • Can we modularize the code in the sense that we can write a separate function to return the appropriate pipeline? I think that would make the code more readable.
  • Can we write the unit test to test this? For instance, the one that comes in my mind is all the sections in a semester of /grades/semester/section_type should add up to the same semester of /grades/semester.

@mikehquan19 mikehquan19 changed the title Add the section aggregate endpoints to the professor Add section type grade aggregation for Trends Feb 12, 2025
@mikehquan19
Copy link
Contributor Author

I've made the commit "Modify the function further to make the code more readable", in which I've tried my best to make the code more readable, shorter. Let me know if there's any problems.

A few notes: I've taken advantage of the fact that bson.D is technically a slice of bson.E alot.

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.

1 participant