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: courseCode and sectionCode are inconsistent #1087

Open
KevinWu098 opened this issue Dec 24, 2024 · 0 comments
Open

fix: courseCode and sectionCode are inconsistent #1087

KevinWu098 opened this issue Dec 24, 2024 · 0 comments
Labels
codefix Refactoring or improving the codebase good first task Good task for someone new to the project high High priority issue

Comments

@KevinWu098
Copy link
Member

KevinWu098 commented Dec 24, 2024

Context

WebSOC declares the five digit string which represents a section in a given quarter as a "course code" (e.g. 35560 -> ICS 31 Lec in Winter 25). However, the Anteater API describes "course code" as "section code", which is a more accurate name for the value. AntAlmanac's codebase generally agrees with this renaming, using sectionCode ~250 times.

Issue

Across AntAlmanac's codebase, there are also roughly ~30 instances where we refer to the five digit numeric string which represents a section in a given quarter, as a "Course Code" (e.g. courseCode).

This inconsistency is most prominent when we encode course/section codes as courseCode, and decode the value as such. This is problematic because we would then query Anteater API with courseCode as a field, which returns nothing as the Anteater API does not accept such a field.

Example: This link, https://antalmanac.com/?courseCode=35510, which we provide from the actions cell dropdown in the search pane, doesn't work.

Solution

In every case where courseCode is referenced in business logic, we should correctly rename and rewrite to use sectionCode instead. For user-facing content (such as the manual search input), we could continue to match WebSOC, but I'm of the opinion that we should agree with Anteater API and use section code there as well.

@KevinWu098 KevinWu098 added good first task Good task for someone new to the project high High priority issue labels Dec 24, 2024
@MinhxNguyen7 MinhxNguyen7 added the codefix Refactoring or improving the codebase label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codefix Refactoring or improving the codebase good first task Good task for someone new to the project high High priority issue
Projects
None yet
Development

No branches or pull requests

2 participants