Skip to content

chore(scraper): Prepare scraper for AY2026/2027#4432

Open
jloh02 wants to merge 3 commits into
masterfrom
codex/ay26-27-pr1-scraper
Open

chore(scraper): Prepare scraper for AY2026/2027#4432
jloh02 wants to merge 3 commits into
masterfrom
codex/ay26-27-pr1-scraper

Conversation

@jloh02

@jloh02 jloh02 commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

  • update the NUS v2 scraper academic year to AY2026/2027
  • add AY2026/2027 semester start dates to the academic calendar package so scraper Special Term I/II auto-routing can still source AY2025/2026 data during the overlap window
  • add AY2026/2027 timetable holiday exclusions from the NUS Registrar calendar and MOM public holiday data
  • include both actual Sunday holiday dates and observed Monday dates for applicable spillovers, so exact-date consumers such as Today and iCal exclusions handle both dates
  • update MAINTENANCE.md so future annual prep keeps the academic calendar update in PR1 and leaves semester/archive rollover for PR3

Special Term rollover

specialTermAcademicYear remains null. With the AY2026/2027 calendar present, the scraper can auto-detect that previous AY Special Term I/II remains active until AY2026/2027 Semester 1 starts on 10 Aug 2026.

Data sources

Verification

  • JSON parse, sorted-order, and duplicate check for website/src/data/holidays.json
  • pnpm --filter nusmods-academic-calendar test
  • pnpm --filter nus-v2 typecheck
  • TZ=Asia/Singapore pnpm --filter nusmods test src/utils/ical.test.ts src/config/config.test.ts

Note: pnpm reported the repo's Node 22 engine warning because this local shell is running Node 24.14.0. Running the iCal test without TZ=Asia/Singapore in this thread's Europe/London timezone hits existing DST-sensitive expectations around 2016 dates.

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
nusmods-export Ignored Ignored Preview Jun 27, 2026 3:19am
nusmods-website Ignored Ignored Preview Jun 27, 2026 3:19am

Request Review

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.31%. Comparing base (988c6fd) to head (7bdf4c6).
⚠️ Report is 245 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4432      +/-   ##
==========================================
+ Coverage   54.52%   57.31%   +2.78%     
==========================================
  Files         274      317      +43     
  Lines        6076     7173    +1097     
  Branches     1455     1748     +293     
==========================================
+ Hits         3313     4111     +798     
- Misses       2763     3062     +299     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jloh02 jloh02 changed the title Prepare scraper for AY2026/2027 chore(scraper): Prepare scraper for AY2026/2027 Jun 23, 2026
@greptile-apps

greptile-apps Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR prepares the scraper and calendar data for AY2026/2027. The main changes are:

  • Adds AY2026/2027 semester and Special Term start dates to the academic calendar package.
  • Updates the NUS v2 scraper academic year to 2026/2027.
  • Extends website holiday data with AY2026/2027 NUS and Singapore public holidays.
  • Updates maintenance notes for the annual AY rollover flow.

Confidence Score: 5/5

The changes are merge-safe based on the scoped calendar, scraper configuration, holiday data, and maintenance documentation updates.

No correctness, security, or reliability issues were identified in the reviewed changes, and the provided validation covers JSON integrity, package tests, typechecking, and timezone-sensitive iCal behavior.

T-Rex T-Rex Logs

What T-Rex did

  • Ran the special-term-routing test using trex-artifacts/special-term-routing-script.js to generate before and after logs.
  • Reviewed the after-run log trex-artifacts/special-term-routing-02-after.log and confirmed academicYear advanced to 2026/2027, calendarHas2026_2027 is true, and the routing behavior changed as described.
  • Ran the holiday exclusions test and captured before and after logs for comparison.
  • Reviewed trex-artifacts/holiday-exclusions-02-after.log and confirmed head holidays increased to 95, with all six target dates present in both raw data and iCal consumption.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (6): Last reviewed commit: "Merge branch 'master' into codex/ay26-27..." | Re-trigger Greptile

Comment thread website/src/data/holidays.json
@jloh02 jloh02 force-pushed the codex/ay26-27-pr1-scraper branch 2 times, most recently from c00e9c9 to d38a94d Compare June 23, 2026 12:22
Comment thread website/src/data/holidays.json
Comment thread website/src/data/holidays.json
@jloh02 jloh02 force-pushed the codex/ay26-27-pr1-scraper branch from d38a94d to 6fffdfc Compare June 24, 2026 22:52
@jloh02

jloh02 commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

Fixed the holiday spillover issue. The AY2026/2027 holiday block now includes both the actual Sunday dates and observed Monday dates for the MOM-published Sunday spillovers: National Day 2026, Deepavali 2026, and Chinese New Year day 2 in 2027.

@leslieyip02 leslieyip02 left a comment

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.

LGTM!

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.

2 participants