fix(scrapers): filter out inactive faculties and departments#4313
Open
fix(scrapers): filter out inactive faculties and departments#4313
Conversation
The new API returns all faculties and departments regardless of status, unlike the old API which accepted an eff_status parameter. Filter by EffectiveStatus === 'A' after fetching to exclude inactive entries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4313 +/- ##
==========================================
+ Coverage 54.52% 56.67% +2.15%
==========================================
Files 274 308 +34
Lines 6076 6964 +888
Branches 1455 1682 +227
==========================================
+ Hits 3313 3947 +634
- Misses 2763 3017 +254 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| scrapers/nus-v2/src/tasks/GetFacultyDepartment.ts | Added client-side filtering to exclude inactive faculties and departments by EffectiveStatus === 'A' |
Last reviewed commit: 24e3dca
Member
Author
|
This is actually a no-op in terms of data produced, since it looks like there are no inactive faculties/departments. So the intention here is to just preserve functionality from previous version of scraper. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
eff_status: 'A'parameter for server-side filteringEffectiveStatus === 'A'for both faculties and departments after fetching (and after the 099 fallback), before thecleanFacultyDepartmentmappingTest plan
EffectiveStatus: 'A') is retainedfacultyDepartments.jsonoutput only contains active entries🤖 Generated with Claude Code