You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the acquire_next_matches.py script fetches the next matchday data based on the current matchday provided by the API. However, the behavior of the script is ambiguous depending on the day and time it is executed:
Case 1: When the script is executed during a matchday where some matches have already been played and others are yet to be played, the script considers the "next matches" to be the remaining matches of the current matchday. This is not always the desired behavior.
Case 2: When the script is executed before any matches of the current matchday have started, it correctly identifies the next matches as those in the current matchday.
This inconsistency can lead to confusion and incorrect predictions.
Expected Behavior
The script should consistently fetch the upcoming matches, regardless of whether some matches in the current matchday have already been played. The user should be able to configure whether they want to:
Proposed Solution
Add a Configuration Option: Introduce a flag or parameter (e.g., --include-ongoing-matches) that allows the user to specify whether they want to include ongoing matches from the current matchday or skip to the next matchday.
Implement Logic Based on the Configuration:
If --include-ongoing-matches is set to True, include the remaining matches of the current matchday.
If --include-ongoing-matches is set to False, check if any matches have already been played in the current matchday. If they have, skip to the next matchday.
Improve Matchday Management: Implement a robust method to handle matchdays, ensuring that the script correctly identifies the upcoming matches based on the user's preference.
Steps to Reproduce
Execute the acquire_next_matches.py script during a matchday when some matches have already been played.
Observe that the script fetches the remaining matches of the current matchday as the "next matches".
Execute the script before any matches of a matchday have started.
Observe that the script correctly identifies all matches of the current matchday as the "next matches".
The text was updated successfully, but these errors were encountered:
Added logic to predict only matches that need to be played. Using a check with the current date in which the script is executed and the date time of the match.
Currently, the
acquire_next_matches.py
script fetches the next matchday data based on the current matchday provided by the API. However, the behavior of the script is ambiguous depending on the day and time it is executed:This inconsistency can lead to confusion and incorrect predictions.
Expected Behavior
The script should consistently fetch the upcoming matches, regardless of whether some matches in the current matchday have already been played. The user should be able to configure whether they want to:
Proposed Solution
Add a Configuration Option: Introduce a flag or parameter (e.g.,
--include-ongoing-matches
) that allows the user to specify whether they want to include ongoing matches from the current matchday or skip to the next matchday.Implement Logic Based on the Configuration:
--include-ongoing-matches
is set toTrue
, include the remaining matches of the current matchday.--include-ongoing-matches
is set toFalse
, check if any matches have already been played in the current matchday. If they have, skip to the next matchday.Improve Matchday Management: Implement a robust method to handle matchdays, ensuring that the script correctly identifies the upcoming matches based on the user's preference.
Steps to Reproduce
acquire_next_matches.py
script during a matchday when some matches have already been played.The text was updated successfully, but these errors were encountered: