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
Fix 2023 game piece cOPRs #5174
Conversation
Codecov Report
@@ 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
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] |
There was a problem hiding this comment.
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)
Has this always been the case for previous score breakdowns? |
I did a quick look back at a couple matches, and it doesn't look like it. |
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. |
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 includesauto
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
Post merge notes:
We'll have to recalculate 2023 cOPRs once this gets merged.