[Time Between Classes] Flatten timed meetings for gap rules
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 85/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
Read src/lib/generation/rule.ts and src/lib/generation/noConflicts.ts, then follow the shape of preferredTimeWindow.ts and its test. Implement the rule in src/lib/generation/rules/minGap.ts, cover the listed gap and weekday cases in minGap.test.ts, and register it in src/lib/generation/registry.ts. Run pnpm test; done means all acceptance checks pass and describe() explains the minimum gap.
Written by the indexing model from the issue text.
Description
What to build
Prepare class meeting times for the new “time between classes” filters. Build a helper that lists each timed meeting separately and converts its clock times to minutes, while skipping meetings whose times are unknown.
Files
src/lib/generation/gaps.ts(new file)- Starting example: src/lib/generation/rule.ts
- Course/meeting fields: src/lib/domain/section.ts
Code to add or extend:flattenTimedMeetings(sections: readonly Section[]): TimedMeeting[].
Steps
- Add flattenTimedMeetings and the
TimedMeetingtype ingaps.ts. The result fields are crn, meetingIndex, days, startMinutes, endMinutes and dateRange. - Visit each section’s meetings. Skip a meeting if startTime or endTime is null; otherwise split each HH:mm[:ss] time and calculate hours * 60 + minutes.
- Keep separate entries for separate meetings. Copy the section’s dateRange and the meeting’s weekday list unchanged; use its position in
section.meetingsas meetingIndex.
Example
A meeting from 09:00 to 09:50 becomes startMinutes=540 and endMinutes=590. A second meeting with no time is omitted; two timed meetings in one section remain two separate entries.
import type { DayOfWeek, DateRange } from "~/lib/domain/section";
export type TimedMeeting = { crn: number; meetingIndex: number; days: DayOfWeek[]; startMinutes: number; endMinutes: number; dateRange: DateRange | null };
Check it works
In src/lib/generation/gaps.test.ts, check the example above and the failure or limit described in the steps. Run pnpm test -- src/lib/generation/gaps.test.ts, pnpm lint and pnpm typecheck.
References
Assign yourself before starting, or comment to claim the issue. Project setup.
- Dominant language
- TypeScript
- Stars
- 19
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DevDogsUGA/DogDays
-
map
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
DevDogsUGA/DogDays#868 ·
-
map
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
DevDogsUGA/DogDays#865 ·
-
sharing
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DevDogsUGA/DogDays#854 ·
-
import-export
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
DevDogsUGA/DogDays#850 ·
-
import-export
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
DevDogsUGA/DogDays#842 ·
All issues in DevDogsUGA/DogDays
Similar issues
-
afk-ok area:data-quality importer size:S
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
enorm-labs/event-junkie#3301 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
one-zero-eight/apply-bot#39 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bigbluebutton/bbb-ui-components-react#108 ·
Maintainers usually reply within 2 days
-
area: app type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
ExpidetGames/code-reviewer#308 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day