Skip to content

fix: Redirected Major Requirements to Other Block#386

Open
limlindsayj wants to merge 10 commits into
mainfrom
degreeworks-redirected-major-req
Open

fix: Redirected Major Requirements to Other Block#386
limlindsayj wants to merge 10 commits into
mainfrom
degreeworks-redirected-major-req

Conversation

@limlindsayj
Copy link
Copy Markdown
Contributor

Description

If the MAJOR block's requirements points to an OTHER block, that major's OTHER that contains the requirements get appended to the Major's json output. This happens in DegreeworksClient.ts. This Major json output gets put into Scraper.ts, which calls AuditParser.ts on that Major json output to parse it. If it contains "otherBlock", then it uses "otherBlock"'s rule array instead of the MAJOR block's rule array, since the requirements are stored there.

Related Issue

#321

Motivation and Context

Majors Classics, History, and English store their requirements in an OTHER block, atypical of how the other majors store their requirements directly in the MAJOR block. This causes the requirements of these majors to be missed when parsing the information for these majors.

How Has This Been Tested?

The degreeworks scraper was run and the database is now updated to have requirements for History and English. However, the Classics major is split into specializations, so the requirements are stored there.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code involves a change to the database schema.
  • My code requires a change to the documentation.

@laggycomputer laggycomputer linked an issue May 1, 2026 that may be closed by this pull request
@laggycomputer laggycomputer self-requested a review May 1, 2026 02:57
Comment thread apps/data-pipeline/degreeworks-scraper/src/components/AuditParser.ts Outdated
Comment thread apps/data-pipeline/degreeworks-scraper/src/components/DegreeworksClient.ts Outdated
Comment thread apps/data-pipeline/degreeworks-scraper/src/components/DegreeworksClient.ts Outdated
@limlindsayj limlindsayj requested a review from laggycomputer May 6, 2026 04:56
Copy link
Copy Markdown
Member

@laggycomputer laggycomputer left a comment

Choose a reason for hiding this comment

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

Code looks good, pending merge conflicts.

Upgrades biome.json to Biome v2 schema with root:true so indentStyle:space
is respected, then reformats all files to revert accidental tab indentation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@laggycomputer laggycomputer left a comment

Choose a reason for hiding this comment

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

Can we revert the other unrelated changes and fix merge conflicts?

Comment on lines +153 to +155
if ("error" in json) {
return undefined;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What's the reason for this? We already assert against the error variant in Zod on line 151.

Copy link
Copy Markdown
Member

@laggycomputer laggycomputer left a comment

Choose a reason for hiding this comment

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

One unnecessary format change but that's fine.

Good work!

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.

DegreeWorks: Redirected Major Requirements

3 participants