fix: measure a place's mile on its own race, at the pass the order means - #191
Merged
Merged
Conversation
The mile beside a place came from whichever course line was nearest, ignoring the races ticked for it, and every race's lead runner pace used that one shared distance. Places are now measured on a ticked race (the highest on the Courses tab), leaders on their own race, and where a race passes a stop twice the pass is the one that keeps the club's order non-decreasing with the least total offset - Mankato's stop I moves from Full 20.6 (behind J) to 16.3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QkbtsMnQEe8HZ7xyxXHYHB
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.
On the Mankato roster the NCS panel read WE "Half 2.4", WF "10K 4.6", WC "Full 6.5", and unticking races on the Places tab could not change it.
Three faults, one cause: "how far along" came from
index.locatelocateanswers "which line is nearest" - on shared road a coin flip between races whose miles have nothing to do with each other.CourseIndex.place_positions: measured on a ticked race, the highest on the Courses tab if several; nearest line only for a place with no ticks, or ticks for races nowhere near it.CourseIndex.progressionpicks one pass per stop so the miles never run backwards in the club's order, and of those the choice with the least total offset. (A first attempt - "first pass after the previous stop" - was caught by an existing leader test: it took a pass 200 m away over the one the stop sits on.)geo.PlanarLine.passeslists every separate pass;progress.served_coursesreads the ticks.Checked
tests/test_place_miles.py(10), including a Mankato-shaped out-and-back; existing leader tests unchanged and passing; full suite 882 passed.Data issue this surfaced (not code)
Stop A is ticked for the Half, but the Half's line never comes within 284 m of it - beyond the 250 m limit, so A has no Half mile.
🤖 Generated with Claude Code
https://claude.ai/code/session_01QkbtsMnQEe8HZ7xyxXHYHB