Open uyencfi opened 3 months ago
The latest updates on your projects. Learn more about Vercel for Git βοΈ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
nusmods-export | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Apr 3, 2024 9:12am |
nusmods-website | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Apr 3, 2024 9:12am |
@uyencfi is attempting to deploy a commit to a Personal Account owned by @nusmodifications on Vercel.
@nusmodifications first needs to authorize it.
Thanks for the PR! We'll test out scraper changes over the next few days and get back to you βΊοΈ
Attention: Patch coverage is 0%
with 12 lines
in your changes are missing coverage. Please review.
Project coverage is 53.50%. Comparing base (
19f1480
) to head (7ca18ec
). Report is 1 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
website/src/views/modules/ModuleFinderSidebar.tsx | 0.00% | 12 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Quick live test case:
Hey, it looks like the exam for CM2112 got changed to be 2.30pm instead of 1pm, which makes it match HSI2001, so it's no longer that good of a candidate for a test case. A valid test case still exists: Sem 1, SH5110 vs FE5222
That said, let me take a look and test some things with your query and get back to you -- it looks pretty good right now, but for one, I think the query is inverted! (i.e. "No Exam Clash" gives us courses which do have an exam clash)
Context
Fix #3663Implementation
Given
timetable = [m1, m2, m3]
which is the list of modules currently added in the timetable. To detect whether a moduleX
clashes withtimetable
:X.start == m.start
(exact match) for each m in timetable(X.start < m.end) && (X.end > m.start)
for each m in timetable. This is the condition for 2 intervals to overlap, see https://stackoverflow.com/questions/325933/determine-whether-two-date-ranges-overlapβ However, the module struct only stores examStartTime (ISO timestamp, assuming UTC(?)) and examDuration (in minutes). Thus to get the endTime:
m.end
can be easily obtained sincem
is a known value from the timetable.X.end
is more difficult since we need to compute it on-the-fly inside the Elasticsearch query.The new Elasticsearch query I have looks like
TBD
examStartTime
really stored in Elasticsearch in UTC or UTC+08?