Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Min-gap rule edge cases: TBA/online, lecture + lab, mixed term parts

Open
#782 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
testing

Research direction

Start with src/lib/generation/rules/minGap.test.ts and the existing src/lib/generation/gapMinutes.test.ts pattern; run tests through generateSchedules with minGapMinutes set. Check the date range helpers in src/lib/generation/noConflicts.ts for mixed term parts, and wait for or pull in #781 before running these cases. Add one named test for each listed edge case, make any needed small fix in minGap.ts, and run pnpm test to confirm they pass.

Written by the indexing model from the issue text.

Description

Algorithm time-gaps

What to build

Pin down the edge cases of the minimum-gap rule with tests, and fix the rule where a test fails. The rule itself is the issue "Min-gap hard rule" (#781). This one needs no new design, only tests and small fixes. Write the tests through generateSchedules with minGapMinutes set (as gapMinutes.test.ts does), so they do not depend on the rule file layout. If #781 has not merged yet, pull its branch or wait for it before running them; whoever merges second rebases. Cases:

  • TBA/online: a meeting with startTime/endTime of null is never part of a gap.
  • Lecture + lab: a course's lecture and lab on the same day are two meetings of two sections that both get chosen; the gap between them counts like any other pair.
  • Mixed term parts: two sections that never meet in the same weeks (date ranges do not overlap, for example a first-half and a second-half session) are never compared, even on the same weekday.
  • Same section, several meetings (for example MWF): compare within each weekday only.

The file it touches

src/lib/generation/rules/minGap.test.ts (and minGap.ts if a case fails). Date range helpers: noConflicts.ts.

Acceptance check (pnpm test only)

One test per case above, each named for the case, all passing. Say in the PR if you changed minGap.ts and why.

New here? Setup is in docs/getting-started/setup.md; the first-PR walk-through is docs/getting-started/first-contribution.md.

Dominant language
TypeScript
Stars
19
Forks
94
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DevDogsUGA/DogDays

All issues in DevDogsUGA/DogDays

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.