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

Fix 2023 game piece cOPRs #5174

Merged
merged 5 commits into from Apr 13, 2023

Conversation

dracco1993
Copy link
Member

@dracco1993 dracco1993 commented Apr 12, 2023

Description

Remove the game pieces scored in auto when calculating "total" game piece counts in cOPRs.
The teleop counts include things scored at the end of the match, which includes auto things, so we're currently double counting those.

Motivation and Context

Fixes #5148

How Has This Been Tested?

Ran some checks locally, as well as added a spec for 2023cada, which is the event mentioned in the bug report above.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change API specifications or require data migrations)

Post merge notes:

We'll have to recalculate 2023 cOPRs once this gets merged.

@codecov
Copy link

codecov bot commented Apr 12, 2023

Codecov Report

Merging #5174 (adcf929) into py3 (8e895ce) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              py3    #5174   +/-   ##
=======================================
  Coverage   93.54%   93.54%           
=======================================
  Files         616      616           
  Lines       38476    38490   +14     
  Branches       60       60           
=======================================
+ Hits        35992    36006   +14     
  Misses       2476     2476           
  Partials        8        8           
Impacted Files Coverage Δ
src/backend/common/helpers/matchstats_helper.py 78.26% <ø> (ø)
...end/common/helpers/tests/matchstats_helper_test.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

coprs: EventComponentOPRs, expected_coprs: EventComponentOPRs
) -> None:
assert coprs.keys() == expected_coprs.keys()
for component, oprs in coprs.items():
assert oprs.keys() == expected_coprs[component].keys()
for team_key, opr in oprs.items():
assert opr == approx(expected_coprs[component][team_key]) # pyre-ignore[16]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is # pyre-ignore[16]'ed, because it's an ongoing lack of annotations on pytest's part:
pytest-dev/pytest#7469 (comment)

github-actions bot added a commit that referenced this pull request Apr 12, 2023
@github-actions
Copy link

Screenshots

Homepage

Homepage

GameDay

GameDay

github-actions bot added a commit that referenced this pull request Apr 12, 2023
@ZachOrr
Copy link
Member

ZachOrr commented Apr 13, 2023

Has this always been the case for previous score breakdowns?

@dracco1993
Copy link
Member Author

dracco1993 commented Apr 13, 2023

Has this always been the case for previous score breakdowns?

Unknown, I'd have to go back and check.

I did a quick look back at a couple matches, and it doesn't look like it.
Here's one from 2022, where there's an autoCargoUpperFar, but not a teleopCargoUpperFar, implying that the auto and teleop data are two distinct sets:
https://www.thebluealliance.com/match/2022flwp_qm1 / https://www.thebluealliance.com/api/v3/match/2022flwp_qm1

@fangeugene
Copy link
Member

fangeugene commented Apr 13, 2023

I think this is just a side effect of how the API returns stuff this year because the pick and place game is scored at the end.

@ZachOrr ZachOrr merged commit d8c6f23 into the-blue-alliance:py3 Apr 13, 2023
12 checks passed
@dracco1993 dracco1993 deleted the fix_2023_piece_coprs branch April 13, 2023 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Game Piece cOPRs Incorrect
3 participants