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

Recent OPR calculations sometimes 0. #1

Open
DrewWing opened this issue Dec 23, 2024 · 0 comments
Open

Recent OPR calculations sometimes 0. #1

DrewWing opened this issue Dec 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@DrewWing
Copy link
Owner

DrewWing commented Dec 23, 2024

Describe the bug
Some teams' recent OPR calculated as 0 for lower amounts of days than 30.

To Reproduce
Steps to reproduce the behavior:

  1. Run statistics calculations on a team that hasn't played within NUMBER_OF_DAYS_FOR_RECENT_OPR days
  2. Push to Sheets or otherwise export OPR data
  3. See that recent OPR calculations are 0

Expected behavior
Recent OPR calculation

  1. Keeps increasing recent number of days until an event is found, or
  2. Uses last event.
    It should also log a warning to errors.log.

Actual behavior
Since the team hasn't played within the constant NUMBER_OF_DAYS_FOR_RECENT_OPR amount of days, the script runs into an error and sets all statistics for that team to be 0.

System:

  • All OS platforms
  • All browsers
  • Main v49.0 Alpha

Additional context
Pulled from todos.md on 12/23/2024
Targeted for first major post-release update.

Note that NUMBER_OF_DAYS_FOR_RECENT_OPR is set in common_resources.py and is called in loadMatchesByRecent in OPR.py.

@DrewWing DrewWing added the bug Something isn't working label Dec 23, 2024
@DrewWing DrewWing added this to the Post-Release Update milestone Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant