mirror of
https://github.com/IAmTomShaw/f1-race-replay.git
synced 2026-05-09 08:25:56 +02:00
[GH-ISSUE #36] Improve CLI: Add --speed flag, error handling, and fix default year #7
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/f1-race-replay#7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MohitBaghel24 on GitHub (Dec 12, 2025).
Original GitHub issue: https://github.com/IAmTomShaw/f1-race-replay/issues/36
GitHub Issues for F1 Race Replay
Issue #1: Missing Command-Line Argument for Playback Speed
Title
Feature: Add command-line argument for playback speed control
Labels
enhancement,usabilityDescription
The
playback_speedparameter exists in themain()function but cannot be controlled via command-line arguments. Users can adjust--year,--round, and session type, but playback speed is hardcoded to1.Location
File:
main.pyLines: 82, 87
Current Behavior
Expected Behavior
Users should be able to control playback speed via a command-line argument:
Suggested Implementation
Impact
Issue #2: No Error Handling for Invalid Command-Line Arguments
Title
Bug: Missing error handling for invalid CLI arguments causes crashes
Labels
bug,crash,error-handlingDescription
The script crashes with
IndexErrororValueErrorwhen users provide invalid command-line arguments for--yearor--round. There's no validation or error handling.Location
File:
main.pyLines: 71-72, 77-78
Current Behavior
Crash Scenarios
Expected Behavior
The script should:
Suggested Implementation
Impact
Severity: High
Issue #3: Incorrect Code Indentation
Title
Bug: Incorrect indentation for session type comment
Labels
bug,code-qualityDescription
The comment
# Session type selectionon line 84 is incorrectly indented at module level instead of being inside theif __name__ == "__main__":block.Location
File:
main.pyLine: 84
Current Behavior
Expected Behavior
Impact
Severity: Low
Issue #4: Default Year May Cause Runtime Errors
Title
Bug: Default year 2025 may not have available data
Labels
bug,data,configurationDescription
The default year is set to
2025(line 74), but F1 session data for 2025 may not be available depending on when the script is run. This could cause runtime errors when attempting to load session data.Location
File:
main.pyLine: 74
Current Behavior
Potential Error
Expected Behavior
Use a more conservative default year that's guaranteed to have data, or detect the current F1 season dynamically.
Suggested Solutions
Option 1: Use previous year
Option 2: Use specific known year
Option 3: Check data availability
Impact
Severity: Medium
---****
@MohitBaghel24 commented on GitHub (Dec 12, 2025):
Fix: Add error handling, --speed flag, and improve CLI robustness
Fixes hardcoded playback speed parameter and prevents application crashes
from invalid command-line inputs.
@IAmTomShaw commented on GitHub (Jan 9, 2026):
Thanks for raising this issue! I