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

Major Algorithm Patch #786

Merged
merged 1 commit into from
Dec 5, 2024
Merged

Major Algorithm Patch #786

merged 1 commit into from
Dec 5, 2024

Conversation

KobeZ123
Copy link
Contributor

@KobeZ123 KobeZ123 commented Dec 4, 2024

Description

It seems like some of the JSON from the 2024-2025 catalog year majors were causing the major validation algorithm to crash and there were two common culprits:

  1. A requirement section was scraped with no requirements, which threw an error in the validator. Ideally, no major should have a shape where there are no requirements in a section but this PR just suppresses this error by returning Ok.
  2. Some requirement sections seem to have scraped requirements with nested arrays. This is an issue that was also causing crashes on the frontend that Shireen has solved. The shape of the inner elements of the arrays seem valid, so there is some code to "unpack" these nested section requirements

Closes # (issue number)

Type of change

Please tick the boxes that best match your 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 not work as expected)
  • This change requires a documentation update
  • This requires a run of yarn install
  • This has migration changes and requires a run of yarn dev:migration:run

How Has This Been Tested?

Please describe how you tested this PR (both manually and with tests) Provide instructions so we can reproduce.

  • Test A
  • Test B

Checklist:

  • I have run the production builds in docker for the frontend/backend and ensure things run fine. Check README of repo on how to run if not sure.
  • I have performed a self-review of my own code
  • I have commented my code where needed
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I've run the end to end tests
  • Any dependent changes have been merged and published in downstream modules

Copy link

vercel bot commented Dec 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
graduatenu-frontend-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2024 2:42am

Copy link
Contributor

@denniwang denniwang left a comment

Choose a reason for hiding this comment

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

looks good but im curious what it was before? there were no lines removed so how was it being validated before this?

@Suraj-Ram Suraj-Ram self-requested a review December 4, 2024 23:44
Copy link
Contributor

@Suraj-Ram Suraj-Ram left a comment

Choose a reason for hiding this comment

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

lgtm

@KobeZ123 KobeZ123 merged commit 8b6a4a0 into main Dec 5, 2024
7 checks passed
@KobeZ123 KobeZ123 deleted the major-algorithm-patch branch December 5, 2024 00:43
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