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

Wharton Dashboard fixes #752

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Wharton Dashboard fixes #752

wants to merge 2 commits into from

Conversation

owlester12
Copy link
Contributor

I fixed the wharton/status page. I know you want me to fix the cycles page. However, I don't yet have access to the cycles page on Penn clubs website and the one on localhost just points to a create cycle component.

Copy link
Member

@julianweng julianweng left a comment

Choose a reason for hiding this comment

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

Thanks for picking this up! I don't think there's anything left to fix in the Cycles tab so the Status page is more than enough.

The legend fix looks great!

Wondering if there's a more elegant way than the triple-nested loop. Maybe Object.groupBy could be used to create applicationsCommittees since from my understanding it's just grouping by name then one final iteration to project into applicationsGrouped?

Also, I'm not sure if the Application Name is a reliable indicator for similar applications across different cycles since they are often different in practice (e.g. "Penn Memes Application Fall 2022"), at least in production. Maybe the club name would be a better groupby attribute to fix the issues we discussed around applications across cycles not being consolidated?

unconsolidated bar charts of application

Copy link

codecov bot commented Dec 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.99%. Comparing base (56b9394) to head (65c2d22).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #752   +/-   ##
=======================================
  Coverage   71.99%   71.99%           
=======================================
  Files          32       32           
  Lines        6963     6963           
=======================================
  Hits         5013     5013           
  Misses       1950     1950           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@owlester12
Copy link
Contributor Author

I changed it so that we use status.club instead of status.name . We can create applicationCommittees using groupby, but the for loop allows us to create both applicationCommittees and applicationTotals at the same time (and it isn't nested at all). They are the same asymptotically and is most like the original code. With regards to the triple for loop:

Applications committee is a dictionary object that looks like
{club : {
committee: {
status: number,
}, ...
}, ...}

It is triple nested, so to make sure we get all of the key value pairs, we have to loop through all of the clubs and then all of the committees within each club and then all of the statuses in each committee. GroupBy works on arrays, not dictionaries. So, I think that, although not that elegant, the triple nested for loop captures all of the key value pairs as efficiently as possible.

Copy link
Member

@julianweng julianweng left a comment

Choose a reason for hiding this comment

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

Looks great to me, thanks for picking this up Owen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants