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

Return each course's contribution to CEAB #77

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jennchenn
Copy link
Owner

Implementation description

  • if we want to support showing ceab breakdown by color we can do it this way??
  • not complete yet just wanted to get it out to get some feedback

Steps to test

  1. Try to get breakdown
curl localhost:5000/ceab/id/64127ede93deee8bdc7a9121/breakdown

What should reviewers focus on?

  • right now format looks like:
{
  "CSE ALL": {
    "64126b98269911f00d6f1fb5": 1,
    "64126b99269911f00d6f1fba": 1,
    "64126ba6269911f00d6f2012": 1,
    "64126ccc269911f00d6f2716": 1,
    "64126de3269911f00d6f2df6": 1
  },
  "CSE WEIGHT": {
    "64126aba269911f00d6f1a4b": 0.0,
    "64126b98269911f00d6f1fb5": 36.0,
    "64126b99269911f00d6f1fba": 36.0,
    "64126ba6269911f00d6f2012": 36.0,
    "64126c1d269911f00d6f22e5": 0.0,
    "64126c77269911f00d6f2500": 0.0,
    "64126ccc269911f00d6f2716": 36.0,
    "64126cde269911f00d6f2789": 17.0,
    "64126d53269911f00d6f2a6c": 0.0,
    "64126d64269911f00d6f2ad7": 0.0,
    "64126dae269911f00d6f2ca7": 0.0,
    "64126de3269911f00d6f2df6": 36.0
  },
  "ENG DES": {
    "64126aba269911f00d6f1a4b": 0.0,
    "64126b98269911f00d6f1fb5": 0.0,
    "64126b99269911f00d6f1fba": 0.0,
    "64126ba6269911f00d6f2012": 0.0,
    "64126c1d269911f00d6f22e5": 27.0,
    "64126c77269911f00d6f2500": 0.0,
    "64126ccc269911f00d6f2716": 0.0,
    "64126cde269911f00d6f2789": 0.0,
    "64126d53269911f00d6f2a6c": 0.0,
    "64126d64269911f00d6f2ad7": 0.0,
    "64126dae269911f00d6f2ca7": 0.0,
    "64126de3269911f00d6f2df6": 0.0
  },
  "ENG SCI": {
    "64126aba269911f00d6f1a4b": 0.0,
    "64126b98269911f00d6f1fb5": 0.0,
    "64126b99269911f00d6f1fba": 0.0,
    "64126ba6269911f00d6f2012": 0.0,
    "64126c1d269911f00d6f22e5": 9.0,
    "64126c77269911f00d6f2500": 0.0,
    "64126ccc269911f00d6f2716": 0.0,
    "64126cde269911f00d6f2789": 0.0,
    "64126d53269911f00d6f2a6c": 0.0,
    "64126d64269911f00d6f2ad7": 0.0,
    "64126dae269911f00d6f2ca7": 0.0,
    "64126de3269911f00d6f2df6": 0.0
  },
  "ENG SCI & ENG DES": {
    "64126aba269911f00d6f1a4b": 0.0,
    "64126b98269911f00d6f1fb5": 0.0,
    "64126b99269911f00d6f1fba": 0.0,
    "64126ba6269911f00d6f2012": 0.0,
    "64126c1d269911f00d6f22e5": 36.0,
    "64126c77269911f00d6f2500": 0.0,
    "64126ccc269911f00d6f2716": 0.0,
    "64126cde269911f00d6f2789": 0.0,
    "64126d53269911f00d6f2a6c": 0.0,
    "64126d64269911f00d6f2ad7": 0.0,
    "64126dae269911f00d6f2ca7": 0.0,
    "64126de3269911f00d6f2df6": 0.0
  },
  "LIST A": {},
  "LIST B": {},
  "LIST C": {},
  "LIST D": {},
  "MATH": {
    "64126aba269911f00d6f1a4b": 0.0,
    "64126b98269911f00d6f1fb5": 0.0,
    "64126b99269911f00d6f1fba": 0.0,
    "64126ba6269911f00d6f2012": 0.0,
    "64126c1d269911f00d6f22e5": 0.0,
    "64126c77269911f00d6f2500": 0.0,
    "64126ccc269911f00d6f2716": 0.0,
    "64126cde269911f00d6f2789": 0.0,
    "64126d53269911f00d6f2a6c": 0.0,
    "64126d64269911f00d6f2ad7": 0.0,
    "64126dae269911f00d6f2ca7": 0.0,
    "64126de3269911f00d6f2df6": 0.0
  },
  "MATH & SCI": {
    "64126aba269911f00d6f1a4b": 0.0,
    "64126b98269911f00d6f1fb5": 0.0,
    "64126b99269911f00d6f1fba": 0.0,
    "64126ba6269911f00d6f2012": 0.0,
    "64126c1d269911f00d6f22e5": 0.0,
    "64126c77269911f00d6f2500": 0.0,
    "64126ccc269911f00d6f2716": 0.0,
    "64126cde269911f00d6f2789": 0.0,
    "64126d53269911f00d6f2a6c": 0.0,
    "64126d64269911f00d6f2ad7": 0.0,
    "64126dae269911f00d6f2ca7": 0.0,
    "64126de3269911f00d6f2df6": 0.0
  },
  "PD COMP": {},
  "PD ELEC": {
    "64126cde269911f00d6f2789": 1
  },
  "SCI": {
    "64126aba269911f00d6f1a4b": 0.0,
    "64126b98269911f00d6f1fb5": 0.0,
    "64126b99269911f00d6f1fba": 0.0,
    "64126ba6269911f00d6f2012": 0.0,
    "64126c1d269911f00d6f22e5": 0.0,
    "64126c77269911f00d6f2500": 0.0,
    "64126ccc269911f00d6f2716": 0.0,
    "64126cde269911f00d6f2789": 0.0,
    "64126d53269911f00d6f2a6c": 0.0,
    "64126d64269911f00d6f2ad7": 0.0,
    "64126dae269911f00d6f2ca7": 0.0,
    "64126de3269911f00d6f2df6": 0.0
  },
  "TE": {
    "64126c1d269911f00d6f22e5": 1
  },
  "TE & CSE": {
    "64126b98269911f00d6f1fb5": 1,
    "64126b99269911f00d6f1fba": 1,
    "64126ba6269911f00d6f2012": 1,
    "64126c1d269911f00d6f22e5": 1,
    "64126ccc269911f00d6f2716": 1,
    "64126de3269911f00d6f2df6": 1
  }
}
  • alternatively would it be easier to show breakdown by color (so do the color choosing in backend?) + to return total as well somewhere?
{
  "CSE ALL": {
    "#000000": 2,
    "#08cad1": 1,
    "#ff6961": 1,
    "#ffb480": 1
  },
  "CSE WEIGHT": {
    "#000000": 89.0,
    "#08cad1": 36.0,
    "#c780e8": 0.0,
    "#ff6961": 36.0,
    "#ffb480": 36.0
  },
  "ENG DES": {
    "#000000": 27.0,
    "#08cad1": 0.0,
    "#c780e8": 0.0,
    "#ff6961": 0.0,
    "#ffb480": 0.0
  },
  "ENG SCI": {
    "#000000": 9.0,
    "#08cad1": 0.0,
    "#c780e8": 0.0,
    "#ff6961": 0.0,
    "#ffb480": 0.0
  },
  "ENG SCI & ENG DES": {
    "#000000": 36.0,
    "#08cad1": 0.0,
    "#c780e8": 0.0,
    "#ff6961": 0.0,
    "#ffb480": 0.0
  },
  "LIST A": {},
  "LIST B": {},
  "LIST C": {},
  "LIST D": {},
  "MATH": {
    "#000000": 0.0,
    "#08cad1": 0.0,
    "#c780e8": 0.0,
    "#ff6961": 0.0,
    "#ffb480": 0.0
  },
  "MATH & SCI": {
    "#000000": 0.0,
    "#08cad1": 0.0,
    "#c780e8": 0.0,
    "#ff6961": 0.0,
    "#ffb480": 0.0
  },
  "PD COMP": {},
  "PD ELEC": {
    "#000000": 1
  },
  "SCI": {
    "#000000": 0.0,
    "#08cad1": 0.0,
    "#c780e8": 0.0,
    "#ff6961": 0.0,
    "#ffb480": 0.0
  },
  "TE": {
    "#000000": 1
  },
  "TE & CSE": {
    "#000000": 3,
    "#08cad1": 1,
    "#ff6961": 1,
    "#ffb480": 1
  }
}
  • open to other suggestions too!

@jennchenn jennchenn added backend Changes to backend WIP draft pr PR still in progress labels Mar 21, 2023
@linear
Copy link

linear bot commented Mar 21, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Changes to backend WIP draft pr PR still in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant