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

fix: implement correct grouping for engineering liberal studies #962

Merged
merged 7 commits into from
Dec 4, 2024

Conversation

ejcheng
Copy link
Member

@ejcheng ejcheng commented Nov 15, 2024

Summary

Currently, the engineering liberal studies requirement is represented incorrectly on CoursePlan. For the "courses from three separate groups" requirement listed on the liberal studies policy, it's currently set up such that courses from any three separate liberal studies categories (not groups) check off the requirement. For example, adding SHUM 2208 (LA), ARTH 2600 (CA), and AMST 3981 (ALC) checks off the requirement, despite LA, CA, and ALC all being members of "Group 1" and thus only counting for one of the three groups under the requirement.

This pull request implements the liberal studies group structure to correct this (I'm not sure if I implemented it correctly though, there seems to be many more line deletions than additions in the requirements json). Currently, the code checks all categories (LA, CA, ALC, HA, etc.) separately.

In addition, the liberal studies groups were rearranged for Cornell engineers entering in Fall 2024, so I will make another PR soon to implement a migration for that.

CC @nidhi-mylavarapu

@ejcheng ejcheng self-assigned this Nov 15, 2024
@ejcheng ejcheng requested a review from a team as a code owner November 15, 2024 21:46
@dti-github-bot
Copy link
Member

dti-github-bot commented Nov 15, 2024

[diff-counting] Significant lines: 75.

Copy link
Contributor

github-actions bot commented Nov 15, 2024

Visit the preview URL for this PR (updated for commit 089c723):

https://cornelldti-courseplan-dev--pr962-fix-eng-lib-studies-8ds9adrf.web.app

(expires Fri, 03 Jan 2025 05:48:16 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 6d4e0437c4559ed895272bbd63991394f1e0e933

Copy link
Member

@Destaq Destaq left a comment

Choose a reason for hiding this comment

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

Hey Eric, good work catching this consistency issue. Hopefully not too many existing Engineering users were affected! There were a couple of code style things I commented on, but mainly nitpicking — great job and should be good to merge (ping or message me) once changes are in place.

src/data/colleges/en.ts Outdated Show resolved Hide resolved
];
const engineeringLiberalArtsGroups: Record<string, string[]> = {
'Group 1': [
'CA-AAP',
Copy link
Member

Choose a reason for hiding this comment

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

Hmmm I'm not sure if it is strictly necessary to go and add in the content after the hyphen for all of these categories. hasCategory checks for a substring match, and all the CAs are in Group 1, all the HAs in Group 2 ... (they are disjoint sets) so such granularity might not be needed. @nidhi-mylavarapu not sure if you have any thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried the groups without the after-hyphen content and it didn't filter correctly...not sure if it's something else though?

Copy link
Member

Choose a reason for hiding this comment

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

Alright we can probably stick with just this then, I don't anticipate the categories changing much.

src/data/colleges/en.ts Outdated Show resolved Hide resolved
src/data/colleges/en.ts Outdated Show resolved Hide resolved
src/data/colleges/en.ts Outdated Show resolved Hide resolved
src/requirements/decorated-requirements.json Outdated Show resolved Hide resolved
@ejcheng ejcheng requested a review from Destaq December 4, 2024 05:56
Copy link
Member

@Destaq Destaq 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 the updates!

@ejcheng ejcheng merged commit e7f6204 into main Dec 4, 2024
11 checks passed
@ejcheng ejcheng deleted the fix_eng_lib_studies branch December 4, 2024 22:59
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.

3 participants