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

Populate individual sections with titles and prerequisites as needed #28

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

aeluro1
Copy link

@aeluro1 aeluro1 commented Feb 7, 2024

@aeluro1 aeluro1 assigned yatharth-b and unassigned yatharth-b Feb 7, 2024
@aeluro1 aeluro1 self-assigned this Feb 7, 2024
@aeluro1 aeluro1 changed the title Propagate individual sections with titles and prerequisites as needed Populate individual sections with titles and prerequisites as needed Feb 7, 2024
Copy link

@yatharth-b yatharth-b left a comment

Choose a reason for hiding this comment

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

Love the changes so far! Suggested some structural changes which are just opinions on what the backend vs frontend should do + having uniformity in what we crawl.

Suggestions for new Course and Section types just to re-iterate :

export type Section = [
  crn: string,
  meetings: Meeting[],
  creditHours: number,
  scheduleTypeIndex: number,
  campusIndex: number,
  attributeIndices: number[],
  gradeBaseIndex: number,
  fullName: string,
  prerequisites: Prerequisites
];

export type Course = [
  fullName: string,
  sections: Record<string, Section>,
  description: string | null
];

src/steps/parse.ts Outdated Show resolved Hide resolved
src/steps/details.ts Outdated Show resolved Hide resolved
@aeluro1 aeluro1 marked this pull request as ready for review February 29, 2024 23:32

// Store course ID with section number to obtain prerequisites for all sections
// These sections will be stored as pseudo-courses with CRNs included for prerequisite attaching
sectionCrns.push(`${courseName} <${courseReferenceNumber}>`);

Choose a reason for hiding this comment

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

Thanks for the changes. Can you instead create objects here which store the courseName and courseReferenceNumber. We wouldn't need to parse this string in downloadPrereqs either then.

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.

[BoG S24] Special Topics Prerequisites and Titles
2 participants