Skip to content

Commit ae55d00

Browse files
authored
chore: migrate NUSMods to AY24/25 (#3741)
* update scraper, announcement, config, holidays * update coursereg schedule * update modulebank snapshot
1 parent ada49e0 commit ae55d00

File tree

7 files changed

+66
-56
lines changed

7 files changed

+66
-56
lines changed

scrapers/nus-v2/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const config: Config = {
4444
apiConcurrency: env.apiConcurrency || 5,
4545

4646
// Other config
47-
academicYear: '2023/2024',
47+
academicYear: '2024/2025',
4848
dataPath: path.resolve(__dirname, '../data'),
4949
};
5050

website/src/actions/__snapshots__/moduleBank.test.ts.snap

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,18 @@ exports[`fetchAllModuleArchive should return multiple request actions 1`] = `
8686
"type": "FETCH_ARCHIVE_MODULE",
8787
},
8888
],
89+
[
90+
{
91+
"meta": {
92+
"API_REQUEST": "FETCH_ARCHIVE_MODULE_CS1010S_2023/2024",
93+
"academicYear": "2023/2024",
94+
},
95+
"payload": {
96+
"url": "test://MOCK_MOD_DETAILS_URL/CS1010S/2023/2024",
97+
},
98+
"type": "FETCH_ARCHIVE_MODULE",
99+
},
100+
],
89101
]
90102
`;
91103

website/src/config/app-config.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"brandName": "NUSMods",
33
"defaultDescription": "NUSMods is a timetable builder and knowledge platform, providing students with a better way to plan their school timetable and useful module-related information that are community-driven.",
4-
"academicYear": "2023/2024",
4+
"academicYear": "2024/2025",
55
"apiBaseUrl": "https://api.nusmods.com",
66
"elasticsearchBaseUrl": "https://nusmods-search.es.ap-southeast-1.aws.found.io:9243",
7-
"semester": 2,
7+
"semester": 1,
88
"disqusShortname": "nusmods-prod",
99
"venueFeedbackApi": "https://dev--nusmods-venue-github-hook--zwliew.autocode.dev/",
1010
"moduleErrorApi": "https://0-0-7--nusmods-module-error-reporting.mediumdeviation.autocode.gg/",
@@ -15,7 +15,8 @@
1515
"2019/2020",
1616
"2020/2021",
1717
"2021/2022",
18-
"2022/2023"
18+
"2022/2023",
19+
"2023/2024"
1920
],
2021
"examAvailability": [1, 2, 3, 4],
2122
"semesterNames": {

website/src/data/academic-calendar.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,11 @@
4848
"2": { "start": [2024, 1, 15] },
4949
"3": { "start": [2024, 5, 13] },
5050
"4": { "start": [2024, 6, 24] }
51+
},
52+
"2024/2025": {
53+
"1": { "start": [2024, 8, 12] },
54+
"2": { "start": [2025, 1, 13] },
55+
"3": { "start": [2025, 5, 12] },
56+
"4": { "start": [2025, 6, 23] }
5157
}
5258
}

website/src/data/holidays.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,19 @@
4545
"2023-08-09",
4646
"2023-11-12",
4747
"2023-11-13",
48-
"2023-12-25"
48+
"2023-12-25",
49+
"2024-01-01",
50+
"2024-02-10",
51+
"2024-02-11",
52+
"2024-03-28",
53+
"2024-03-29",
54+
"2024-04-10",
55+
"2024-05-01",
56+
"2024-05-22",
57+
"2024-06-17",
58+
"2024-08-09",
59+
"2024-10-31",
60+
"2024-11-01",
61+
"2024-12-25",
62+
"2025-01-01"
4963
]
Lines changed: 24 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,78 @@
11
{
22
"Undergraduate": [
3-
{
4-
"type": "Select Courses",
5-
"name": "0",
6-
"start": "2023-12-12T09:00:00+08:00",
7-
"end": "2023-12-13T17:00:00+08:00"
8-
},
93
{
104
"type": "Select Courses",
115
"name": "1",
12-
"start": "2024-01-03T09:00:00+08:00",
13-
"end": "2024-01-04T12:00:00+08:00"
6+
"start": "2024-07-22T09:00:00+08:00",
7+
"end": "2024-07-23T12:00:00+08:00"
148
},
159
{
1610
"type": "Select Courses",
1711
"name": "2",
18-
"start": "2024-01-08T09:00:00+08:00",
19-
"end": "2024-01-09T12:00:00+08:00"
12+
"start": "2024-07-30T09:00:00+08:00",
13+
"end": "2024-07-31T12:00:00+08:00"
2014
},
2115
{
2216
"type": "Select Courses",
2317
"name": "3",
24-
"start": "2024-01-11T09:00:00+08:00",
25-
"end": "2024-01-12T12:00:00+08:00"
18+
"start": "2024-08-05T09:00:00+08:00",
19+
"end": "2024-08-06T12:00:00+08:00"
2620
},
2721
{
2822
"type": "Select Tutorials / Labs",
2923
"name": "1",
30-
"start": "2024-01-16T09:00:00+08:00",
31-
"end": "2024-01-16T17:00:00+08:00"
24+
"start": "2024-08-13T09:00:00+08:00",
25+
"end": "2024-08-13T17:00:00+08:00"
3226
},
3327
{
3428
"type": "Select Tutorials / Labs",
3529
"name": "2",
36-
"start": "2024-01-18T09:00:00+08:00",
37-
"end": "2024-01-18T17:00:00+08:00"
30+
"start": "2024-08-15T09:00:00+08:00",
31+
"end": "2024-08-15T17:00:00+08:00"
3832
},
3933
{
4034
"type": "Add / Swap Tutorials",
4135
"name": "",
42-
"start": "2024-01-22T09:00:00+08:00",
43-
"end": "2024-01-23T17:00:00+08:00"
44-
},
45-
{
46-
"type": "Course Planning Exercise (CPEx)",
47-
"name": "",
48-
"start": "2024-03-11T00:00:00+08:00",
49-
"end": "2024-03-15T23:59:59+08:00"
36+
"start": "2024-08-19T09:00:00+08:00",
37+
"end": "2024-08-19T17:00:00+08:00"
5038
}
5139
],
5240
"Graduate": [
53-
{
54-
"type": "Select Courses",
55-
"name": "0",
56-
"start": "2023-12-12T09:00:00+08:00",
57-
"end": "2023-12-13T17:00:00+08:00"
58-
},
5941
{
6042
"type": "Select Courses",
6143
"name": "1",
62-
"start": "2024-01-03T09:00:00+08:00",
63-
"end": "2024-01-04T12:00:00+08:00"
44+
"start": "2024-07-22T09:00:00+08:00",
45+
"end": "2024-07-23T12:00:00+08:00"
6446
},
6547
{
6648
"type": "Select Courses",
6749
"name": "2",
68-
"start": "2024-01-08T09:00:00+08:00",
69-
"end": "2024-01-09T12:00:00+08:00"
50+
"start": "2024-07-30T09:00:00+08:00",
51+
"end": "2024-07-31T12:00:00+08:00"
7052
},
7153
{
7254
"type": "Select Courses",
7355
"name": "3",
74-
"start": "2024-01-11T09:00:00+08:00",
75-
"end": "2024-01-12T12:00:00+08:00"
56+
"start": "2024-08-05T09:00:00+08:00",
57+
"end": "2024-08-06T12:00:00+08:00"
7658
},
7759
{
7860
"type": "Select Tutorials / Labs",
7961
"name": "1",
80-
"start": "2024-01-16T09:00:00+08:00",
81-
"end": "2024-01-16T17:00:00+08:00"
62+
"start": "2024-08-13T09:00:00+08:00",
63+
"end": "2024-08-13T17:00:00+08:00"
8264
},
8365
{
8466
"type": "Select Tutorials / Labs",
8567
"name": "2",
86-
"start": "2024-01-18T09:00:00+08:00",
87-
"end": "2024-01-18T17:00:00+08:00"
68+
"start": "2024-08-15T09:00:00+08:00",
69+
"end": "2024-08-15T17:00:00+08:00"
8870
},
8971
{
9072
"type": "Add / Swap Tutorials",
9173
"name": "",
92-
"start": "2024-01-22T09:00:00+08:00",
93-
"end": "2024-01-23T17:00:00+08:00"
94-
},
95-
{
96-
"type": "Course Planning Exercise (CPEx)",
97-
"name": "",
98-
"start": "2024-03-11T00:00:00+08:00",
99-
"end": "2024-03-15T23:59:59+08:00"
74+
"start": "2024-08-19T09:00:00+08:00",
75+
"end": "2024-08-19T17:00:00+08:00"
10076
}
10177
]
10278
}

website/src/views/components/notfications/Announcements.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const enableAnnouncements = true;
1717
* dismissible, set the key to null. Otherwise, set it to a string.
1818
*
1919
* Previous keys:
20+
* - 'ay202425-new-data' - AY2024/25 data is available
2021
* - 'ay202324-new-data' - AY2023/24 data is available
2122
* - 'ay202223-new-data' - AY2022/23 data is available
2223
* - 'vercel-migration-120522' - Announcement for possible outage for
@@ -30,7 +31,7 @@ const enableAnnouncements = true;
3031
* - 'ay201819-new-data' - AY2018/19 data is available
3132
* - 'ay201819-s2-new-data' - S2 data available
3233
*/
33-
const key = announcementKey('ay202324-new-data');
34+
const key = announcementKey('ay202425-new-data');
3435

3536
const Announcements = memo(() => {
3637
const [isOpen, setIsOpen] = useState(() => {
@@ -59,9 +60,9 @@ const Announcements = memo(() => {
5960
<Heart className={styles.backgroundIcon} />
6061

6162
<div className={styles.body}>
62-
<h3>AY2023/24 courses now available!</h3>
63+
<h3>AY2024/25 courses now available!</h3>
6364
<p className={styles.bodyElement}>
64-
NUSMods now has AY2023/24 course information available. The data is accurate but subject
65+
NUSMods now has AY2024/25 course information available. The data is accurate but subject
6566
to changes.
6667
</p>
6768
<p className={styles.bodyElement}>

0 commit comments

Comments
 (0)