Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Ambiguity in Matchday Retrieval #3

Open
MauroAndretta opened this issue Aug 28, 2024 · 1 comment
Open

Handle Ambiguity in Matchday Retrieval #3

MauroAndretta opened this issue Aug 28, 2024 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@MauroAndretta
Copy link
Owner

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

  1. 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.

  2. 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.
  3. 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

  1. Execute the acquire_next_matches.py script during a matchday when some matches have already been played.
  2. Observe that the script fetches the remaining matches of the current matchday as the "next matches".
  3. Execute the script before any matches of a matchday have started.
  4. Observe that the script correctly identifies all matches of the current matchday as the "next matches".
@MauroAndretta MauroAndretta added bug Something isn't working enhancement New feature or request labels Aug 28, 2024
@MauroAndretta MauroAndretta self-assigned this Aug 28, 2024
@MauroAndretta
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant