refactor(optimiser): code quality improvements#4372
Open
thejus03 wants to merge 13 commits intonusmodifications:masterfrom
Open
refactor(optimiser): code quality improvements#4372thejus03 wants to merge 13 commits intonusmodifications:masterfrom
thejus03 wants to merge 13 commits intonusmodifications:masterfrom
Conversation
…ps in timetable validation
Contributor
|
PR author is not in the allowed authors list. |
|
@thejus03 is attempting to deploy a commit to the modsbot's projects Team on Vercel. A member of the Team first needs to authorize it. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4372 +/- ##
==========================================
+ Coverage 54.52% 56.39% +1.87%
==========================================
Files 274 308 +34
Lines 6076 6963 +887
Branches 1455 1680 +225
==========================================
+ Hits 3313 3927 +614
- Misses 2763 3036 +273 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
No logic changes
Solvefromhttp.ResponseWriter— solver now returns(SolveResponse, error)and the HTTP handler owns response writing. IntroducesSolveErrorto carry HTTP status codes back to the handler without coupling the solver tonet/httpGenerateNUSModsShareableLinktoFillDefaultsAndGenerateShareableLinksto make the in-place mutation ofassignmentsandlessonToSlotsexplicitWeeks.([]any)type assertions andfloat64casts inhasConflictwith directWeeksSetmap iteration — cleaner and avoids redundant work in the beam search hot pathvalidateTimetable— two slots overlapping in time but on different weeks are not a conflict; test now mirrors the solver'sWeeksSetintersection logicCoordinatesfields fromfloat32tofloat64, removing the lossy widening cast when passing to the haversine functionDayDistancecomment ("Squared" → accurate description)strings.Splitcalls on the same key with a singlestrings.SplitN🤖 Generated with Claude Code