Conversation
…96 flag An Event is keyed by event number alone, so when one number carries more than one distance the Event holds only the first distance seen and every later entry loses its own. Two real export shapes do this: - a combined-distance event, where swimmers in one event number choose between distances (400 or 500, 1000 or 1650, 25 or 100); and - a split-request entry: Meet Manager records an intermediate split as its own official time by writing a second E1 for the same event number with the shorter distance, fee 0.00, seed 0.00 and an "S" (sometimes "T") in column 96, followed by an E2 carrying the split time. EventEntry now carries `distance`, `stroke`, `course` and `entry_flag` read from its own E1/F1 line, and the entry's distance joins the same-swimmer identity so a split-request entry is never folded into the swimmer's main entry for that event (prelim + finals of one swim still merge as before). Event fields are unchanged; consumers that only read Event.distance see no difference.
The G1 split index is a two-character field and wraps at 100. A swim with more than 49 split slots -- a 1500 LCM or 1650 SCY recorded every 25 -- continues "...F96 ... F00 ... F04 ..." on the next G1 line; read literally, the wrapped indexes (0, 4, 8, ...) collide with the early ones and overwrite them, so such a swim kept 13 of its 30 splits and its finish landed under key 20. Indexes are monotonic within an entry, so a value at or below the highest already seen for that slot is taken as wrapped and advanced by 100. Swims that never reach index 100 are unaffected.
Contributor
Author
|
Pushed a second commit, |
Contributor
|
Is a "combined distance event" one where prelims are SCY and finals LCM (or similar)? If that happens, is the event flag set? |
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
Keep each entry's own
distance,stroke,courseand column-96 flag onEventEntry, read from its E1/F1 line.Why
Meet.get_or_create_eventkeys events by event number alone, so when one event number carries more than one distance theEventholds only the first distance it saw, and every later entry's own distance is lost. Two real Meet Manager export shapes do this:E1for the same event number with the shorter distance, fee0.00, seed0.00and anS(sometimesT) in column 96, followed by anE2carrying the split time. Read throughEvent.distance, a 500 split of a 1000 free comes out as "a 1000 free" in the split's time.Example from a real export (names shortened):
Across one corpus of ~34,000 hy3 files (55.4 million
E1lines) this affects 292 entries in 32 files; small, but each one is a wrong distance on a real swim.What changes
EventEntrygainsdistance: Optional[float],stroke: Optional[Stroke],course: Optional[Course]andentry_flag: Optional[str](column 96; observedS/Ton split-request entries, blank otherwise).e1_parserandf1_parserpopulate them from the entry's own line.distancejoins the individual identity insame_swimmer_entry_as, so a split-request entry is never folded into the swimmer's main entry for that event. A prelim + finals re-listing of one swim (same distance) still merges exactly as before.Eventis unchanged. Consumers that only readEvent.distancesee no difference; consumers that want the entry's actual distance readentry.distance.All new fields default to
None, so entries constructed elsewhere keep working.Tests
E1/E2pair lands as a second entry at its own distance with theSflag, while the event keeps the distance it was created with;Existing suite: 129 passed.